summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2018-01-02 20:46:58 +0000
committerRicardo Constantino <wiiaboo@gmail.com>2018-01-02 20:46:58 +0000
commit828bd2963cd10a851e0a977809687aed4d377dc3 (patch)
tree31d942e661a897152c192bca27fc6079b8cf88e7 /player
parent89f81da481c81cda1abd7c971b36f00ea80d80fe (diff)
downloadmpv-828bd2963cd10a851e0a977809687aed4d377dc3.tar.bz2
mpv-828bd2963cd10a851e0a977809687aed4d377dc3.tar.xz
command: add demuxer-lavf-list property
Was only available with --demuxer-lavf-format=help and the demuxer needed to be used for it to actually print the list. This can be used in the future to check if 'dash' support was compiled with FFmpeg so ytdl_hook can use it instead. For now, dashdec is too rudimentary to be used right away.
Diffstat (limited to 'player')
-rw-r--r--player/command.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 6f2c15b047..412afc5e11 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3588,6 +3588,20 @@ static int mp_property_encoders(void *ctx, struct m_property *prop,
return r;
}
+static int mp_property_lavf_demuxers(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ switch (action) {
+ case M_PROPERTY_GET:
+ *(char ***)arg = mp_get_lavf_demuxers();
+ return M_PROPERTY_OK;
+ case M_PROPERTY_GET_TYPE:
+ *(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_STRING_LIST};
+ return M_PROPERTY_OK;
+ }
+ return M_PROPERTY_NOT_IMPLEMENTED;
+}
+
static int mp_property_version(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -4027,6 +4041,7 @@ static const struct m_property mp_properties_base[] = {
{"protocol-list", mp_property_protocols},
{"decoder-list", mp_property_decoders},
{"encoder-list", mp_property_encoders},
+ {"demuxer-lavf-list", mp_property_lavf_demuxers},
{"mpv-version", mp_property_version},
{"mpv-configuration", mp_property_configuration},