[FFmpeg-devel] [PATCH] Document opt.h:av_set_* functions

Stefano Sabatini stefano.sabatini-lala
Tue Jul 8 21:47:47 CEST 2008


On date Sunday 2008-07-06 11:00:34 +0200, Stefano Sabatini encoded:
> Hi all, as in subject.
> -- 
> FFmpeg = Funny and Fantastic Multimedia Portable Educated Game

> Index: libavcodec/opt.h
> ===================================================================
> --- libavcodec/opt.h	(revision 14083)
> +++ libavcodec/opt.h	(working copy)
> @@ -98,10 +98,60 @@
>   * has been found
>   */
>  const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);
> +
> +/**
> + * Sets in \p obj an option with the value contained in the string \p
> + * val.
> + *
> + * @param[in] obj a pointer to a struct whose first element is a
> + * pointer to an #AVClass
> + * @param[in] name the name of the option to look for
> + * @param[in] val A string containing the value to be parsed and set
> + * in \p obj.
> + * If the option is of numeric type, it has to be a numeric scalar
> + * optionally with a SI postfix or a named scalar. Behavior with more
> + * than one scalar and +- infix operators is undefined.
> + * If the option is of type flags, it has to be a numeric scalar or a
> + * named flag. Prefixing a flag with + causes it to be set without
> + * affecting the other flags, - similarly unsets a flag.
> + * @return a pointer to the option set or NULL if no option has been
> + * found \e or the value \p val is not valid
> + */
>  const AVOption *av_set_string(void *obj, const char *name, const char *val);
> +
> +/**
> + * Sets in \p obj an option with the value contained in the double \p n.
> + *
> + * @param[in] obj a pointer to a struct whose first element is a
> + * pointer to an #AVClass
> + * @param[in] name the name of the option to look for
> + * @return a pointer to the option set or NULL if no option has been
> + * found \e or the value \p d is not valid
> + */
>  const AVOption *av_set_double(void *obj, const char *name, double n);
> +
> +/**
> + * Sets in \p obj an option with the value contained in the rational \p q.
> + *
> + * @param[in] obj a pointer to a struct whose first element is a
> + * pointer to an #AVClass
> + * @param[in] name the name of the option to look for
> + * @return a pointer to the option set or NULL if no option has been
> + * found \e or the value \p q is not valid
> + */
>  const AVOption *av_set_q(void *obj, const char *name, AVRational n);
> +
> +/**
> + * Sets in \p obj an option with the value contained in the int64_t \p n.
> + *
> + * @param[in] obj a pointer to a struct whose first element is a
> + * pointer to an #AVClass
> + * @param[in] name the name of the option to look for
> + * @return a pointer to the option set or NULL if no option has been
> + * found \e or the value \p n is not valid
> + */
>  const AVOption *av_set_int(void *obj, const char *name, int64_t n);
> +
>  double av_get_double(void *obj, const char *name, const AVOption **o_out);
>  AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
>  int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);

Please can you comment on this? Or I'll commit it on Saturday.

Regards.
-- 
FFmpeg = Funny and Funny Magical Proud Enchanting Glue




More information about the ffmpeg-devel mailing list