diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index b037588558..69cf0021a2 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -20,6 +20,7 @@ Interface changes :: --- mpv 0.10.0 will be released --- + - deprecate "audio-format" property, replaced with "audio-codec-name" - deprecate --media-title, replaced with --force-media-title - deprecate "length" property, replaced with "duration" - change volume property: diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 09cbe8b718..57823497ad 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1143,12 +1143,12 @@ Property list ``audio-delay`` (RW) See ``--audio-delay``. -``audio-format`` - Audio format as string. - ``audio-codec`` Audio codec selected for decoding. +``audio-codec-name`` + Audio codec. + ``audio-samplerate`` Audio samplerate. diff --git a/player/command.c b/player/command.c index 168c1f8394..209bcac56b 100644 --- a/player/command.c +++ b/player/command.c @@ -1639,8 +1639,8 @@ static int mp_property_audio_delay(void *ctx, struct m_property *prop, } /// Audio codec tag (RO) -static int mp_property_audio_format(void *ctx, struct m_property *prop, - int action, void *arg) +static int mp_property_audio_codec_name(void *ctx, struct m_property *prop, + int action, void *arg) { MPContext *mpctx = ctx; const char *c = mpctx->d_audio ? mpctx->d_audio->header->codec : NULL; @@ -3346,7 +3346,7 @@ static const struct m_property mp_properties[] = { {"volume", mp_property_volume}, {"mute", mp_property_mute}, {"audio-delay", mp_property_audio_delay}, - {"audio-format", mp_property_audio_format}, + {"audio-codec-name", mp_property_audio_codec_name}, {"audio-codec", mp_property_audio_codec}, {"audio-samplerate", mp_property_samplerate}, {"audio-channels", mp_property_channels}, @@ -3482,6 +3482,8 @@ static const struct m_property mp_properties[] = { M_PROPERTY_ALIAS("colormatrix-primaries", "video-params/primaries"), M_PROPERTY_ALIAS("colormatrix-gamma", "video-params/gamma"), + M_PROPERTY_DEPRECATED_ALIAS("audio-format", "audio-codec-name"), + {0}, }; @@ -3509,7 +3511,7 @@ static const char *const *const mp_event_property_change[] = { "colormatrix-output-range", "colormatrix-primaries"), E(MPV_EVENT_AUDIO_RECONFIG, "audio-format", "audio-codec", "audio-bitrate", "samplerate", "channels", "audio", "volume", "mute", "balance", - "volume-restore-data", "current-ao"), + "volume-restore-data", "current-ao", "audio-codec-name"), E(MPV_EVENT_SEEK, "seeking", "core-idle"), E(MPV_EVENT_PLAYBACK_RESTART, "seeking", "core-idle"), E(MPV_EVENT_METADATA_UPDATE, "metadata", "filtered-metadata", "media-title"),