options: change --vid, --aid, --sid options

The --vid, --aid, --sid options now accept the values 'off' and 'auto',
instead of having the user deal with the numeric values -2 and -1. The
numeric values are not allowed anymore.

Remove the --audio option. It was probably meant as compensation option
for --no-audio. There are no such options for sub/video, and it was not
documented, so just remove it. The replacement is "--aid=auto".

Also do some updates to the manpage.
This commit is contained in:
wm4 2012-09-05 02:39:12 +02:00
parent c955549204
commit b94cdc4baf
3 changed files with 17 additions and 24 deletions

View File

@ -87,12 +87,9 @@
:``--afm=ffmpeg``: Try FFmpeg's libavcodec codecs first. :``--afm=ffmpeg``: Try FFmpeg's libavcodec codecs first.
:``--afm=acm,dshow``: Try Win32 codecs first. :``--afm=acm,dshow``: Try Win32 codecs first.
--aid=<ID> --aid=<ID|auto|off>
Select audio channel (MPEG: 0-31, AVI/OGM: 1-99, ASF/RM: 0-127, VOB(AC-3): Select audio channel. ``auto`` selects the default, ``off`` disables audio.
128-159, VOB(LPCM): 160-191, MPEG-TS 17-8190). MPlayer prints the See also ``--alang``.
available audio IDs when run in verbose (-v) mode. When playing an MPEG-TS
stream, MPlayer will use the first program (if present) with the chosen
audio stream. See also ``--alang``.
--alang=<languagecode[,languagecode,...]> --alang=<languagecode[,languagecode,...]>
Specify a priority list of audio languages to use. Different container Specify a priority list of audio languages to use. Different container
@ -1271,17 +1268,15 @@
Do not use index present in the file even if one is present. Do not use index present in the file even if one is present.
--no-audio --no-audio
Do not play sound. Useful for benchmarking. Do not play sound. With some demuxers this may not work. In those cases
you can try ``--ao=null`` instead.
--no-sub --no-sub
Disables any otherwise auto-selected internal subtitles (as e.g. the Disables display of internal and external subtitles.
Matroska/mkv demuxer supports). Use ``--no-autosub`` to disable the
loading of external subtitle files.
--no-video --no-video
Do not play video. With some demuxers this may not work. In those cases Do not play video. With some demuxers this may not work. In those cases
you can try ``--vc=null --vo=null`` instead; but ``--vc=null`` is always you can try ``--vo=null`` instead.
unreliable.
--ontop --ontop
Makes the player window stay on top of other windows. Supported by video Makes the player window stay on top of other windows. Supported by video
@ -1699,10 +1694,9 @@
--shuffle --shuffle
Play files in random order. Play files in random order.
--sid=<ID> --sid=<ID|auto|off>
Display the subtitle stream specified by <ID> (0-31). MPlayer prints the Display the subtitle stream specified by <ID> (0-31). ``auto`` selects the
available subtitle IDs when run in verbose (``-v``) mode. If you cannot default, ``off`` disables subtitles.
select one of the subtitles on a DVD, try ``--vobsubid``.
See also ``--slang``, ``--vobsubid``, ``--no-sub``. See also ``--slang``, ``--vobsubid``, ``--no-sub``.
--slang=<languagecode[,languagecode,...]> --slang=<languagecode[,languagecode,...]>
@ -2262,10 +2256,8 @@
:``--vfm=xanim``: :``--vfm=xanim``:
Try XAnim codecs first. Try XAnim codecs first.
--vid=<ID> --vid=<ID|auto|off>
Select video channel (MPG: 0-15, ASF: 0-255, MPEG-TS: 17-8190). When Select video channel. ``auto`` selects the default, ``off`` disables video.
playing an MPEG-TS stream, MPlayer will use the first program (if present)
with the chosen video stream.
--vm --vm
Try to change to a different video mode. Supported by the x11 and xv video Try to change to a different video mode. Supported by the x11 and xv video

View File

@ -397,12 +397,11 @@ const m_option_t common_opts[] = {
{"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL},
// select audio/video/subtitle stream // select audio/video/subtitle stream
OPT_INTRANGE("aid", audio_id, 0, -2, 8190), OPT_TRACKCHOICE("aid", audio_id),
OPT_INTRANGE("vid", video_id, 0, -2, 8190), OPT_TRACKCHOICE("vid", video_id),
OPT_INTRANGE("sid", sub_id, 0, -2, 8190), OPT_TRACKCHOICE("sid", sub_id),
OPT_FLAG_CONSTANTS("no-sub", sub_id, 0, -1, -2), OPT_FLAG_CONSTANTS("no-sub", sub_id, 0, -1, -2),
OPT_FLAG_CONSTANTS("no-video", video_id, 0, -1, -2), OPT_FLAG_CONSTANTS("no-video", video_id, 0, -1, -2),
OPT_FLAG_CONSTANTS("audio", audio_id, 0, -2, -1),
OPT_FLAG_CONSTANTS("no-audio", audio_id, 0, -1, -2), OPT_FLAG_CONSTANTS("no-audio", audio_id, 0, -1, -2),
OPT_STRINGLIST("alang", audio_lang, 0), OPT_STRINGLIST("alang", audio_lang, 0),
OPT_STRINGLIST("slang", sub_lang, 0), OPT_STRINGLIST("slang", sub_lang, 0),

View File

@ -471,6 +471,8 @@ static inline void m_option_free(const m_option_t *opt, void *dst)
#define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) OPT_GENERAL(optname, varname, (flags) | CONF_RANGE, .min = minval, .max = maxval, .priv = (void *)&(const struct m_opt_choice_alternatives[]){OPT_HELPER_REMOVEPAREN choices, {NULL}}, __VA_ARGS__) #define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) OPT_GENERAL(optname, varname, (flags) | CONF_RANGE, .min = minval, .max = maxval, .priv = (void *)&(const struct m_opt_choice_alternatives[]){OPT_HELPER_REMOVEPAREN choices, {NULL}}, __VA_ARGS__)
#define OPT_TIME(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_time) #define OPT_TIME(...) OPT_GENERAL(__VA_ARGS__, .type = &m_option_type_time)
#define OPT_TRACKCHOICE(name, var) OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"off", -2}, {"no", -2}, {"auto", -1}))
// subconf must have the type struct m_sub_options. // subconf must have the type struct m_sub_options.
// flagv should be M_OPT_MERGE or M_OPT_FLATTEN. // flagv should be M_OPT_MERGE or M_OPT_FLATTEN.
// varname refers to the field, that must be a pointer to a field described by // varname refers to the field, that must be a pointer to a field described by