diff options
94 files changed, 655 insertions, 886 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 280874bb95..eb682cff2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -349,20 +349,20 @@ jobs: --werror \ -Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \ -Dfuzzers=true -Dlibmpv=true -Dcplayer=false - meson compile -C build + meson compile -C build fuzzers - name: Print meson log if: ${{ failure() && steps.build.outcome == 'failure' }} run: | cat ./build/meson-logs/meson-log.txt - linux-ffmpeg-4-4: + linux-ffmpeg-6-1: runs-on: ubuntu-latest container: - # We want to test ffmpeg 4.4 which alpine 3.15 has exactly. + # We want to test ffmpeg 6.1.1 which alpine 3.19 has exactly. # Furthermore, this is a very minimal build of mpv without commonly # used features to test build compatibility. Musl is a nice bonus as well - image: alpine:3.15 + image: alpine:3.19 steps: - uses: actions/checkout@v4 - name: Install dependencies @@ -383,10 +383,9 @@ jobs: libxrandr-dev \ libxpresent-dev \ libxscrnsaver-dev \ + meson \ musl-dev \ - py3-pip \ samurai - pip install meson - name: Build with meson id: build @@ -414,10 +413,10 @@ jobs: steps: - uses: actions/checkout@v4 - name: Test in OpenBSD VM - uses: cross-platform-actions/action@v0.23.0 + uses: cross-platform-actions/action@v0.24.0 with: operating_system: openbsd - version: '7.4' + version: '7.5' run: | sudo pkg_add -U \ cmake \ @@ -429,6 +428,7 @@ jobs: libcdio-paranoia \ libdvdnav \ libiconv \ + libplacebo \ libv4l \ libxkbcommon \ luajit \ @@ -455,7 +455,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Test in FreeBSD VM - uses: cross-platform-actions/action@v0.23.0 + uses: cross-platform-actions/action@v0.24.0 with: operating_system: freebsd version: '14.0' diff --git a/DOCS/interface-changes/option-removal.txt b/DOCS/interface-changes/option-removal.txt new file mode 100644 index 0000000000..4b25522c31 --- /dev/null +++ b/DOCS/interface-changes/option-removal.txt @@ -0,0 +1,9 @@ +remove deprecated `--cache-dir` option alias +remove deprecated `--cache-unlink-files` option alias +remove deprecated `--demuxer-cue-codepage` option alias +remove deprecated `--fps` option alias +remove deprecated `--cdrom-device` option alias +remove deprecated `--sub-forced-only` option alias +remove deprecated `--vo-sixel-exit-clear` option alias +remove deprecated `--cdda-toc-bias` option +remove deprecated `--drm-atomic` option diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 0fc0619a11..b4c9706d40 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2112,11 +2112,11 @@ Property list ``time-remaining`` with milliseconds. ``audio-pts`` - Current audio playback position in current file in seconds. Unlike time-pos, + Current audio playback position in current file in seconds. Unlike ``time-pos``, this updates more often than once per frame. This is mostly equivalent to - time-pos for audio-only files however it also takes into account the audio + ``time-pos`` for audio-only files however it also takes into account the audio driver delay. This can lead to negative values in certain cases, so in - general you probably want to simply use time-pos. + general you probably want to simply use ``time-pos``. This has a sub-property: @@ -2132,10 +2132,10 @@ Property list ``playtime-remaining`` with milliseconds. ``playback-time`` (RW) - Position in current file in seconds. Unlike ``time-pos``, the time is - clamped to the range of the file. (Inaccurate file durations etc. could - make it go out of range. Useful on attempts to seek outside of the file, - as the seek target time is considered the current position during seeking.) + Alias for ``time-pos``. + + Prior to mpv 0.39.0, ``time-pos`` and ``playback-time`` could report + different values in certain edge cases. This has a sub-property: @@ -3108,6 +3108,24 @@ Property list ``yes``/true if the track has the forced flag set in the file, ``no``/false or unavailable otherwise. + ``track-list/N/dependent`` + ``yes``/true if the track has the dependent flag set in the file, + ``no``/false or unavailable otherwise. + + ``track-list/N/visual-impaired`` + ``yes``/true if the track has the visual impaired flag set in the file, + ``no``/false or unavailable otherwise. + + ``track-list/N/hearing-impaired`` + ``yes``/true if the track has the hearing impaired flag set in the file, + ``no``/false or unavailable otherwise. + + ``track-list/N/hls-bitrate`` + The bitrate of the HLS stream, if available. + + ``track-list/N/program-id`` + The program ID of the HLS stream, if available. + ``track-list/N/codec`` The codec name used by this track, for example ``h264``. Unavailable in some rare cases. @@ -3221,6 +3239,11 @@ Property list "albumart" MPV_FORMAT_FLAG "default" MPV_FORMAT_FLAG "forced" MPV_FORMAT_FLAG + "dependent" MPV_FORMAT_FLAG + "visual-impaired" MPV_FORMAT_FLAG + "hearing-impaired" MPV_FORMAT_FLAG + "hls-bitrate" MPV_FORMAT_INT64 + "program-id" MPV_FORMAT_INT64 "selected" MPV_FORMAT_FLAG "main-selection" MPV_FORMAT_INT64 "external" MPV_FORMAT_FLAG @@ -3229,6 +3252,7 @@ Property list "codec-desc" MPV_FORMAT_STRING "codec-profile" MPV_FORMAT_STRING "ff-index" MPV_FORMAT_INT64 + "decoder" MPV_FORMAT_STRING "decoder-desc" MPV_FORMAT_STRING "demux-w" MPV_FORMAT_INT64 "demux-h" MPV_FORMAT_INT64 @@ -3243,6 +3267,7 @@ Property list "demux-bitrate" MPV_FORMAT_INT64 "demux-rotation" MPV_FORMAT_INT64 "demux-par" MPV_FORMAT_DOUBLE + "format-name" MPV_FORMAT_STRING "audio-channels" MPV_FORMAT_INT64 "replaygain-track-peak" MPV_FORMAT_DOUBLE "replaygain-track-gain" MPV_FORMAT_DOUBLE diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index 3b29124ea7..9f8207865b 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -671,6 +671,8 @@ Options of this type can be changed at runtime using the ``change-list`` command, which takes the suffix (without the ``-``) as separate operation parameter. +An object settings list can hold up to 100 elements. + CONFIGURATION FILES =================== diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e2c3c6d00c..026a2b7f77 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2052,11 +2052,9 @@ Audio Audio delay in seconds (positive or negative float value). Positive values delay the audio, and negative values delay the video. -``--mute=<yes|no|auto>`` +``--mute=<yes|no>`` Set startup audio mute status (default: no). - ``auto`` is a deprecated possible value that is equivalent to ``no``. - See also: ``--volume``. ``--audio-demuxer=<[+]name>`` @@ -5923,6 +5921,11 @@ them. Defines the size of an edge border (default: 32) to initiate client side resizes events in the wayland contexts with touch events. +``--wayland-present=<yes|no>`` + Enable the use of wayland's presentation time protocol for more accurate + frame presentation if it is supported by the compositor (default: ``yes``). + This only has an effect if ``--video-sync=display-...`` is being used. + ``--spirv-compiler=<compiler>`` Controls which compiler is used to translate GLSL to SPIR-V. This is only relevant for ``--gpu-api=d3d11`` with ``--vo=gpu``. @@ -6481,6 +6484,11 @@ them. :system: No manual syncing, depend on the layer mechanic and the next drawable :feedback: Same as precise but uses the presentation feedback core mechanism +``--macos-menu-shortcuts=<yes|no>`` + Enables the default menu bar shortcuts (default: yes). The menu bar shortcuts always take + precedence over any other shortcuts, they are not propagated to the mpv core and they can't be + used in config files like ``input.conf`` or script bindings. + ``--android-surface-size=<WxH>`` Set dimensions of the rendering surface used by the Android gpu context. Needs to be set by the embedding application if the dimensions change during diff --git a/audio/aframe.c b/audio/aframe.c index 03e8ab8ae8..e22a98edac 100644 --- a/audio/aframe.c +++ b/audio/aframe.c @@ -123,7 +123,6 @@ struct mp_aframe *mp_aframe_from_avframe(struct AVFrame *av_frame) if (!av_frame || av_frame->width > 0 || av_frame->height > 0) return NULL; -#if HAVE_AV_CHANNEL_LAYOUT if (!av_channel_layout_check(&av_frame->ch_layout)) return NULL; @@ -131,7 +130,6 @@ struct mp_aframe *mp_aframe_from_avframe(struct AVFrame *av_frame) if (!mp_chmap_from_av_layout(&converted_map, &av_frame->ch_layout)) { return NULL; } -#endif int format = af_from_avformat(av_frame->format); if (!format && av_frame->format != AV_SAMPLE_FMT_NONE) @@ -144,15 +142,7 @@ struct mp_aframe *mp_aframe_from_avframe(struct AVFrame *av_frame) abort(); frame->format = format; -#if !HAVE_AV_CHANNEL_LAYOUT - mp_chmap_from_lavc(&frame->chmap, frame->av_frame->channel_layout); - - // FFmpeg being a stupid POS again - if (frame->chmap.num != frame->av_frame->channels) - mp_chmap_from_channels(&frame->chmap, av_frame->channels); -#else frame->chmap = converted_map; -#endif if (av_frame->opaque_ref) { struct avframe_opaque *op = (void *)av_frame->opaque_ref->data; @@ -221,15 +211,8 @@ void mp_aframe_config_copy(struct mp_aframe *dst, struct mp_aframe *src) dst->av_frame->sample_rate = src->av_frame->sample_rate; dst->av_frame->format = src->av_frame->format; -#if !HAVE_AV_CHANNEL_LAYOUT - dst->av_frame->channel_layout = src->av_frame->channel_layout; - // FFmpeg being a stupid POS again - dst->av_frame->channels = src->av_frame->channels; -#else - if (av_channel_layout_copy(&dst->av_frame->ch_layout, - &src->av_frame->ch_layout) < 0) + if (av_channel_layout_copy(&dst->av_frame->ch_layout, &src->av_frame->ch_layout) < 0) abort(); -#endif } // Copy "soft" attributes from src to dst, excluding things which affect @@ -339,20 +322,9 @@ bool mp_aframe_set_chmap(struct mp_aframe *frame, struct mp_chmap *in) if (mp_aframe_is_allocated(frame) && in->num != frame->chmap.num) return false; -#if !HAVE_AV_CHANNEL_LAYOUT - uint64_t lavc_layout = mp_chmap_to_lavc_unchecked(in); - if (!lavc_layout && in->num) - return false; -#endif frame->chmap = *in; - -#if !HAVE_AV_CHANNEL_LAYOUT - frame->av_frame->channel_layout = lavc_layout; - // FFmpeg being a stupid POS again - frame->av_frame->channels = frame->chmap.num; -#else mp_chmap_to_av_layout(&frame->av_frame->ch_layout, in); -#endif + return true; } diff --git a/audio/chmap_avchannel.h b/audio/chmap_avchannel.h index e136ccc7ce..84062c49d0 100644 --- a/audio/chmap_avchannel.h +++ b/audio/chmap_avchannel.h @@ -23,10 +23,6 @@ #include "chmap.h" -#if HAVE_AV_CHANNEL_LAYOUT - bool mp_chmap_from_av_layout(struct mp_chmap *dst, const AVChannelLayout *src); void mp_chmap_to_av_layout(AVChannelLayout *dst, const struct mp_chmap *src); - -#endif diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index 39cd74cd2a..9eb308528d 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -113,10 +113,6 @@ static bool init(struct mp_filter *da, struct mp_codec_params *codec, if (opts->downmix && mpopts->audio_output_channels.num_chmaps == 1) { const struct mp_chmap *requested_layout = &mpopts->audio_output_channels.chmaps[0]; -#if !HAVE_AV_CHANNEL_LAYOUT - lavc_context->request_channel_layout = - mp_chmap_to_lavc(requested_layout); -#else AVChannelLayout av_layout = { 0 }; mp_chmap_to_av_layout(&av_layout, requested_layout); @@ -126,7 +122,6 @@ static bool init(struct mp_filter *da, struct mp_codec_params *codec, AV_OPT_SEARCH_CHILDREN); av_channel_layout_uninit(&av_layout); -#endif } // Always try to set - option only exists for AC3 at the moment @@ -220,6 +215,7 @@ static int receive_frame(struct mp_filter *da, struct mp_frame *out) return ret; mp_codec_info_from_av(avctx, priv->codec); + mp_chmap_from_av_layout(&priv->codec->channels, &avctx->ch_layout); double out_pts = mp_pts_from_av(priv->avframe->pts, &priv->codec_timebase); |