summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* osdep/w32_keyboard: remove duplicated MP_KEY_BACK mappingKacper Michajłow2023-11-111-1/+0
| | | | | | | MP_MBTN_BACK is already mapped, the appcmd duplicates this. Fixes: #12768 Fixes: 8301906
* wayland: obey initial size hints set by the compositorDudemanguy2023-11-102-11/+19
| | | | | | | | | In the past, this worked by accident because the initial startup was racy and sometimes the initial firing of handle_toplevel_config would happen after reconfig. Since we now properly wait on all compositor events we can save the initial size hint that is given to us and try to use that as the window-size/geometry provided the --autofit/geometry options aren't explictly set. Fixes #11134.
* cocoa: remove OpenGL cocoa backendder richter2023-11-1014-2330/+4
| | | | | | the OpenGL cocoa backend was deprecated in 0.29, it has lot of bugs, is completely unmaintained and can't properly playback anything anymore on the newest macOS. it is time to remove it.
* mac: change display name retrieval to localizedName NSScreen propertyder richter2023-11-103-33/+4
| | | | | | | | | | | | | | | the old displayName property via the IODisplay API is not working anymore on ARM based macs and was broken in at least one other case. instead we use the new localizedName property introduced in 10.15 of the NSScreen. we don't need any backwards compatibility since 10.15 is the oldest version we support now. configs and scripts that use the options and properties fs-screen-name, screen-name or display-names need to be adjusted since the names could differ from the previous implementation via the IODisplay API. Fixes #9697
* mac: fix build on older swift versionsder richter2023-11-101-5/+5
| | | | | | | | | | this is apparently something that was added with swift 5.5, though it is hard to find anything officially. don't capture self in closure but explicitly access all variables by prepending self. Fixes #12653
* TOOLS/macos-sdk-version: remove legacy sdk version retrievalder richter2023-11-102-29/+12
| | | | | | | | | | | | | | | | | | | | | | | 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
* vo_gpu_next: overwrite cache files atomicallysfan52023-11-101-2/+7
|
* osdep/io: implement rename() wrappersfan52023-11-102-0/+16
| | | | | This is needed to provide the POSIX behaviour of transparently overwriting existing paths.
* vo_gpu_next: refactor cache saving codesfan52023-11-101-33/+33
| | | | No functional change.
* DOSC/input: clarify a couple of commands where no-osd has no effectDudemanguy2023-11-091-2/+2
| | | | | This should be the intuitive expectation, but it's worth noting the deviation.
* player/command: make show-progress work regardless of osd prefixDudemanguy2023-11-091-0/+4
| | | | | | Having the show-progress command obey no-osd is nonsensical and unintuitive. The show-text command already ignores no-osd, so there's precedence for this. Fixes #5662.
* vo: don't sleep 1ms always when requested time is in the pastKacper Michajłow2023-11-095-6/+16
| | | | | | | | | | | | | | Fixes a899e14b which changed clamp from 0 to 1 ms which effectivelly introduced 1ms sleep always, even if requested until_time_ns is in the past and should request 0 timeout. While at it also fix mp_poll wrapper to respect negative timeout which should mean infinite wait. Also keep the 37d6604 behaviour for very short timeouts, but round only the ones > 100us, anything else is 0. Fixes: a899e14b
* vo: replace some magic numbers with timer macrosDudemanguy2023-11-091-5/+5
| | | | | | | | | | Most importantly, the wait_until addition was missed while doing the unit conversions to nanoseconds which meant mpv woke up roughly every second since not nearly enough time was added. It was meant to be 1000 seconds (1e9 in microseconds). Use a macro so it's more readable. Also put some other wild 1e9 calculations inside of a macro as well. Fixes a899e14bccb667af243f8fce454160e17ae45c2a.
* demux/lavf: don't use deprecated side dataKacper Michajłow2023-11-091-5/+26
| | | | | | | Fixes rotation metadata no longer works. See: https://github.com/FFmpeg/FFmpeg/commit/5432d2aacad5fa7420fe2d9369ed061d521e92d6 Fixes: #12836
* editorconfig: add max lineNRK2023-11-091-0/+5
| | | | | | | if we're going to have an editorconfig, might as well make it accurately reflect the coding guide. also set trim trailing whitespace to true.
* mac: remove runtime checks and compatibility for macOS older than 10.15der richter2023-11-0917-214/+47
| | | | | we stopped supporting macOS older than 10.15 and hence can remove all the unnecessary runtime checks and compatibility layers.
* meson: remove several macos-10-* build optionsDudemanguy2023-11-095-54/+4
| | | | | | | | | | | These have been build options since the waf build, but that doesn't really make sense. The build can detect whatever macOS sdk version is available and then use that information to determine whether to enable the features or not. Potentially disabling multiple sdk versions doesn't really make any sense. Because f5ca11e12bc55d14bd6895b619c4abfd470c6452 effectively made macOS 10.15 the minimum supported version, we can drop all of these checks and bump the required sdk version to 10.15. The rest of the build simplifies from there.
* player/loadfile: remove blank line on exitKacper Michajłow2023-11-081-1/+0
|
* msg: ensure status line is always visibleKacper Michajłow2023-11-081-1/+27
| | | | Restore last status line if it has been cleared by another message.
* msg: factor out print codeKacper Michajłow2023-11-081-52/+61
| | | | Will be useful for next commit.
* msg: convert dump_stats to bstrKacper Michajłow2023-11-081-5/+3
|
* msg: use bstr for partial msgKacper Michajłow2023-11-081-11/+6
|
* msg: check isatty separately per each streamKacper Michajłow2023-11-081-12/+29
|
* Revert "player: cut off status line on terminal width"Kacper Michajłow2023-11-081-5/+0
| | | | | | | No longer needed, wrapped status line is supported now. Also this didn't work correctly if status were decorated with module name or time. This reverts commit ab6fac43b4bc34949bd9c4da8e911fc9f3489a32.
* Revert "player: don't print status line again when quitting"Kacper Michajłow2023-11-081-5/+2
| | | | | | This workaround is not longer needed. This reverts commit cdc05c33b33d958a8877851bd5942adbb856f5e4.
* msg: refactor how terminal messages are printedKacper Michajłow2023-11-081-99/+156
| | | | | | | | | | | | - prepare string before printing - reduce amount of fflush(), especially for multiline messages - clear status line and keep it always at the bottom - indent module name to the longest value - disable cursor for status line - properly support wrapped status line Overall makes status line less flickering and remove stray status instead of scrolling them up.
* stats.lua: disable ASS formatting when printing to terminalKacper Michajłow2023-11-081-1/+1
|
* msg: don't mix partial log messages, with unrelated log levelsKacper Michajłow2023-11-081-9/+11
|
* vo: replace VOCTRL_HDR_METADATA with direct VO params readKacper Michajłow2023-11-085-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently VOCTRL are completely unusable for frequent data query. Since the HDR parameter addition to video-params, the parameters can change each frame. In which case observe on those parameter would be triggered constantly. The problem is that quering those parameters involves VOCTRL which in turn involves whole render cycle of delay. Instead update VO params on each draw_frame. This requires changes to VO reconfiguration condition, but in practice it should only be triggered when image size or data layout changes. In other cases it will be handled internal by VO driver. I'm not quite happy with this solution, but don't see better one without changing observe/notify logic significantly. There is no good way currently to handle VOCTRL that are constantly queried. This adds unfortunate synchronization of player command with VO thread, but there is not way around that and if too frequent queries of this param becomes a problem we can thing of other solutions. Changes the way to get data from VO driver added by a98c5328dc Fixes: 84de84b Fixes: #12825
* audio: avoid unnecessary silence padding in read_buffer()Thomas Weißschuh2023-11-081-11/+14
| | | | | Not all callers of read_buffer() require the buffer to be padded with silence.
* ao_audiotrack: switch to ao_read_data_nonblocking()Thomas Weißschuh2023-11-081-1/+1
|
* ao_coreaudio: switch to ao_read_data_nonblocking()Thomas Weißschuh2023-11-081-1/+1
|
* ao_pipewire: switch to ao_read_data_nonblocking()Thomas Weißschuh2023-11-081-1/+1
| | | | Avoid blocking the process callback as it runs with realtime privileges.
* audio: introduce ao_read_data_nonblocking()Thomas Weißschuh2023-11-083-10/+40
| | | | | This behaves similar to ao_read_data() but does not block and may return partial data.
* threads-win32: add comment about local decl of a functionKacper Michajłow2023-11-081-0/+1
|
* threads-win32: support UWP in mp_thread_set_nameKacper Michajłow2023-11-081-3/+7
|
* meson: add missing source file for UWPKacper Michajłow2023-11-081-1/+2
|
* osdep/threads-posix: use CLOCK_MONOTONIC if supportedKacper Michajłow2023-11-082-10/+60
|
* osdep/timer-linux: check clock availability on initKacper Michajłow2023-11-081-6/+21
|
* DOCS/option: discourage the use of video-latency-hacks a bit moreDudemanguy2023-11-081-1/+2
| | | | | Who knows why this exists but maybe it's possibly useful in some obscure case. Probably worth mentioning that it could break other options.
* vo_gpu_next: add --target-gamut optionNiklas Haas2023-11-085-0/+17
| | | | Fixes: https://github.com/mpv-player/mpv/issues/12777
* stats.lua: remove unused variableGuido Cella2023-11-071-3/+0
| | | | 056072bf95 deleted the only use of property_list.
* console.lua: don't print the console log to the OSD when switching VOGuido Cella2023-11-071-1/+8
| | | | Fixes #12735, fixes #12839.
* player/command: handle force window on runtime vo changesDudemanguy2023-11-071-0/+1
| | | | | Without this, changing the vo at runtime with --force-window --idle would kill the vo.
* stats: don't overwrite color and alpha of `osd-back-color`Christoph Heinrich2023-11-071-4/+6
|
* console: don't overwrite color and alpha of `osd-back-color`Christoph Heinrich2023-11-071-2/+3
|
* sub: add --sub-stretch-durations optionMohammad AlSaleh2023-11-074-1/+12
| | | | | | | | | Stretch a subtitle duration so it ends when the next one starts. Should help with subtitles which erroneously have zero durations. I found such a subrip substitles stream in the wild. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* player/command: fix typo in sig-peak value computationKacper Michajłow2023-11-071-1/+1
| | | | Fixes: 73fbe09a49d3ed00c6e19fdcc658802f28974ae2
* win32: fix hit test using client rc instead windowKacper Michajłow2023-11-071-16/+20
| | | | | | | | | windowrc in vo_w32_state is actually client size, for hit test we need proper window size. When border is disabled those sizes are the same, but when only title bar is disabled it is not. Reduce the hit area to more sane values when the border is not drawn to minimize amount of covered client area in borderless mode.
* vo_gpu: apply ICC profile and dithering only to window screenshotssfan52023-11-072-10/+14
|
* vo_gpu_next: drop alpha channel from screenshots if unneededsfan52023-11-071-1/+5
|
* image_writer: improve format conversion loggingsfan52023-11-071-2/+6
|
* console: wrap rows at the topChristoph Heinrich2023-11-071-8/+6
| | | | | | | | | | The previous commit was already a big improvement, but it was still somewhat slow on the lua interpreter. By wrapping the table at the top we loose the consistent placement of items while resizing (at least as long as the column count didn't change), but we avoid taking all the off screen items into account. The fewer items fit on screen the faster this becomes.
* console: optimize table generationChristoph Heinrich2023-11-071-20/+32
| | | | | | | | | | | Showing all properties was terribly slow. Instead of starting at one row and increasing the row count until it fits, the column count can be increased until it doesn't fit anymore. That alone already reduces the required iterations, but from the column count an upper and lower bound for the row count can be calculated. For large tables this dramatically reduces the amount of iterations.
* console: enable completions without a prefixChristoph Heinrich2023-11-071-4/+4
| | | | | | This way it is possible to get a list of all options or all properties, instead of having to guess the first letter before any suggestions are shown.
* console.lua: complete raw propertiesGuido Cella2023-11-071-1/+1
|
* console: avoid redundant completion appendageChristoph Heinrich2023-11-071-2/+36
| | | | | | So far completing something like `${some-pro}` with the cursor between `o}` would result in `${some-property}}`. Adding that superfluous `}` can be avoided by checking if it's already in the string after the cursor.
* present_sync: remove unneeded clear_values functionDudemanguy2023-11-073-13/+0
| | | | | | | | | This was specifically special logic for drm. Before present_sync, it would also clear out all of its vsync values like this. The old drm code would save a bunch of samples which would confuse vo.c when unpausing since it got old, bogus values. Since we make sure to match successive vsync samples with the swapchain depth and that present sync samples also match the swapchain depth, this is unneeded.
* vo: require successive vsyncs to be more than swapchain depthDudemanguy2023-11-071-1/+1
| | | | To make sure that present_sync is in line with the vsync timings here.
* present_sync: only save as many entries as the swapchain depthDudemanguy2023-11-075-7/+10
| | | | | | Saving more than the swapchain depth is just wasteful. We can just save a copy of the vo_opts here and check the value whenever we're updating values.
* vo: replace max swapchain depth magic numberDudemanguy2023-11-075-5/+6
|
* DOCS/mpv: consistent formatting of keybindingsChristoph Heinrich2023-11-071-12/+12
|
* DOCS/console: correct capitalization of keybindingsChristoph Heinrich2023-11-071-19/+19
|
* wayland: improve wl_output guessing before mpv window is mappedDudemanguy2023-11-062-4/+12
| | | | | | | | | | | | | | | | | | | | There's some geometry-related things that mpv has to calculate before the window is actually mapped onto the screen in wayland. But there's no way to know which output the window will end up on before it happens, so it's possible to calculate it using the wrong values. mpv corrects itself later when the surface event happens, but making the initial guess work better can help in certain cases. find_output is the only thing that needs to be changed here. Its main purpose is to grab the right output based on user settings when we're trying to full screen and giving a fallback in case we don't have wl->current_output yet. The x11 code already does something similar, so we're basically just copying it. Allow user settings like --screen and --screen-name to influence the initial wl_output guess. Those options won't actually place the window on that specific screen since we can't do that in wayland, but if the user knows where the window will end up beforehand it makes sense to listen to the arguments they pass. If something goes wrong, then we just fallback to 0 like before.
* sub: adjust offsets when sub seeking/steppingDudemanguy2023-11-063-7/+10
| | | | | | | | | | | | | | | | | | | | | In the sub seek code path, there was an arbitrary small offset added to the pts before the seek. However when seeking backwards, the offset was an additional subtraction. de6eace6e984be3cd2515e9be6362a0cf04b7457 added this logic 10 years ago and perhaps it made sense then, but the additional subtraction when seeking backwards causes the subtitle seek to go too far to the previous subtitle if the durations overlap. This should always be an addition to work correctly. Additionally, the sub stepping code path also could use this offset for the same reason (duration overlaps). However, it is only applicable to sd_ass not sd_lavc. sd_lavc has step_sub support but on a sample it didn't even work anyway. Perhaps it only works for certain kinds of subtitles (patches welcome). Anyways instead of keeping this offset as a magic number, we can define it in sd.h which is handy for this. For sd_ass, we add the offset when sub stepping, and the offset is always added for sub seeking like it was before. Update the comment to be a little more relevant to what actually happens today. Fixes #11445.
* DOCS/input: stop documenting vf delGuido Cella2023-11-061-7/+0
| | | | Because b56e63e2a9 removed it.
* dec_sub: always copy packet for new segmentsDudemanguy2023-11-061-1/+1
| | | | | | | | | | | Since 062104d16e34f348ffd9324ca4c997b6b0f487d4, we started saving cached packets for subtitles. However, these can point to the same address as what is stored in sub->new_segment. When a segment is updated, the packet is potentially freed. Later during decoding, this can lead to a double free since the cached packets will naturally try to free itself and update. Fix this by simply always making sub->new_segment a full copy of the packet so its lifetime doesn't have to be tied to the cached packet stuff.
* drm: use present_sync mechanism for presentation feedbackDudemanguy2023-11-066-122/+40
| | | | | | | | | | | A ton of code and drm-specific abstractions can be dropped with this. One important thing to note is that the usage of sbc is completely dropped here. The utility of that is not particularly clear since the sbc value was manually incremented before the flip and it's not as if the drm page flip event gives it to us like it does with the msec and ust. It can be reintroduced later if there is a need. For drm, we also add a present_sync_clear_values helper since all presentation feedback needs to be cleared on pause/resume for it.
* present_sync: rename function to present_sync_update_valuesDudemanguy2023-11-064-4/+4
| | | | This had to have been a mistake. It was just confusing.
* present_sync: rewrite around linked listDudemanguy2023-11-064-33/+81
| | | | | | | | | | | | | | | | | | | | | | | | | When this was originally written, the queuing/list approach was deliberately removed since it adds more complication and xorg/wayland don't really use it anyway. In practice, you only really have one frame in flight with presentation timestamps. However, one slight annoyance is that the drm code h