From dba4199dd3eee8e477c08180240d7bc0db063005 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 30 Sep 2012 17:14:30 +0300 Subject: [PATCH] docs: document --quvi-format Add missing documentation for the option --quvi-format. Also simplify the handling of the option slightly: make the option default to "best", instead of having the code using it check if it's unset and use "best" in that case. --- DOCS/man/en/options.rst | 9 +++++++++ cfg-mplayer.h | 2 +- stream/open.c | 3 +-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 6165bb5238..8d2e354be2 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1569,6 +1569,15 @@ useful on slow terminals or broken ones which do not properly handle carriage return (i.e. \\r). +--quvi-format= + When mplayer2 is given a video streaming site URL to play, and libquvi is + used to translate that into the address of the actual video file, this + option affects which video format is chosen in case there are several + alternatives for the original URL. The value is passed directly to + libquvi. Available values depend on the site and video. According to + libquvi documentation, the only values that are guaranteed to be available + are "default" (usually lowest quality) and "best". Defaults to "best". + --radio= These options set various parameters of the radio capture module. For listening to radio with MPlayer use ``radio://`` (if channels diff --git a/cfg-mplayer.h b/cfg-mplayer.h index b889661a5d..8b070910b6 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -485,7 +485,7 @@ const m_option_t common_opts[] = { OPT_MAKE_FLAGS("hr-mp3-seek", hr_mp3_seek, 0), - OPT_STRING("quvi-format", quvi_format, 0), + OPT_STRING("quvi-format", quvi_format, 0, OPTDEF_STR("best")), { "rawaudio", (void *)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, { "rawvideo", (void *)&demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, diff --git a/stream/open.c b/stream/open.c index 91e9ae2956..16d0dc35fc 100644 --- a/stream/open.c +++ b/stream/open.c @@ -76,8 +76,7 @@ static const char *resolve_quvi(const char *url, struct MPOpts *opts) // That call requires an extra net access. quvi_next_media_url() doesn't // seem to do anything useful. So we can't really do anything useful // except pass through the user's format setting. - quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format - ? opts->quvi_format : "best"); + quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format); rc = quvi_parse(q, (char *)url, &m); if (rc != QUVI_OK) { -- 2.11.4.GIT