summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ao_pipewire: use proper hotplug init APIsThomas Weißschuh2022-09-111-8/+13
|
* ao_pipewire: create is_sink_node helperThomas Weißschuh2022-09-111-8/+16
|
* audio: list devices for all AOs with hotplug_initThomas Weißschuh2022-09-111-4/+7
| | | | | | | | | | | | | | Previously we would only call list_devs() on available AOs if an AO *did not* have a hotplug_init() callback or for the first one that *did* have it. This is problematic when multiple fully functional hotplug-capable AOs are available. The second one would not be able to contribute discovered devices. This problem prevents ao_pipewire from introducing full hotplug support with hotplug_init().
* audio: try to use playback AO as hotplug AO firstThomas Weißschuh2022-09-114-10/+26
| | | | | | | | | | | | | | | | | | | | | When a platform has multiple valid AOs that can provide hotplug events we should try to use the one that also provides playback. Concretely this will help when introducing hotplug support for ao_pipewire. Currently ao_pulse is probed by ao_hotplug_get_device_list() before ao_pipewire and on the common setups where both AOs could work pulse will be selected for hotplug handling. This means that hotplug_init() of ao_pipewire will never be called and list_devs() has to do its own initialization. But if ao_pulse is non-functional or not compiled-in suddenly ao_pipewire *must* implement hotplug_init() for hotplugging events to work for all. Also if the hotplug ao_pulse connects to a PulseAudio instance that is not emulated by the same PipeWire instance as the playback ao_pipewire the hotplug events are useless.
* ta: increase size of names printedThomas Weißschuh2022-09-111-1/+1
| | | | | | | 30 characters are not a lot. Also when the name is calculated from the allocation site the line number will be the at the end of the name, so truncating it is especially inconvenient.
* ao_pipewire: handle AOCONTROL_UPDATE_MEDIA_ROLEThomas Weißschuh2022-09-101-2/+22
|
* audio: add AOCONTROL_UPDATE_MEDIA_ROLEThomas Weißschuh2022-09-104-0/+37
| | | | | | This is used to notify an AO about the type of media that is being played. Either a movie or music.
* ao_pipewire: fix indentThomas Weißschuh2022-09-101-7/+7
|
* repack: add repacker for ccc16x16 formatsPhilip Langdale2022-09-101-9/+12
| | | | | | | | | | | | I'm adding support in ffmpeg for the XV36 format which will be used by VAAPI for 12bit 4:4:4 content. It's an undefined-alpha channel variant of Y412 which is itself a 12bit+4bits padding variant of Y416. We currently have a repacker for full four channel cccc16, and for three channel ccc16, but nothing for ccc16x16 with the undefined alpha channel. It's simple enough to add one using the existing macros.
* mpv.metainfo.xml: add XDG appstream metadata manifestVitaly Zaitsev2022-09-093-0/+34
|
* DOCS: Mention "mono" audio channels optionCairn2022-09-091-3/+3
|
* DOCS/libmpv: fix typo in linkage section257924312022-09-031-1/+1
|
* w32: fix typo in F23 mappingThomas Weißschuh2022-09-031-1/+1
|
* vo_gpu_next: fix typo affecting --target-trc optionTillmann Karras2022-09-021-1/+1
|
* macos: add support for F13-F20 keysThomas Weißschuh2022-09-021-0/+3
|
* w32: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+4
| | | | Fixes #10595
* x11: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+4
|
* wayland: add support for F13-F24 keysThomas Weißschuh2022-09-021-0/+6
|
* input: add function keys F13-F24Thomas Weißschuh2022-09-021-0/+12
|
* ad_lavc: strip non-normalized floatsNiklas Haas2022-09-023-0/+35
| | | | | | | `opus` codec likes returning denormalized floats in some cases, causing wacky issues. Fixes #10290
* vo_gpu_next: display subtitles without video streamNiklas Haas2022-08-311-1/+2
| | | | Fixes https://github.com/mpv-player/mpv/issues/10594
* DOCS/options: update vd-lavc-skiploopfilter, skipidct and related descriptionssfan52022-08-311-5/+7
| | | | Cross-checked the current functionality of these with the FFmpeg source.
* DOCS/mpv: remove spaces at EOL, ensure 80 colsAvi Halachmi (:avih)2022-08-291-4/+5
| | | | These are fixes for the previous commit.
* DOCS/mpv: added COMMAND INTERFACE refs to INTERACTIVE CONTROLenly12022-08-291-3/+5
| | | | Added COMMAND INTERFACE references to make it easier for new users.
* ao_pipewire: for_each_sink(): report errorsThomas Weißschuh2022-08-281-9/+32
|
* meson: fix condition for enabling vaapi-eglOwen Rafferty2022-08-271-1/+1
|
* meson: fix libplacebo checkNiklas Haas2022-08-261-1/+1
| | | | | | Missing waf quivalent, and doesn't necessarily output a good error message. But I might as well submit this rather than sitting on it unnecessarily.
* audio: fix lack of reinitialization on format change with pull AOsPhilip Langdale2022-08-231-0/+1
| | | | | | | | | | | | uau did some investigation and noticed that we do not send a wakeup event when we encounter end-of-stream in ao_read_data(), in contrast to the equivalent logic for push AOs in ao_play_data(). Inserting that wakeup fixes the original problem of lack of reinitialization on a format change without the problems we saw with the previous attempted fix. Fixes #10566
* player/audio: remove explicit drain on EOFPhilip Langdale2022-08-231-2/+0
| | | | | | | | | | | | | | | We have previously had a problem where pull AOs (such as pipewire) would not reinitialize on a format change when going between two audio-only files. In such a situation, playback would stop after the first file. We initially attempted to fix this by explicitly draining on EOF, which solves that problem but introduces a blocking step where we don't actually want one, breaking gapless audio, and causing dropped frames at the end of playback for files with video in them too. So, let's undo these changes and do something better in the next commit.
* ao_pipewire: make sure not to exceed the available bufferThomas Weißschuh2022-08-211-1/+1
| | | | | | | | | | The error description in #10545 could indicate that we are overflowing we are corrupting the buffer metadata ourselves through out-of-bound writes. This check is also present in pw-cat so it seems to be expected for b->requested to exceed the actual available buffer space. Potential fix for #10545
* audio: don't try to drain non-existent AOThomas Weißschuh2022-08-211-1/+2
| | | | | | | | 52aed495cb ("audio: drain ao on EOF") introduced logic to drain an AO when EOF of the input has been reached. When no AO however is present this leads to a NULL-dereference. Fixes #10556
* vo_gpu_next: pass GL get_proc_addr pointer to libplaceboNiklas Haas2022-08-193-0/+11
| | | | | | | | | | | | | | | | | Facing down the multitude of ways to somehow wrangle the get_fn pointer out of the GL environment and into libplacebo, I decided the easiest is to just store it inside the GL struct itself. The lifetime of this get_fn function is a bit murky, since it's not clear on whether or not it survives the VO init call (especially in the case of the GL render API, which explicitly states that parameters do not need to survive the call they're passed to), so just add a disclaimer. (It's fine for us to use like this because `gpu_ctx_create` is still part of VO init) Closes https://code.videolan.org/videolan/libplacebo/-/issues/216
* ao_pipewire: test on FreeBSDThomas Weißschuh2022-08-182-0/+3
|
* mpv.desktop: add RIST protocol to desktop entryThe-head-obamid2022-08-181-1/+1
|
* osxbundle: add RIST protocol support to app metadataThe-head-obamid2022-08-181-0/+1
|
* stream_lavf: enable RIST protocol support via ffmpegThe-head-obamid2022-08-181-1/+1
|
* ao_pipewire: restructure logic a bitThomas Weißschuh2022-08-171-4/+3
|
* ao_pipewire: only try to read requested dataThomas Weißschuh2022-08-171-0/+4
|
* ao_pipewire: report all available info about chunkThomas Weißschuh2022-08-171-1/+5
| | | | | This allows the audio server better to make sense of the data instead of having to use heuristics.
* ytdl_hook: improve track detectionChristoph Heinrich2022-08-171-13/+12
| | | | | | | | | | | | | | | | Every format that was not detected as a video format was added to the audio tracks. This resulted in e.g. YouTube storyboards from ending up in the list of audio tracks. Now formats that are already known to be neither video formats nor audio formats, will also not end up in any track list. Formats where it is unknown if they are video or audio get added to tracks if `force_all_formats` is used, otherwise only formats that are known to contain video or audio become video or audio tracks respectively. https://github.com/yt-dlp/yt-dlp/issues/4373#issuecomment-1186637357
* misc/random: add xoshiro random number implementationLeo Izen2022-08-178-5/+124
| | | | | | | Add xoshiro as a PRNG implementation instead of relying on srand() and rand() from the C standard library. This, in particular, lets us avoid platform-defined behavior with respect to threading.
* meson: fix the build-date optionDudemanguy2022-08-161-1/+1
| | | | Rewrites are hard.
* meson: fix building without glDudemanguy2022-08-151-0/+1
| | | | This needs to be unconditionally added.
* meson: consistently use feature['foo']Dudemanguy2022-08-151-267/+246
| | | | | | | | | | Since the previous commit introduced the notion of a features dictionary that conveniently tells us whether or not to use a feature in a simple yes/no, we can make use of this everywhere in the build. Instead of doing something like 'if foo.()', change it to 'if feature['foo'] instead. This enforces a consistent standard instead of having a lot of different possible combinations of booleans that may or may not do something.
* meson: refactor generating config.hDudemanguy2022-08-152-413/+239
| | | | | | | | | | | | | | mpv has a ton of defines that are generated during building. Previously, the meson build just had this as a big giant wall of text that manually set each one but we can do this smarter. Instead, change the "features" object to a dictionary and have it hold the name of the feature and its value (true/false on whether it is enabled). Then at the end, just loop through it and reformat the name of the feature so it becomes HAVE_FEATURE. A side effect of this is that a lot of extra defines are generated that aren't actually used in the code, but the waf build worked like this for years anyway. A nice result of this is that the use of foo['use'] internally can be completely eliminated and replaced with feature['foo'] instead when needed.
* meson: disable dvdnav by defaultDudemanguy2022-08-151-1/+1
| | | | | It turns out that this is disabled in waf. Go ahead and copy this in meson for consistency.
* meson: reduce dictionary usageDudemanguy2022-08-151-98/+61
| | | | | | | The build was a bit overzealous with using dictionaries. These are fine for when the feature checking is more complicated, but there's no point in having them for the simplier things. This also eliminates the usage of the 'name' key completely.
* meson: add comment clarifying windows-internal-pthreadsDudemanguy2022-08-151-0/+5
|
* ytdl_hook: consistant behavior for single formatChristoph Heinrich2022-08-141-1/+17
| | | | | | | | | | | | | | One would expect that e.g. `--script-opts=ytdl_hook-all_formats=no --ytdl-format=bestaudio` and `--script-opts=ytdl_hook-all_formats=yes --ytdl-format=bestaudio` to play the exact same tracks without manual intervention. This already worked when two formats were requested. For a single format with `all_formats=yes` it would also play a track that was not requested when available. This was inconsistant with the behavior of `all_formats=no` (default), which would not play a second track when only a single one was requested. This combined with #10395 now plays the exact same tracks with `all_formats=yes` as without, even when only one format is requested.
* wayland: add support for configure boundsDudemanguy2022-08-144-2/+41
| | | | | | | | | | | | | | | In wayland-protocols 1.25, xdg-shell got a version bump which added the configure_bounds event. The compositor can send this to clients to indicate that they should not resize past a certain size. For mpv, we'll choose to only listen to this on reconfig events (i.e. when the window first appears and if the video resolution changes later in the playlist). However, this behavior is still exposed as a user option (default on) because it will neccesarily conflict with a user setting a specific geometry size and/or window scale. Presumably, if someone is setting a really large size that goes beyond the bounds of their monitor, they actually want it like that. The wayland-protocols version is newer-ish, but we can get around having to poke the build system by just using a define that exists in the generated xdg-shell header.
* x11: fix display-{width,height} calculationDudemanguy2022-08-141-3/+9
| | | | | | | | | | | | Unexpectedly, x11->screenrc actually doesn't update with randr events. In a multimonitor configuration it could easily be wrong depending on the user's layout. While it's tempting to modify the logic so screenrc changes with randr events, this rectangle is currently used everywhere and as far as we know, this pretty much works fine. Instead, just loop over the randr displays that we have and select it if it overlaps with the winrc. This follows the same logic as the fps selection in the case of the mpv window overlapping multiple monitors (the last one is selected).
* DOCS/options: correct wayland-disable-vsync optionDudemanguy2022-08-121-4/+3
| | | | | This is actually dated. It works on all wayland outputs/VOs and has for some time now.
* ytdl_hook: fix default track for single formatChristoph Heinrich2022-08-121-2/+2
| | | | | | | | | | | | | | | | | Tracks are marked as default tracks based on what yt-dlp/youtube-dl returns in the field `requested_formats`. The problem is that this field only exists when there is more then one requested format. So `ytdl-format=bestvideo+bestaudio` would have that field, but `ytdl-format=bestaudio` would not, leading to no tracks being marked as default tracks. The requested formats can also be found under `requested_downloads`, which exists regardless of the number of requested formats. However when there is more then one requested format, `requested_downloads` doesn't contain those formats directly and instead has a field `requested_formats` that is identical to the other `requested_formats`. Therefore use `requested_downloads` as a fallback for when `requested_formats` doesn't exist.
* github/workflows: auto-update freebsd-vm within major versionJan Beich2022-08-121-1/+1
| | | | Reduce the churn by transparently picking up bustage fixes.
* drm_common: remove hard dependency on drmIsKMS()sfan52022-08-113-5/+30
| | | | | | ae768a1e141eb88243e46757d41ca0cada9502b4 forgot to bump the required libdrm version however Debian 11 just barely misses the requirement, which is a good reason not to require it unconditionally anyway.
* context_drm_egl: skip page flip wait on errorHo Ming Shun2022-08-111-1/+1
| | | | | Any error in page flipping caused mpv to wait indefinitely for a page flip callback.
* gpu/hwdec: reorder `drmprime` below `drmprime_drm`Philip Langdale2022-08-091-1/+1
| | | | | | | | | | | | | | The older overlay based drmprime hwdec should be preferred to the new texture mapping one. This is for a few reasons: 1. In any situation where both hwdecs work, it's probably right to use the more mature one by default, for now. 2. It seems like the overlay path primarily works on older SoCs where the texture path is less performant, and in at least one tested case is visually buggy, so you definitely want it to be tried first. 3. In situations where the old hwdec doesn't work, it will fall through to the new one.
* video/drmprime: fix use-after-freePhilip Langdale2022-08-091-1/+2
| | | | Same thing as in hwdec/drmprime.
* hwdec/drmprime: fix buildPhilip Langdale2022-08-091-1/+1
| | | | I accidentally included an adjustment for a pending change.
* hwdec/dmabuf_interop: Properly prefix `priv` structPhilip Langdale2022-08-095-14/+14
| | | | | Obviously, this should be dmabuf_interop_priv as it's declared in a header file that could get included anywhere.
* hwdec/drmprime: Fix small issuesPhilip Langdale2022-08-091-6/+21
| | | | | | | | sfan5 found a few things after I pushed the change, so this fixes them. * Use-after-free on drm_device_Path * Not comparing render_fd against -1 * Not handling dup() errors
* audio: drain ao on EOFThomas Weißschuh2022-08-091-0/+1
| | | | | | | | | | This gives pull-based AOs the chance to play all queued audio. Also it will make sure that the audio has finished playing so we can reinitialize the AO if format changes are necessary. Fixes #10018 Fixes #9835 Fixes #8904
* hwdec/drmprime: add drmprime hwdec-interopPhilip Langdale2022-08-098-1/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the confusing landscape of hardware video decoding APIs, we have had a long standing support gap for the v4l2 based APIs implemented for the various SoCs from Rockship, Amlogic, Allwinner, etc. While VAAPI is the defacto default for desktop GPUs, the developers who work on these SoCs (who are not the vendors!) have preferred to implement kernel APIs rather than maintain a userspace driver as VAAPI would require. While there are two v4l2 APIs (m2m and requests), and multiple forks of ffmpeg where support for those APIs languishes without reaching upstream, we can at least say that these APIs export frames as DRMPrime dmabufs, and that they use the ffmpeg drm hwcontext. With those two constants, it is possible for us to write a hwdec-interop without worrying about the mess underneath - for the most part. Accordingly, this change implements a hwdec-interop for any decoder that produces frames as DRMPrime dmabufs. The bulk of the heavy lifting is done by the dmabuf interop code we already had from supporting vaapi, and which I refactored for reusability in a previous set of changes. When we combine that with the fact that we can't probe for supported formats, the new code in this change is pretty simple. This change also includes the hwcontext_fns that are required for us to be able to configure the hwcontext used by `hwdec=drm-copy`. This is technically unrelated, but it seemed a good time to fill this gap. From a testing perspective, I have directly tested on a RockPRO64, while others have tested with different flavours of Rockchip and on Amlogic, providing m2m coverage. I have some other SoCs that I need to spin up to test with, but I don't expect big surprises, and when we inevitably need to account for new special cases down the line, we can do so - we won't be able to support every possible configuration blindly.
* ao_pipewire: tell audio server about number of queued samplesThomas Weißschuh2022-08-091-1/+2
|
* man: remove unhelpful languageMia Herkt2022-08-071-28/+8
| | | | | | | | Whether or not the GNOME project has a tendency to make life difficult for anyone outside their ecosystem, the user manual is no place for childish rants such as this. Keep it to what is relevant for users.
* ao_pipewire: use mpv loggingThomas Weißschuh2022-08-041-1/+1
|
* hwdec/dmabuf_interop_gl: support basic multi-plane formatsPhilip Langdale2022-08-031-38/+53
| | | | | | | | | | | | | | | | | I already added the equivalent logic for dmabuf_interop_pl previously but I skipped the GL support because importing dmabufs into GL requires explicitly providing the DRM format, and if you are taking a multi-plane format and trying to treat each plane as a separate layer, you need to come up with a DRM format for each synthetic layer. But my initial testing has shown that the RockPRO64 board I've got to work on drmprime hwdec will only produce NV12 in a single layer multi plane format, and it doesn't have Vulkan support, so I have had to tackle the GL multi-plane problem. To that end, this change introduces the infrastructure to provide new formats for synthetic layers. We only have lookup code for NV12 and P010 as these were the only ones I could test.
* hwdec/dmabuf_interop: use AVDRMFrameDescriptor to describe dmabufsPhilip Langdale2022-08-037-31/+80