summaryrefslogtreecommitdiffstats
path: root/TOOLS
Commit message (Collapse)AuthorAgeFilesLines
* lua: don't pass nil as the second argument of mp.get_property_numberGuido Cella10 days1-1/+1
| | | | | This doesn't do anything because nil is already the default value of unavailable properties.
* TOOLS/gen-interface-changes.py: sort interface changes by file contentnanahi10 days1-9/+10
| | | | | | | | With the previous commit, they're in effect sorted by the types of the interface changes. As a lazy measure to sort changes by the breakages they cause, sort the content reverse alphabetically, which works OK by accident.
* autoload.lua: always accept current file as a valid fileKacper Michajłow2024-06-041-6/+8
| | | | | | | | This allows loading other types of media from the current directory, with same_type=no, regardless of whether the current type is enabled for autoload. Fixes: #14287
* autoload.lua: match also image extensionKacper Michajłow2024-06-041-3/+7
| | | | | For clarity, it is already matched if extention is in EXTENSIONS if pl_count == 1.
* autoload.lua: cosmetic changesKacper Michajłow2024-06-041-45/+36
|
* autoload.lua: fix options updateKacper Michajłow2024-06-041-4/+11
| | | | | The extensions list needs to be cleared in this case. Also, add the missing split_patterns().
* TOOLS/autoload.lua: fix directory_mode and ext optionsGuido Cella2024-06-031-4/+5
| | | | | | Operations on option values need to be performed after they are read. Fixes 843161d96e.
* TOOLS/test-hooks.lua: fix lint warningGuido Cella2024-06-021-1/+1
|
* TOOLS/status-line.lua: fix lint warningsGuido Cella2024-06-021-4/+6
|
* TOOLS/osd-test.lua: fix lint warningGuido Cella2024-06-021-1/+1
|
* TOOLS/observe-all.lua: fix lint warningGuido Cella2024-06-021-1/+1
|
* TOOLS/nan-test.lua: fix lint warningsGuido Cella2024-06-021-3/+3
|
* TOOLS/cycle-deinterlace-pullup.lua: fix lint warningsGuido Cella2024-06-021-5/+5
|
* TOOLS/command-test.lua: fix lint warningsGuido Cella2024-06-021-8/+13
|
* TOOLS/autoload.lua: fix lint warningsGuido Cella2024-06-021-55/+54
|
* TOOLS/autodeint.lua: fix lint warningsGuido Cella2024-06-021-37/+38
|
* TOOLS/autocrop.lua: fix lint warningsGuido Cella2024-06-021-52/+49
|
* TOOLS/ao-null-reload.lua: fix lint warningsGuido Cella2024-06-021-2/+4
|
* TOOLS/gen-interface-changes: wrap long lines to 80 colllyyr2024-05-291-2/+5
|
* osxbundle: refactor Information Property Listmaxdunbar2024-05-251-173/+455
| | | | | | Includes cleanup of CFBundleDocumentTypes, UTImportedTypeDeclarations, LSItemContentTypes. Reordered general structure of the Property List as in nodes/collections/arrays. Declared MIME types.
* build: dynamically generate mpv.desktop file protocolsDudemanguy2024-05-221-0/+45
| | | | | | | | If we can run the built mpv binary, then it is possible to use a custom target that reads the protocols we have available in mpv and write the mpv.desktop file based on the output. For cases where this is not possible (e.g. cross compiling), then just install the unmodified mpv.desktop file like before. Fixes #8731 and fixes #14124.
* autocrop.lua: fix some lint warningsKacper Michajłow2024-05-121-1/+1
|
* test-hooks.lua: fix variable shadowing warningKacper Michajłow2024-05-121-2/+2
|
* status-line.lua: fix unused variable warningKacper Michajłow2024-05-121-1/+1
|
* skip-logo.lua: fix some lint warningsKacper Michajłow2024-05-121-8/+10
|
* pause-when-minimize.lua: fix unused variable warningKacper Michajłow2024-05-121-1/+1
|
* ontop-playback.lua: fix unused variable warningKacper Michajłow2024-05-121-1/+1
|
* observe-all.lua: fix some lint warningsKacper Michajłow2024-05-121-4/+4
|
* cycle-deinterlace-pullup.lua: fix unused variable warningsKacper Michajłow2024-05-121-1/+1
|
* command-test.lua: fix some lint warningsKacper Michajłow2024-05-121-5/+5
| | | | Fixes unused variable warnings.
* autoload.lua: fix some lint warningsKacper Michajłow2024-05-121-20/+21
| | | | | | | | Fixes: autoload.lua:201:1: setting undefined field filter of global table autoload.lua:209:1: setting undefined field append of global table autoload.lua:322:11: value assigned to variable extensions is unused
* autodeint.lua: fix some lint warningsKacper Michajłow2024-05-121-1/+1
| | | | | | | Fixes: autodeint.lua:90:1: right side of assignment has more values than left side expects
* audio-hotplug-test.lua: fix some lint warningsKacper Michajłow2024-05-121-4/+2
| | | | | | | | Fixes: audio-hotplug-test.lua:1:7: unused variable utils audio-hotplug-test.lua:3:61: unused argument name audio-hotplug-test.lua:5:9: unused loop variable index
* acompressor.lua: break long linesKacper Michajłow2024-05-121-3/+6
|
* demux_mkv: demux Block Additional MappingsKacper Michajłow2024-05-101-0/+6
| | | | Parse Dolby Vision configuration.
* tools: add narrow left arrow glyph for OSDMatthias Hunstock2024-05-051-0/+15
| | | | Add rotated arrow glyph on unused codepoint U+E00D.
* TOOLS/lua/autoload: make ignore_patterns more genericKacper Michajłow2024-04-271-1/+1
|
* TOOLS/lua/autoload: allow multiple ignore_patternsoficsu2024-04-271-9/+63
|
* TOOLS/lua/autoload: add ignore_pattern optionoficsu2024-04-271-2/+12
| | | | | | | | | | | | | | Autoload script can now exclude certain files Why? Sometimes you want to ignore thumbnails, auto-generated backups or just unwanted files A non-exhaustive list of real-world examples: - user backup files: '%.bak%.mp4$' or '^bak-' - telegram-desktop thumbnails: '_thumb%.jpg$' - a krita graphics editor backup suffix: '^~' See documentation here: lua.org/pil/20.2.html
* demux_mkv: add BCP 47 language tags supportKacper Michajłow2024-04-161-0/+3
| | | | | | | | | | Section 12 of Matroska Media Container Format Specifications says: If a BCP 47 Language Element and an ISO 639-2 Language Element are used within the same Parent Element, then the ISO 639-2 Language Element MUST be ignored and precedence given to the BCP 47 Language Element. Fixes: #8144
* osxbundle: use arg list instead of a string for signing subprocess callder richter2024-04-151-6/+3
| | | | Fixes #13872
* TOOLS/lua/autoload: fix allow extending ext sets from script-optsChristoph Heinrich2024-04-131-6/+18
| | | | | | https://github.com/mpv-player/mpv/commit/4eedb8710cccec719f393216f5f32b74025c7df9 has broken the normal work of this feature with --same_type=yes Co-Authored-by: dyphire <qimoge@gmail.com>
* TOOLS: add an interface-changes generator scriptDudemanguy2024-03-201-0/+83
| | | | | Convenience script to automatically generate interface-changes.rst based on the workflow introduced in the previous commit.
* osxbundle: avoid running `codesign` with deprecated `--deep` argumentDavid Knaack2024-03-071-1/+7
| | | | | | | | | `--deep` is deprecated as of macos 13.0. It is also not supported by alternative `codesign` implementations like [sigtool](https://github.com/thefloweringash/sigtool). Related: https://github.com/NixOS/nixpkgs/pull/270691
* osxbundle: activate Game Mode with App bundleder richter2024-03-071-0/+2
| | | | | | | | | | | | | | | mpv isn't really a game and categorising our App bundle as game seems counterintuitive. though as a video player it does have some similarities, possibly needing considerably CPU and GPU resources and low presentation latencies. the macOS Game Mode promises exactly that, it gives App the highest priority access to CPU and GPU resources and lowers usage for background tasks. sadly the Game Mode can only be activated by categorising the App as a game and that is only possible with an App bundle and not as a command line tool.
* osxbundle: fix bundling when homebrew is not installedder richter2024-02-291-1/+8
| | | | Fixes #13603
* osxbundle: use dylib script directly instead of in a subprocessder richter2024-02-242-4/+5
| | | | | | | | | | | | before errors and outputs where ignored from the subscript and the main script didn't fail nor did it output anything. with this change the script properly outputs everything to stdout and stderr. in the case the dylib script fails the whole script fails now. the main function in dylib_unhell was kept since it can still be used individually without the oscbundle script. the script had to be renamed with an underscore to make it importable.
* osxbundle: add homebrew vulkan loader location to search pathder richter2024-02-241-0/+4
|
* osxbundle: resolve loader_path on rpath retrievalder richter2024-02-241-1/+6
| | | | | rpaths can be relative to the current object folder path. resolve those paths.
* osxbundle: remove unused importder richter2024-02-241-1/+0
|
* osxbundle: fix syntax warning with python 3.12der richter2024-02-241-3/+3
|
* various: make mentions of macOS consistentder richter2024-02-211-1/+1
| | | | | change all mentions and variations of OSX, OS X, MacOSX, MacOS X, etc consistent. use the official naming macOS.
* osxbundle: add optional source path argumentder richter2024-02-201-9/+11
|
* osxbundle: remove old version retrieval fallbackder richter2024-02-201-4/+3
|
* osxbundle: bundle vulkan driver and layersder richter2024-02-201-0/+72
| | | | | | | only bundle synchronization2 layer for older vulkan/MoltenVK versions where it is needed. Fixes #13232
* f_auto_filters: change fallback deinterlace to bwdifDudemanguy2024-01-211-1/+1
| | | | | | | I don't actually deinterlace ever but allegedly this is better than yadif, and there's no real reason to not have this be the fallback deinterlace when we're not using hw frames. Also change various mentions of yadif to bwdif. Ref #12835.
* TOOLS/autocrop.lua: drop Libav mentionllyyr2024-01-201-1/+1
|
* scripting: don't observe properties with type nilGuido Cella2024-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | mp.observe_property('foo', nil, ...) calls the handler at least 2 times on each playlist change even when the property doesn't change. This is dangerous because if you haven't read observe_property's documentation in a long time this is easy to forget, and you can end up using it for handlers that are computationally expensive or that cause unintended side effects. Therefore, this commit discourages its use more explicitly in the documentation, and replaces its usages in scripts. For console.lua, observing focused with type nil leads to calling mp.osd_message('') when changing file while playing in the terminal with the console disabled. I don't notice issues from this, but it's safer to avoid it. For playlist and track-list this doesn't really matter since they trigger multiple changes on each new file anyway, but changing it can avoid encouraging people to imitate the code. One usage of none in stats.lua is kept because according to b9084dfd47 it is a hack to replicate the deprecated tick event.
* TOOLS/lua/autoload: skip loading when playback is abortedsunpenghao2024-01-201-0/+6
| | | | | | Quickly going through a directory with too many loadable files causes the autoload tasks to pile up and exiting the player will take forever. Avoid this by skipping loading when playback is aborted.
* osxbundle: sign bundle with ad-hoc pseudo identityder richter2023-11-151-0/+6
| | | | | | | | | without a developer license and the corresponding certificate we can't sign our app bundle properly. instead use the ad-hoc pseudo identity. there. i am not sure what restrictions we have because of that, but it's the only way we can pseudo sign the app bundle. Fixes #12116
* osxbundle: remove mpv-bundle symlink to allow code signingDaniel Brookman2023-11-152-7/+3
| | | | | | | | | | | | | | | | | | | Apps on Apple silicon have to be codesigned to run, but you can't codesign bundles that have a symlink for the main executable. The "mpv-bundle" symlink was used as the bundle's main executable because it makes the execution name of the binary different. Launch Services runs the CFBundleExecutable key from Info.plist when launching a bundle, so by comparing the execution name to the name of the symlink, you can check if that's how the binary was launched. This replaces that detection method by moving the MPVBUNDLE environmental variable into Info.plist. Launch Services will set anything in LSEnvironment as environmental variables before launching the bundle, so we're able to check for it instead of needing to differentiate the execution name of the binary. Fixes #12116
* osxbundle: resolve relative linked dependency pathsder richter2023-11-151-12/+63
| | | | | | | | | | not all dependencies are linked with an absolute path but rather are relatively linked via @rpath or @loader_path. in those cases we have to resolve the paths to those dependencies ourselves and change the linking with install_name_tool to be relative to the @executable_path of the binary within bundle. Fixes #11897
* TOOLS/macos-sdk-version: remove legacy sdk version retrievalder richter2023-11-101-25/+10
| | | | | | | | | | | | | | | | | | | | | | | older macOS dev tools were inconsistent with the way how SDK versions were returned, some truncated the minor versions. in those cases the SDK version had to be retrieved through the SDK build version. recently the scheme for the SDK build version changed that our heuristic for converting it to an SDK version produced wrong version strings. the stride of the minor version changed from 1 to 2, so SDK versions ended up higher than they actually were. furthermore macOS 11 was hardcoded. since Xcode 12 Apple fixed the SDK version retrieval and it is no longer truncated when using Xcode as dev tools. Xcode 12 is also the latest supported version on macOS 10.15, which is also our oldest supported version. we can remove the old SDK build version conversation and use the Xcode only tool to retrieve the SDK version in the case Xcode is used as dev tools. furthermore this als keeps support for Xcode 11 where the problem wasn't fixed yet, but is still a supported version on macOS 10.15. Fixes #9907
* meson: do the macos sdk version comparison in mesonDudemanguy2023-10-291-12/+5
| | | | | | | | Since we can no longer rely on distuils for a version comparison, let's modify the macos-sdk-version script so it returns multiple potential versions to meson. Then use meson's built-in version comparison to pick the right one instead. This avoids the complication of needing certain python packages installed since everything simply uses stdlib functions.
* TOOLS/{file2string,matroska}: drop unneeded stdout outputDudemanguy2023-10-282-12/+3
| | | | | | This was originally for the waf build, and then later writing the output to a file was added for meson. Since the waf build is no longer around anymore, remove the dead code.
* TOOLS/macos-sdk-version: use packaging instead of distutils for versionDudemanguy2023-10-271-2/+2
| | | | | | | | | Python 3.10 deprecated disutils and then removed it in 3.12. The macos sdk check uses the version compare from there, so it needs to be replaced with something else. So instead use the API from the packaging module which is also widely available and a fit replacement. Fixes #12762.
* TOOLS/autocrop.lua: disable hwdec when needed instead using -copy oneKacper Michajłow2023-10-181-4/+3
| | | | | | | This is more stable in practice. Avoids switching between possibly different hwdecs and avoids unnecessary init. Software decoding should be more stable and possibly faster overall for decoding this small portion of video needed for cropdetect.
* TOOLS/autocrop.lua: add support for detect_min_ratioKacper Michajłow2023-10-071-1/+9
| | | | This was lost in 6b963857c0
* TOOLS/autocrop.lua: simplify codeGuido Cella2023-10-071-30/+14
| | | | | Refactor code that is no longer necessary after replacing vf=crop with video-crop. There is no change in behavior.
* TOOLS/autocrop.lua: update commentGuido Cella2023-10-061-64/+44
|
* TOOLS/lua/autoload: bump the msg-level of some loggingDudemanguy2023-10-031-6/+6
| | | | | | | msg.info for when you're potentially adding hundreds of files is way too spammy and not really useful (autoload loads files, what?). Bump it up to msg.verbose. Also bump up the previously existing msg.verbose logs up to msg.debug to keep the difference in log levels. Fixes #12551.
* TOOLS/autocrop.lua: switch to auto-copy hwdec during cropdetectGuido Cella2023-09-211-0/+20
| | | | | | | I didn't set file-local-options/hwdec because you have to store the hwdec value to restore it after cropdetect anyway, and if the user manually changes hwdec after cropdetect, the new value isn't reset when changing file.
* TOOLS/autocrop.lua: cleanup timers correctlyGuido Cella2023-09-211-1/+1
| | | | | | | If you change file while cropdetect is active and you try to crop the next video, it fails with "Already cropdetecting!". This is because timers.detect_crop wasn't cleared correctly, only the timer variable local to the loop was being set to nil.
* TOOLS/autocrop.lua: use VO crop alwaysKacper Michajłow2023-09-201-47/+12
| | | | | There is no reason not to and this significantly reduces script complexity.
* options: make video-crop validation more strictKacper Michajłow2023-09-201-2/+2
|
* TOOLS/matroska.py: add PixelCrop* elementsKacper Michajłow2023-09-171-0/+4
|
* TOOLS/lua/autoload: rename local variable to lowercaseChristoph Heinrich2023-09-151-6/+6
|
* TOOLS/lua/autoload: pass extensions to recursive callChristoph Heinrich2023-09-151-1/+1
| | | | Closes #12400
* TOOLS/lua/autoload: change EXTENSIONS_TARGET to a local variabledyphire2023-09-141-3/