options: implement --pphelp differently

Make it work via --vf=pp:help instead.
This commit is contained in:
wm4 2013-11-23 21:34:24 +01:00
parent 25855059af
commit b5ed614839
7 changed files with 10 additions and 9 deletions

View File

@ -177,6 +177,7 @@ Command Line Switches
``-zoom`` Inverse available as ``--video-unscaled``
``-panscanrange`` ``--video-zoom``, ``--video-pan-x/y``
``-pp`` ``-vf=pp``
``-pphelp`` ``--vf=pp:help``
=========================== ========================================
.. note::

View File

@ -1620,9 +1620,6 @@ OPTIONS
FIXME: This needs to be clarified and documented thoroughly.
``--pphelp``
See also ``--vf=pp``.
``--priority=<prio>``
(Windows only.)
Set process priority for mpv according to the predefined priorities

View File

@ -250,7 +250,7 @@ Available filters are:
.. note::
``--pphelp`` shows a list of available subfilters.
``--vf=pp:help`` shows a list of available subfilters.
Available subfilters are:

View File

@ -61,7 +61,6 @@ extern const m_option_t demux_rawvideo_opts[];
extern const m_option_t cdda_opts[];
extern int sws_flags;
extern const char pp_help[];
extern const char mp_help_text[];
@ -491,10 +490,6 @@ const m_option_t mp_opts[] = {
{"vaapi-copy", 5})),
OPT_STRING("hwdec-codecs", hwdec_codecs, 0),
#if HAVE_LIBPOSTPROC
{"pphelp", (void *) &pp_help, CONF_TYPE_PRINT, CONF_GLOBAL | CONF_NOCFG, 0, 0, NULL},
#endif
// scaling:
{"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
{"ssf", (void *) scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},

View File

@ -131,6 +131,7 @@ static bool get_desc(struct m_obj_desc *dst, int index)
.priv_defaults = vf->priv_defaults,
.options = vf->options,
.p = vf,
.print_help = vf->print_help,
};
return true;
}

View File

@ -38,6 +38,7 @@ typedef struct vf_info {
int priv_size;
const void *priv_defaults;
const struct m_option *options;
void (*print_help)(void);
} vf_info_t;
struct vf_format {

View File

@ -153,10 +153,16 @@ static int vf_open(vf_instance_t *vf, char *args){
return 1;
}
static void print_help(void)
{
mp_msg(MSGT_CFGPARSER, MSGL_INFO, "%s", pp_help);
}
const vf_info_t vf_info_pp = {
.description = "postprocessing",
.name = "pp",
.open = vf_open,
.print_help = print_help,
};
//===========================================================================//