On 06/09/2011 06:27 AM, Anton Khirnov wrote:
> +const AVOption *av_opt_find(void *obj, const char *name, const char *unit,
> + int opt_flags, int search_flags)
> +{
> + AVClass *c = *(AVClass**)obj;
> + const AVOption *o = NULL;
> +
> + if (c->opt_find && search_flags & AVOPT_SEARCH_CHILDREN &&
> + (o = c->opt_find(obj, name, unit, opt_flags, search_flags)))
> + return o;
> +
> + while ((o = av_next_option(obj, o))) {
extra unneeded parentheses.
[...]
> /**
> * Set the field of obj with the given name to value.
> @@ -194,4 +199,29 @@ void av_opt_free(void *obj);
> */
> int av_opt_apply_dict(void *obj, struct AVDictionary **options);
>
> +#define AVOPT_SEARCH_CHILDREN 0x0001 /**< Search also in possible children
> of the given object. */
s/Search also/Also search
> +
> +/**
> + * Look for an option in obj. Look only for the options which
> + * have the specified flags set.
> + *
> + * @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] unit When searching for named constants, name of the unit
> + * it belongs to.
> + * @param opt_flags Find only options with those flags set (AV_OPT_FLAG).
> + * @param search_flags A combination of AVOPT_SEARCH_*.
> + *
> + * @return A pointer to the option found, or NULL if no option
> + * has been found.
> + *
> + * @note Options found with AVOPT_SEARCH_CHILDREN flag may not be
> + * settable directly with av_set_string3. Use special calls which
> + * take an options dict (e.g. avformat_open_input() ) to set options
take an options AVDictionary
rest of the patch looks fine.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel