summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* af_scaletempo2: fix false reporting of frame availabilityHEADmasternanahi2 hours1-1/+2
| | | | | | | | | | | | | | | With certain speed settings, the following can happen at the start of the playback: - can_perform_wsola returns false, so no frames are written - mp_scaletempo2_frames_available returns true when p->input_buffer_final_frames is 0 and target_block_index < 0 This results in infinite loop and completely stalls audio filter processing and playback. Fix this by only checking this condition after the final frame is set. Fixes: 8080d00d7f31a0e1ba25418e0f08474f1a2f1f61
* vo_gpu: support video-target-paramsnanahi20 hours3-0/+27
|
* vo_direct3d: support video-target-paramsnanahi20 hours1-0/+13
| | | | The backbuffer format is available.
* vo_xv: support video-target-paramsnanahi20 hours1-0/+8
| | | | | The target colorspace depends on whether the xv adaptor supports setting BT.709 colorspace.
* meson: improve option descriptionssfan52 days1-18/+18
|
* meson: refine dependencies of many feature checkssfan52 days1-41/+55
|
* meson: remove some unneeded features from listsfan52 days1-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 defaultssfan53 days1-5/+2
| | | | | I missed this. fixes: 8e3737ab633ba096fcf9f2da2391f84690bd1b4c
* demux_mkv: support V_FFV1 tagvaladaptive3 days1-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łow3 days1-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 loaderAndarwinux3 days1-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 richter4 days2-4/+12
|
* mac/touchbar: use AppHub directly instead of the singletonder richter4 days1-2/+3
|
* mac/remote: use AppHub directly instead of the singletonder richter4 days1-2/+3
|
* mac/touchbar: use EventHelper for event handlingder richter4 days4-66/+22
| | | | also remove remaining old event handling.
* mac/touchbar: move touch bar into AppHubder richter4 days2-1/+7
|
* mac/remote: use EventHelper for event handlingder richter4 days2-50/+37
|
* mac/touchbar: fix devision by 0der richter4 days1-1/+1
|
* mac/remote: fix devision by 0der richter4 days1-1/+1
|
* cocoa-cb: use EventHelper for event handlingder richter4 days3-26/+15
|
* cocoa-cb: use a separate mpv_handle for cocoa-cb to simplify shutdownder richter4 days4-27/+16
|
* mac/apphub: migrate remaining events functionality to new AppHubder richter4 days14-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 richter4 days3-0/+167
| | | | | preparation to remove duplicate code from all classes that implement their own observer loops.
* hwdec/vulkan: enable the stable AV1 extensionLynne4 days1-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 nameAndarwinux4 days1-1/+1
|
* ao_pulse: reenable latency hacks by defaultsfan54 days2-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 Tao6 days1-2/+2
|
* mac/libmpv: remove unused functionsder richter7 days1-37/+0
|
* mac: optimise and shorten some codeder richter7 days3-15/+6
|
* mac/option: remove now unused computed option variablesder richter7 days2-2/+0
|
* mac/option: rename option structs to properly represent their contentder richter7 days10-94/+88
| | | | also optimise option cache setup.
* mac/libmpv: remove mac option handling in favour of option handlerder richter7 days2-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 richter7 days7-80/+50
| | | | gets rid of some unwrapping boilerplate and nil coalescing operators.
* mac/option: make option helper vo struct independentder richter7 days4-12/+12
|
* mac/option: optimise option pointer accessder richter7 days1-3/+4
|
* mac/option: remove unused and obsolete variablesder richter7 days3-8/+3
|
* mac/option: move option functionality from mpv helper to option helperder richter7 days10-99/+99
| | | | delete now empty mpv helper
* mac/type: move c<>swift type bridging into a dedicated type helperder richter7 days8-90/+109
|
* meson: conditionalize searching for ANGLE's EGLsfan57 days1-2/+3
|
* meson: get rid of 'egl-helpers' featuresfan57 days2-4/+3
| | | | This was just redundant because it's always present together with 'egl'.
* meson: fix EGL version checksfan57 days1-1/+1
|
* video/egl_helpers: fix fallback logic for EGL_KHR_create_contextsfan57 days1-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 eglCreateContextsfan57 days1-1/+2
|
* options: add --input-commands optionDudemanguy7 days7-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 Cella7 days1-1/+1
| | | | | Add support for the syntax introduced by 8708f4dc91 in the completion system.
* test: fflush output stream before abortKacper Michajłow8 days1-0/+6
| | | | For `meson test` to not eat lines on abort.
* m_property: add `>` for fixed precision floating-point expansionKacper Michajłow8 days12-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 Cella8 days2-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 Cella8 days7-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 limitnanahi8 days1-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 16nanahi8 days1-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 Heinrich8 days1-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 Heinrich8 days3-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 Heinrich8 days1-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 Heinrich8 days1-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 Heinrich8 days2-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 Heinrich8 days1-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 Heinrich8 days1-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łow8 days1-6/+21
| | | | | | | | - current AO - AO device - AO volume - audio delay - output format
* msg: clear buffered status_line on flushKacper Michajłow8 days1-0/+1
| | | | It shouldn't be used after flush anymore.
* msg: simplify the line_skip calculationKacper Michajłow8 days1-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 scriptDudemanguy8 days1-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 changesDudemanguy8 days5-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 targetnanahi9 days2-3/+1
| | | | Not needed anymore as timeBeginPeriod() is removed.
* win32: increase hires timer resolutionnanahi9 days5-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łow9 days1-5/+18
|
* win32: add puts/fputs wrappersKacper Michajłow9 days6-15/+66
|
* win32: optimize mp_vfprintf a littleKacper Michajłow9 days5-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łow9 days2-0/+26
| | | | Convenience to avoid strlen above other things.
* player/main: move terminal_uninit to the endKacper Michajłow9 days1-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łow9 days5-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łow9 days1-1/+0
|
* win32-console-wrapper: fix printf specifiersKacper Michajłow9 days1-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łow9 days1-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-depthllyyr9 days1-6/+6
|
* af_lavcac3enc: fix memory leak on 2ch audiomistraid1219 days1-3/+3
| | | | If processing is not required, the frame would be leaked as it is not used.
* various: use thread safe mp_strerror()nanahi9 days4-6/+9