[MPlayer-dev-eng] stereo3d filter

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Oct 17 22:19:40 CEST 2010


On Sun, Oct 17, 2010 at 09:50:45PM +0200, Reimar Döffinger wrote:
> On Sun, Oct 17, 2010 at 09:09:46PM +0200, Endre Kollár wrote:
> > From: Reimar Döffinger <Reimar.Doeffinger <at> gmx.de>
> > > On Mon, Feb 01, 2010 at 05:19:21PM +0100, Gordon Schmidt wrote:
> > > > +    if (args) {
> > > > +        char *arg;
> > > > +        //input code
> > > > +        arg = strtok(args, ": \0\n");
> > > > +        vf->priv->in.fmt = get_arg(arg);
> > > > +        //output code
> > > > +        arg = strtok(NULL, ": \0\n");
> > > > +        vf->priv->out.fmt = get_arg(arg);
> > > > +    }
> > >
> > > Look at e.g. vf_scale.c and there the vf_opts_fields
> > > for how to reuse the parsing code MPlayer already has.
> > > Actually vf_format is probably the simples example,
> > > it contains almost no other code.
> > > By adding m_struct_t to vf_info_t you also don't need
> > > to alloc and initialize vf->priv manually
> > 
> > I can not find adequate CONF_TYPE_ type in the m_option_t structure.
> > CONF_TYPE_INT:
> > We want to get a string.
> > CONF_TYPE_STRING:
> > No filter use this.There is no example. The pp filter neither.
> 
> It is used a lot in cfg-common.h.
> The usage (the whole config system) is the same between filters
> and the "main" mplayer options.
> Also from the config parsing side it should just be a matter of
> changing the variable type from "int" to "char *" when you want
> a CONF_TYPE_STRING instead of CONF_TYPE_INT.

And btw. a CONF_TYPE_FUNC_PARAM that converts the string directly
into an int might actually be more suitable.


More information about the MPlayer-dev-eng mailing list