-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Bump mpv and swift package versions #4988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple problems…
Taking a JPEG XL screen shot failed with:
17:05:51.248 [ffmpeg][e] Unexpected encoding: libjxl (258)
Was FFmpeg built with --enable-libjxl
?
This was a build error on my part. JPEG XL is working.
- Need to run
other/parse_doc.rb
so that the generated mpv interface classes,MPVCommand
,MPVOption.swift
andMPVProperty.swift
match the version of mpv.
This has been done, HOWEVER the generator needs to be updated and MPVProperty.swift
regenerated as indicated in my comments below. Those comments also provide more details on the code that needs to be updated due to mpv changes.
As a part of that these changes will be needed:
MPVOption.Screenshot.screenshotDirectory
must be changed toMPVOption.Screenshot.screenshotDir
inMPVController
andPlayerCore
MPVProperty.videoAspect
must be changed toMPVOption.Video.videoAspectOverride
inPlayerCore
There are a couple of other missing properties such as video-codec
and video-format
. I've not tracked down what has happened to them yet.
I am unable to buildiina-plugin
. I get this failure:
/Users/low-batt/Documents/builds/iina-official/iina/iina-plugin/main.swift:10:8: error: missing required module 'GRMustacheKeyAccess'
import Mustache
I tried reseting the package caches. Deleting Xcode caches. Didn't work. To be able to test I had to delete the iina-plugin
project. Some sort of Xcode bug? I'm using Xcode 15.2.
This has been fixed by commit db9f0fb.
Spinning wheel of death when playing with HDR enabled on a Mac that supports EDR.
Very hard to investigate this because the Mac locks up so much that nothing responds. With much trouble I was able to capture a process sample. This: _NSCGSDisplayConfigurationMaximumHDRValueChangedNotificationHandler
is macOS sending updates as the capabilities of the display changes. I have found that these updates are emitted at a high rate, especially when you first activate EDR. This is expected. But during the processing a method _CSCheckFix
is calling _os_log_debug_impl
. All the time is spent logging.
Once I saw this I clicked on Show Build Folder in Finder
and executed IINA directly instead of from Xcode. The performance issue was gone. So this has something to do with the Xcode console now being tied into oslog. That is new to Xcode 15. Maybe I've not tried HDR since upgrading Xcode and this has nothing to do with the mpv upgrade? I will look into that.
This is not a problem with this PR. It is not reproducible on my Mac running macOS Sonoma and Xcode 15.4. I encountered this under macOS Ventura and Xcode 15.2. Seems like Apple has fixed this one.
Process sample::
+ ! : | + ! : 4775 _NSCGSDisplayConfigurationMaximumHDRValueChangedNotificationHandler (in AppKit) + 264 [0x1abbfaf80]
+ ! : | + ! : | 4759 _NSCGSDisplayConfigurationUpdateAndInvokeObservers (in AppKit) + 68 [0x1abbfa6b8]
+ ! : | + ! : | + 4740 _NSCGSDisplayConfigurationUpdate (in AppKit) + 912 [0x1abbfb79c]
+ ! : | + ! : | + ! 4740 _NSCGSCreateArrayUsingBlock (in AppKit) + 196 [0x1ab5a8cdc]
+ ! : | + ! : | + ! 4740 ___NSCGSCreateDisplaysFromDisplayIDsUsingPredicate_block_invoke (in AppKit) + 76 [0x1ab5a8e44]
+ ! : | + ! : | + ! 4739 -[NSCGSDisplay initWithDisplayID:flipOffset:] (in AppKit) + 816 [0x1ab5a9260]
+ ! : | + ! : | + ! : 4736 SLDisplayCopyAllDisplayModes (in SkyLight) + 348 [0x1ad27a7b8]
+ ! : | + ! : | + ! : | 2382 display_mode_is_legacy_listed (in SkyLight) + 116 [0x1acfc3fcc]
+ ! : | + ! : | + ! : | + 2382 _CSCheckFix (in CarbonCore) + 636 [0x1ab0dad44]
+ ! : | + ! : | + ! : | + 2381 _os_log_debug_impl (in libsystem_trace.dylib) + 24 [0x1a805185c]
+ ! : | + ! : | + ! : | + ! 2379 _os_log (in libsystem_trace.dylib) + 152 [0x1a804f064]
Fixed in the pushed commit. Actually I did this, but Based on the changes of mpv options and properties, I think we need to do some changes in our code to reflect some of their name changes, right?
Yes it was. Weird, I'll do some investigation. |
Yes, we need to make some changes in IINA as mpv renamed some of the properties/options we are using. IINA won't build with the updated generated files. I listed a couple of the changes needed above. These changes were in the list of changes And yes, the behavior of the generator script is confusing. I guess there was a concern about possibly stepping on some local changes? Otherwise it probably should put the files in their proper place. The FFmpeg build missing |
Another thing I forgot. We have a lot of dangling references in the Xcode project to header files that have been removed. We should clean those up as well. |
This is the mpv commit that removed properties like |
This mpv commit removed the restriction on using |
To fix the compilation errors in the if name.include? 'current-tracks'
# According to the mpv documentation this property is not supposed to be
# used programmatically. We still output a comment for the property so
# people can figure out why the Swift constant is missing.
file.write " /** #{name} As per mpv docs, scripts etc. should not use this. */\n" That restriction has been removed. We need to use that property because these properties that we were using have been removed from the documentation as mpv would prefer clients use the actual properties instead of these aliases: M_PROPERTY_ALIAS("audio-codec", "current-tracks/audio/codec-desc"),
M_PROPERTY_ALIAS("video-format", "current-tracks/video/codec"),
M_PROPERTY_ALIAS("video-codec", "current-tracks/video/codec-desc"), |
puts "=== Fix dependencies for #{file} ===" | ||
dylib = DylibFile.new file | ||
dylib.change_id! | ||
dylib.deps.each do |dep| | ||
if dep.start_with?(prefix) | ||
if dep.start_with?(prefix) || dep.start_with?("@rpath") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use or
fix_count += 1 | ||
basename = File.basename(dep) | ||
new_name = "@rpath/#{basename}" | ||
dylib.change_install_name!(dep, new_name) | ||
dest = File.join(lib_folder, basename) | ||
src = | ||
if dep.start_with?(prefix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep them in the same line src = if ...
Updated |
Reviewed latest changes. Built and runs without errors for me. There are lots of dangling references under deps/include in the Xcode project. Since we are updating the includes we might as well fix that as well in this PR. Do you want me to take care of that? |
Are you talking about we have unused headers from mpv and FFmpeg? Even if we have some headers that are not explicitly used in our code, specifically |
Not that. It is that the Xcode project has references to headers that do not exist. Open up the group for |
Most of those files are missing for me:
|
The
|
@low-batt Sorry I didn't check the gitginore. I saw this file was maintain by you, so please deal with this issue. |
The `libwebp` in the `webp` package contains `@rpath` references when `--build-from-soruce`. This will cause `libsharpyuv.dylib` failed to be copied to the libs folder. Update the script to handle this case.
- Removed Gzip since we are not using it anymore - Upgraded: - PromiseKit from 6.13.3 to 6.22.1 (the latest release is version 8) - GRMustache from 4.0.1 to 4.2.0 (latest) - Sparkle from 2.4.0 to 2.6.3 (latest, w/ Sonoma improvements)
This commit will add two additional libraries that are only needed on Macs with Intel chips.
Updated libs on server & rebased. Merging. |
Description:
This PR bumps mpv and FFmpeg to the latest release version. The corresponding header files are also updated.
release/1.4.0
branch in IINA's fork of mpv, which contains fixes for the 0.38.0 release from the master branch)Use these libs to test out: lib.zip. Unzip
lib.zip
and replace withdeps/lib
. Note that the libraries are only for arm and macOS 12+.The new libs have not uploaded to the server, so don't try to download them using
other/download_libs.sh
as it will still download the old libs.mpv still cannot compile when targeting macOS 10.15 (for x86), track here
The
libwebp
in thewebp
package contains@rpath
references when--build-from-soruce
. This will causelibsharpyuv.dylib
failed to be copied to the libs folder. Thechange_lib_dependencies.rb
is modified to handle this case.The swift package also got upgraded:
The Gzip swift package is removed since we're not using it anymore (correct me if I'm wrong).
Updates on compilation on 10.15 (x86 only)
libjxl
will not compile w/ the latest Xcode toolchain available on 10.15 (Xcode 12.4). According to libjxl/libjxl#2461 (comment), I had to install gcc from homebrew (gcc 14) and forcelibjxl
to usegcc-14
instead of Xcode toolchain.