From e4e1dc3c79e192d6c4476a2b52f9ca890385d433 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Sep 2016 20:01:02 +0200 Subject: command: rename/deprecate some conflicting property names These conflict with options of the same name, and prevent a "full" unification. Not addressed is the "cache" property, and possibly a few properties that behave differently from their equivalent options. --- DOCS/interface-changes.rst | 5 +++++ DOCS/man/input.rst | 12 +++++++++--- player/command.c | 10 +++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index fd4193a4e9..0b94f89963 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -27,6 +27,11 @@ Interface changes (Also see client API change for API version 1.23.) - add almost all options to the property list, meaning you can change options without adding "options/" to the property name + - rename the following properties + - "demuxer" -> "current-demuxer" + - "fps" -> "container-fps" + - "idle" -> "idle-active" + the old names are deprecated --- mpv 0.20.0 --- - add --image-display-duration option - this also means that image duration is not influenced by --mf-fps anymore in the general case (this is an diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index fbc7c8faa3..defe6166bd 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -903,9 +903,11 @@ Property list list of format names, e.g. mp4 is ``mov,mp4,m4a,3gp,3g2,mj2`` (the list may grow in the future for any format). -``demuxer`` +``current-demuxer`` Name of the current demuxer. (This is useless.) + (Renamed from ``demuxer``.) + ``stream-path`` Filename (full path) of the stream layer filename. (This is probably useless. It looks like this can be different from ``path`` only when @@ -1142,10 +1144,12 @@ Property list ``af-metadata/`` Equivalent to ``vf-metadata/``, but for audio filters. -``idle`` +``idle-active`` Return ``yes`` if no file is loaded, but the player is staying around because of the ``--idle`` option. + (Renamed from ``idle``.) + ``core-idle`` Return ``yes`` if the playback core is paused, otherwise ``no``. This can be different ``pause`` in special situations, such as when the player @@ -1467,10 +1471,12 @@ Property list ``video-frame-info/tff`` ``video-frame-info/repeat`` -``fps`` +``container-fps`` Container FPS. This can easily contain bogus values. For videos that use modern container formats or video codecs, this will often be incorrect. + (Renamed from ``fps``.) + ``estimated-vf-fps`` Estimated/measured FPS of the video filter chain output. (If no filters are used, this corresponds to decoder output.) This uses the average of diff --git a/player/command.c b/player/command.c index 0d8767e922..d8872fa720 100644 --- a/player/command.c +++ b/player/command.c @@ -3730,7 +3730,9 @@ static const struct m_property mp_properties_base[] = { {"media-title", mp_property_media_title}, {"stream-path", mp_property_stream_path}, {"stream-capture", mp_property_stream_capture}, - {"demuxer", mp_property_demuxer}, // conflicts with option + {"current-demuxer", mp_property_demuxer}, + // conflicts with option + M_PROPERTY_DEPRECATED_ALIAS("demuxer", "current-demuxer"), {"file-format", mp_property_file_format}, {"stream-pos", mp_property_stream_pos}, {"stream-end", mp_property_stream_end}, @@ -3780,7 +3782,8 @@ static const struct m_property mp_properties_base[] = { {"clock", mp_property_clock}, {"seekable", mp_property_seekable}, {"partially-seekable", mp_property_partially_seekable}, - {"idle", mp_property_idle}, // conflicts with option + {"idle-active", mp_property_idle}, + M_PROPERTY_DEPRECATED_ALIAS("idle", "idle-active"), // conflicts with option {"chapter-list", mp_property_list_chapters}, {"track-list", property_list_tracks}, @@ -3848,7 +3851,8 @@ static const struct m_property mp_properties_base[] = { {"vo-configured", mp_property_vo_configured}, {"vo-performance", mp_property_vo_performance}, {"current-vo", mp_property_vo}, - {"fps", mp_property_fps}, // conflicts with option + {"container-fps", mp_property_fps}, + M_PROPERTY_DEPRECATED_ALIAS("fps", "container-fps"), // conflicts with option {"estimated-vf-fps", mp_property_vf_fps}, {"video-aspect", mp_property_aspect}, {"vid", mp_property_video}, -- cgit v1.2.3