summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vo_gpu: support video-target-paramsnanahi2024-03-273-0/+27
|
* vo_direct3d: support video-target-paramsnanahi2024-03-271-0/+13
| | | | The backbuffer format is available.
* vo_xv: support video-target-paramsnanahi2024-03-271-0/+8
| | | | | The target colorspace depends on whether the xv adaptor supports setting BT.709 colorspace.
* meson: improve option descriptionssfan52024-03-261-18/+18
|
* meson: refine dependencies of many feature checkssfan52024-03-261-41/+55
|
* meson: remove some unneeded features from listsfan52024-03-261-16/+5
| | | | | There's no practical use in knowing that e.g. mpv was linked to libm and these are not used for HAVE_* tests either.
* DOCS: update for new --pulse-latency-hacks defaultssfan52024-03-251-5/+2
| | | | | I missed this. fixes: 8e3737ab633ba096fcf9f2da2391f84690bd1b4c
* demux_mkv: support V_FFV1 tagvaladaptive2024-03-251-0/+1
| | | | | FFmpeg encodes FFV1 with the V_MS/VFW/FOURCC tag, but GStreamer's matroskamux uses the V_FFV1 tag, so we need to recognize it.
* player/command: optimize duplicated property search in command_initKacper Michajłow2024-03-251-1/+12
| | | | | | | Would be better to search the other way around, because options list is bigger than property list, but with minimal changes this is good enough. Both are relatively small tho and the only reason for this micro optimization is to increase the fuzzing throughput.
* ci/mingw: use GAS for vulkan loaderAndarwinux2024-03-251-2/+7
| | | | this allows us to securely bundle the vulkan loader and include it in CI artifacts
* mac/event: only initialise an EventHelper when necessaryder richter2024-03-242-4/+12
|
* mac/touchbar: use AppHub directly instead of the singletonder richter2024-03-241-2/+3
|
* mac/remote: use AppHub directly instead of the singletonder richter2024-03-241-2/+3
|
* mac/touchbar: use EventHelper for event handlingder richter2024-03-244-66/+22
| | | | also remove remaining old event handling.
* mac/touchbar: move touch bar into AppHubder richter2024-03-242-1/+7
|
* mac/remote: use EventHelper for event handlingder richter2024-03-242-50/+37
|
* mac/touchbar: fix devision by 0der richter2024-03-241-1/+1
|
* mac/remote: fix devision by 0der richter2024-03-241-1/+1
|
* cocoa-cb: use EventHelper for event handlingder richter2024-03-243-26/+15
|
* cocoa-cb: use a separate mpv_handle for cocoa-cb to simplify shutdownder richter2024-03-244-27/+16
|
* mac/apphub: migrate remaining events functionality to new AppHubder richter2024-03-2414-224/+167
| | | | | | | | add new app_bridge objc file for bridging between mpv core and app functionality. replace old EventsResponder singleton with AppHub. another step to clean up all App functionality and have one central place for it.
* mac/event: add helper to subscribe to mpv events and property changesder richter2024-03-243-0/+167
| | | | | preparation to remove duplicate code from all classes that implement their own observer loops.
* hwdec/vulkan: enable the stable AV1 extensionLynne2024-03-241-2/+1
| | | | | | | As no drivers were ever released with the unstable extension, it's not needed anymore. Not bumping the required headers version yet.
* ci/msys2: fix vulkan package nameAndarwinux2024-03-241-1/+1
|
* ao_pulse: reenable latency hacks by defaultsfan52024-03-242-0/+2
| | | | | | | | | | | | | | As far as I can tell PulseAudio introduced a bug in 16.0 where if a stream is (un)paused too often the reported latency will momentarily spike by 3000% or more. Apparently in certain cases just pausing once and waiting can also cause this. Save the remaining users of PA the trouble of debugging the various obscure issues that can arise from this (desync is a harmless example) by enabling the latency hack code again. ref: <https://github.com/mpv-player/mpv/issues/12057> <https://github.com/mpv-player/mpv/issues/10333>
* player/command: fix udata talloc parentShuanglei Tao2024-03-231-2/+2
|
* mac/libmpv: remove unused functionsder richter2024-03-211-37/+0
|
* mac: optimise and shorten some codeder richter2024-03-213-15/+6
|
* mac/option: remove now unused computed option variablesder richter2024-03-212-2/+0
|
* mac/option: rename option structs to properly represent their contentder richter2024-03-2110-94/+88
| | | | also optimise option cache setup.
* mac/libmpv: remove mac option handling in favour of option handlerder richter2024-03-212-18/+4
| | | | | | since the option handler is not optional anymore and available on init in cocoa-cb we don't need to duplicate this functionality in libmpv anymore.
* mac/option: make option helper none optionalder richter2024-03-217-80/+50
| | | | gets rid of some unwrapping boilerplate and nil coalescing operators.
* mac/option: make option helper vo struct independentder richter2024-03-214-12/+12
|
* mac/option: optimise option pointer accessder richter2024-03-211-3/+4
|
* mac/option: remove unused and obsolete variablesder richter2024-03-213-8/+3
|
* mac/option: move option functionality from mpv helper to option helperder richter2024-03-2110-99/+99
| | | | delete now empty mpv helper
* mac/type: move c<>swift type bridging into a dedicated type helperder richter2024-03-218-90/+109
|
* meson: conditionalize searching for ANGLE's EGLsfan52024-03-211-2/+3
|
* meson: get rid of 'egl-helpers' featuresfan52024-03-212-4/+3
| | | | This was just redundant because it's always present together with 'egl'.
* meson: fix EGL version checksfan52024-03-211-1/+1
|
* video/egl_helpers: fix fallback logic for EGL_KHR_create_contextsfan52024-03-211-3/+4
| | | | | | | | | | | | Both possible paths had bugs: For OpenGL it passed EGL_CONTEXT_CLIENT_VERSION, which - in older versions of the standard - was not permitted. For GLES it always assumed EGL_CONTEXT_FLAGS_KHR to work, which belongs to the aforementioned extension. Ironically this was never a problem (probably saved by implementations not being overly strict) except in 2024 on an emulated Android 14 device that trips over this edge case. It is a mystery.
* video/egl_helpers: log error for eglCreateContextsfan52024-03-211-1/+2
|
* options: add --input-commands optionDudemanguy2024-03-217-0/+48
| | | | | | | Basically a simple way to perform any command/property action from the command line. This takes the exact same syntax as input.conf but not including the key naturally. Potentially useful for weird properties that don't map well to options (like ao-volume). Fixes #12353.
* console.lua: complete fixed precision propertiesGuido Cella2024-03-211-1/+1
| | | | | Add support for the syntax introduced by 8708f4dc91 in the completion system.
* test: fflush output stream before abortKacper Michajłow2024-03-211-0/+6
| | | | For `meson test` to not eat lines on abort.
* m_property: add `>` for fixed precision floating-point expansionKacper Michajłow2024-03-2112-34/+176
| | | | | | | | | | | | | | This enhancement makes it easier to create constant width property expansions, useful for the `--term-status-msg`. Additionally, it changes to `%f` printing with manual zero trimming, which is easier to control than `%g`. With this method, we can directly specify precision, not just significant numbers. This approach also avoids overly high precision for values less than 1, which is not necessary for a generic floating-point print function. A new print helper function is added, which can be used with adjusted precision for specific cases where a different default is needed. This also unifies the code slightly.
* osc.lua: escape textGuido Cella2024-03-212-11/+6
| | | | | | | | | | | | | | | | | | | | Escape all messages in osc.lua, because other than the title they weren't being escaped at all. If for example you did mpv foo.mp4 '{\fs50}bar.mp4' and script-message osc-playlist, it would just render the second entry as bar.mp4 in big text. The title was escaped partially, now the escaping is complete because: - It escapes \. Backslashes at the end of the title are escaped instead of being stripped, and \n, \N and \h are now printed verbatim. In particular, "\\n" is no longer converted to space and is printed verbatim instead which is more correct. - Newlines ("\n", not the "\\n" escape sequence) are converted to spaces instead of rendering them and messing up the text positioning within the OSC. - Spaces at the start are preserved. Fixes #11209, fixes #11275.
* command: add escape-assGuido Cella2024-03-217-28/+41
| | | | | | | | | | | | | | | | | This adds a command to escape ASS tags to remove code duplication between sub/osd_libass.c, console.lua, osc.lua, stats.lua and any user script that calls mp.create_osd_overlay(). A command is used instead of scripting functions so that all clients can use this and not just use Lua and JS ones. osd_mangle_ass() also interprets osd-sym-cc and osd-ass-cc/{0,1}, but since they use invalid UTF-8 characters there is no risk of escape-ass users using them by accident, like with any OSD message. Always replacing \n with \\N in mangle_ass() even when it is not called by escape-ass doesn't seem to cause any issue, but I made it conditional anyway to avoid changing how all OSD messages are treated unnecessarily.
* input: remove max active section limitnanahi2024-03-211-15/+10
| | | | | | | | | | | 585d8c6856e8eaf77c518ad4679e8c66660fc440 increased max active section limit from 5 to 50 but this obviously doesn't properly fix the problem. Input still breaks if more than 25 scripts are loaded, or if some scripts define lots of input sections. Remove the limit completely by using a dynamic array for active sections. Fixes: https://github.com/mpv-player/mpv/issues/13707
* input: raise maximum key down limit to 16nanahi2024-03-211-1/+1
| | | | | The current limit of 4 is stupidly low, and won't be future proof in case proper multi-touch support is added.
* stats.lua: use term-size as terminal output sizeChristoph Heinrich2024-03-211-3/+4
| | | | | | | The terminal output was static in size with no way of automatically adjusting it to the current terminal size. The new term-size property makes truly automatic adjustment possible.
* player/command: add term-size/[w,h] propertyChristoph Heinrich2024-03-213-0/+33
| | | | | | There was no way for scripts to know the current size of the terminal, which is essintial if they want to provide a good user experience even without a window.
* stats.lua: fix and unify scroll hintChristoph Heinrich2024-03-211-10/+11
| | | | | | | | The scroll hint on page 4 had baked in ass tags, which shouldn't be there in the terminal. Also the scroll hint on page 0 was missing. Refactor scroll hint generation into a function and use that for pages 2, 4 and 0.
* stats.lua: use term_ellipsis for page 4Christoph Heinrich2024-03-211-16/+7
| | | | | Page 4 might as well use the same line shortening function as the other pages instead of rolling it's own.
* stats.lua: truncate long lines for the terminalChristoph Heinrich2024-03-212-30/+113
| | | | | | | | | | | | | | | The terminal is assumed to be 80x24 in size, the new options `term_width_limit` and `term_height_limit` can be used to overwrite that. Lines longer then the terminal width cause problems with scrolling pages and need to be shortened. The algorithm used for shortening can deal with tabs and escape sequences, has rudimentary support for UTF-8 and runs in O(n). avih helped in the creation of the term_ellipsis() function and split() is also from him.
* stats.lua: use scroll function for page 2 and 0Christoph Heinrich2024-03-211-52/+30
| | | | | | | | | | | | | | Pages 2 and 0 had their own scroll implementations, which worked fine for ass, but didn't work well in the terminal. Now they both use the same scroll function as page 4. That scroll function requires each output line to be one entry in the table. Page 0 did not adhere to that new requirement, instead it generated two table entries for a single output line when a graph is shown. To fulfill that requirement the generated graph now gets directly appended to the same table entry that's used for the rest of the line.
* stats.lua: refactor page 4 scrolling into functionChristoph Heinrich2024-03-211-10/+24
| | | | | | | | This scrolling implementation will be used for other pages in future commits. The comment said it takes up 20 lines of the terminal, but in reality it was 22 lines.
* stats.lua: add more information in audio sectionKacper Michajłow2024-03-211-6/+21
| | | | | | | | - current AO - AO device - AO volume - audio delay - output format
* msg: clear buffered status_line on flushKacper Michajłow2024-03-211-0/+1
| | | | It shouldn't be used after flush anymore.
* msg: simplify the line_skip calculationKacper Michajłow2024-03-211-13/+7
| | | | | | | | | | | Make it more straightforward by always calculating top offset first instead of having two branches, that tries to calc it directly. This also fixes missing negative check before `\033[%dA` which was in practice only problem on macOS which was handling negative values, while in fact it shouldn't. Fixes: #13484
* 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.
* DOCS: document the new way to handle interface changesDudemanguy2024-03-205-10/+30
| | | | | | | Manually editing interface-changes.rst is a giant maintenance pain that causes merge conflicts all the time. Stop doing that nonsense and instead have changes be written to files in DOCS/interface-changes. Also remove that one sentence in changes.rst because it's just not true.
* meson: remove winmm dependency for win32 desktop targetnanahi2024-03-192-3/+1
| | | | Not needed anymore as timeBeginPeriod() is removed.
* win32: increase hires timer resolutionnanahi2024-03-195-21/+40
| | | | | | | | | | | timeBeginPeriod() only allows setting minimum timer resolution to 1 ms. However, modern x86 platforms support a minimum timer resolution of 0.5 ms. Use NtSetTimerResolution() instead for the increased resolution, which can be set with MPV_HRT_RES. Additionally, change the units of mp_start_hires_timers(), mp_end_hires_timer(), MPV_HRT_RES, and MPV_HRT_MAX to nanoseconds, in accordance with other functions used in timer.h.
* win32: avoid multi byte string to wide conversion if not neededKacper Michajłow2024-03-191-5/+18
|
* win32: add puts/fputs wrappersKacper Michajłow2024-03-196-15/+66
|
* win32: optimize mp_vfprintf a littleKacper Michajłow2024-03-195-24/+37
| | | | | | | | - remove redundant strlen/wcslen - reuse allocated temporary buffers The difference is not big, but it satisfies me to remove those redundancies.
* misc/bstr: add bstr_to_wchar for win32Kacper Michajłow2024-03-192-0/+26
| | | | Convenience to avoid strlen above other things.
* player/main: move terminal_uninit to the endKacper Michajłow2024-03-191-5/+6
| | | | | It is strange to do terminal_uninit() and still use terminal after. Even tho it has no side-effects.
* win32: cache GetConsoleMode state for stdout/stderrKacper Michajłow2024-03-195-33/+45
| | | | | | | GetConsoleMode() can be quite slow and in mpv the mode never changes, so we can just check it once. Fixes performance when writing lots of logs to terminal.
* win32: don't touch buffering optionsKacper Michajłow2024-03-191-1/+0
|
* win32-console-wrapper: fix printf specifiersKacper Michajłow2024-03-191-1/+1
| | | | | | | | | | | %s is evaluated as wchar_t only in "Windows classic" semantic. It is not C standard compliant. %ls is compatible with both and means the same wchar_t format. This commit fixes error output from mpv.com. See: https://devblogs.microsoft.com/oldnewthing/?p=102823
* win32: don't pass std handles if they are attached to consoleKacper Michajłow2024-03-191-15/+20
| | | | | | | | | | | This is default behavior to attach to existing console, passing custom handles is useful if we want to replace them, but in case they are already attached to console we want to attach to console directly. In theory, it should work out of the box because "console-like" handles should be managed by Windows internally, which works for INPUT and OUTPUT, but in certain cases, not for ERROR. This allows using VT features in those cases for stderr too.
* DOCS/options: improve wording of dither-depthllyyr2024-03-191-6/+6
|
* af_lavcac3enc: fix memory leak on 2ch audiomistraid1212024-03-191-3/+3
| | | | If processing is not required, the frame would be leaked as it is not used.
* various: use thread safe mp_strerror()nanahi2024-03-194-6/+9
|
* image_writer: refactor screenshot write functionsnanahi2024-03-191-50/+24
| | | | | | | | | | | | When 3cb9119984b88b31a5b958b1b83efe8d1cf0b818 introduced AVIF screenshot support, FILE * in write functions were replaced by filenames. This resulted in unnecessary duplication of FILE * handling code and the usage of avio_open API made it hard to use exclusive open with it. To unify file handling, use avio_open_dyn_buf instead which writes to memory instead. This way FILE * can be used for the write functions and file handling code can be deduplicated. Since we now control the file opening, exclusive open can now be used for AVIF screenshots.
* image_writer: fix TOCTOU in screenshot filename generationnanahi2024-03-195-16/+32
| | | | | |