352#define AV_OPT_FLAG_ENCODING_PARAM (1 << 0)
356#define AV_OPT_FLAG_DECODING_PARAM (1 << 1)
357#define AV_OPT_FLAG_AUDIO_PARAM (1 << 3)
358#define AV_OPT_FLAG_VIDEO_PARAM (1 << 4)
359#define AV_OPT_FLAG_SUBTITLE_PARAM (1 << 5)
363#define AV_OPT_FLAG_EXPORT (1 << 6)
368#define AV_OPT_FLAG_READONLY (1 << 7)
372#define AV_OPT_FLAG_BSF_PARAM (1 << 8)
377#define AV_OPT_FLAG_RUNTIME_PARAM (1 << 15)
381#define AV_OPT_FLAG_FILTERING_PARAM (1 << 16)
386#define AV_OPT_FLAG_DEPRECATED (1 << 17)
390#define AV_OPT_FLAG_CHILD_CONSTS (1 << 18)
605#define AV_OPT_SEARCH_CHILDREN (1 << 0)
613#define AV_OPT_SEARCH_FAKE_OBJ (1 << 1)
619#define AV_OPT_ALLOW_NULL (1 << 2)
625#define AV_OPT_ARRAY_REPLACE (1 << 3)
632#define AV_OPT_MULTI_COMPONENT_RANGE (1 << 12)
657 int opt_flags,
int search_flags);
681 int opt_flags,
int search_flags,
void **target_obj);
692int av_opt_show2(
void *obj,
void *av_log_obj,
int req_flags,
int rej_flags);
714 const char *key_val_sep,
const char *pairs_sep,
716 char **rkey,
char **rval);
754 const char *key_val_sep,
const char *pairs_sep);
784 const char *
const *shorthand,
785 const char *key_val_sep,
const char *pairs_sep);
869int av_opt_set (
void *obj,
const char *name,
const char *val,
int search_flags);
873int av_opt_set_bin (
void *obj,
const char *name,
const uint8_t *val,
int size,
int search_flags);
899#define av_opt_set_int_list(obj, name, val, term, flags) \
900 (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \
902 av_opt_set_bin(obj, name, (const uint8_t *)(val), \
903 av_int_list_length(val, term) * sizeof(*(val)), flags))
952 unsigned int start_elem,
unsigned int nb_elems,
985int av_opt_get (
void *obj,
const char *name,
int search_flags, uint8_t **out_val);
986int av_opt_get_int (
void *obj,
const char *name,
int search_flags, int64_t *out_val);
1008 unsigned int *out_val);
1041 unsigned int start_elem,
unsigned int nb_elems,
1118#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001
1119#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002
1120#define AV_OPT_SERIALIZE_SEARCH_CHILDREN 0x00000004
1141 const char key_val_sep,
const char pairs_sep);
Convenience header that includes libavutil's core.
Public libavutil channel layout APIs header.
int av_opt_query_ranges_default(AVOptionRanges **, void *obj, const char *key, int flags)
Get a default list of allowed ranges for the given option.
void av_opt_freep_ranges(AVOptionRanges **ranges)
Free an AVOptionRanges struct and set it to NULL.
int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags)
Get a list of allowed ranges for the given option.
AVOptionType
An option type determines:
@ AV_OPT_TYPE_IMAGE_SIZE
Underlying C type is two consecutive integers.
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_PIXEL_FMT
Underlying C type is enum AVPixelFormat.
@ AV_OPT_TYPE_BINARY
Underlying C type is a uint8_t* that is either NULL or points to an array allocated with the av_mallo...
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
@ AV_OPT_TYPE_SAMPLE_FMT
Underlying C type is enum AVSampleFormat.
@ AV_OPT_TYPE_RATIONAL
Underlying C type is AVRational.
@ AV_OPT_TYPE_FLAGS
Underlying C type is unsigned int.
@ AV_OPT_TYPE_VIDEO_RATE
Underlying C type is AVRational.
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
@ AV_OPT_TYPE_UINT64
Underlying C type is uint64_t.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
@ AV_OPT_TYPE_DICT
Underlying C type is AVDictionary*.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
@ AV_OPT_TYPE_COLOR
Underlying C type is uint8_t[4].
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
struct AVDictionary AVDictionary
AVSampleFormat
Audio sample formats.
int av_opt_eval_float(void *obj, const AVOption *o, const char *val, float *float_out)
int av_opt_eval_uint(void *obj, const AVOption *o, const char *val, unsigned *uint_out)
int av_opt_eval_int(void *obj, const AVOption *o, const char *val, int *int_out)
int av_opt_eval_q(void *obj, const AVOption *o, const char *val, AVRational *q_out)
int av_opt_eval_double(void *obj, const AVOption *o, const char *val, double *double_out)
int av_opt_eval_int64(void *obj, const AVOption *o, const char *val, int64_t *int64_out)
int av_opt_eval_flags(void *obj, const AVOption *o, const char *val, int *flags_out)
int av_opt_get_array(void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType out_type, void *out_val)
For an array-type option, retrieve the values of one or more array elements.
int av_opt_get_pixel_fmt(void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt)
int av_opt_get_array_size(void *obj, const char *name, int search_flags, unsigned int *out_val)
For an array-type option, get the number of elements in the array.
int av_opt_get_double(void *obj, const char *name, int search_flags, double *out_val)
int av_opt_get_chlayout(void *obj, const char *name, int search_flags, AVChannelLayout *layout)
int av_opt_get_dict_val(void *obj, const char *name, int search_flags, AVDictionary **out_val)
int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_out, int *h_out)
int av_opt_get_int(void *obj, const char *name, int search_flags, int64_t *out_val)
int av_opt_get_q(void *obj, const char *name, int search_flags, AVRational *out_val)
int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt)
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
int av_opt_get_video_rate(void *obj, const char *name, int search_flags, AVRational *out_val)
const AVClass * av_opt_child_class_iterate(const AVClass *parent, void **iter)
Iterate over potential AVOptions-enabled children of parent.
int av_opt_get_key_value(const char **ropts, const char *key_val_sep, const char *pairs_sep, unsigned flags, char **rkey, char **rval)
Extract a key-value pair from the beginning of a string.
const AVOption * av_opt_find2(void *obj, const char *name, const char *unit, int opt_flags, int search_flags, void **target_obj)
Look for an option in an object.
const AVOption * av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
Look for an option in an object.
void av_opt_free(void *obj)
Free all allocated objects in obj.
void * av_opt_child_next(void *obj, void *prev)
Iterate over AVOptions-enabled children of obj.
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
void av_opt_set_defaults2(void *s, int mask, int flags)
Set the values of all AVOption fields to their default values.
int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags)
Show the obj options.
const AVOption * av_opt_next(const void *obj, const AVOption *prev)
Iterate over all AVOptions belonging to obj.
@ AV_OPT_FLAG_IMPLICIT_KEY
Accept to parse a value without a key; the key will then be returned as NULL.
int av_opt_flag_is_set(void *obj, const char *field_name, const char *flag_name)
Check whether a particular flag is set in a flags field.
int av_opt_is_set_to_default(void *obj, const AVOption *o)
Check if given option is set to its default value.
void * av_opt_ptr(const AVClass *avclass, void *obj, const char *name)
Gets a pointer to the requested field in a struct.
int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, const char key_val_sep, const char pairs_sep)
Serialize object's options.
int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_flags)
Check if given option is set to its default value.
int av_opt_set_double(void *obj, const char *name, double val, int search_flags)
int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_flags)
int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
int av_opt_set_q(void *obj, const char *name, AVRational val, int search_flags)
int av_opt_set_array(void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType val_type, const void *val)
Add, replace, or remove elements for an array option.
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
int av_opt_set_bin(void *obj, const char *name, const uint8_t *val, int size, int search_flags)
int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layout, int search_flags)
int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags)
int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags)
int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags)
int av_opt_set_pixel_fmt(void *obj, const char *name, enum AVPixelFormat fmt, int search_flags)
int av_opt_copy(void *dest, const void *src)
Copy options from src object into dest object.
int av_opt_set_dict2(void *obj, struct AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
int av_opt_set_from_string(void *ctx, const char *opts, const char *const *shorthand, const char *key_val_sep, const char *pairs_sep)
Parse the key-value pairs list in opts.
int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
Parse the key/value pairs list in opts.
int av_opt_set_dict(void *obj, struct AVDictionary **options)
Set all the options from a given dictionary on an object.
AVPixelFormat
Pixel format.
Utilties for rational number calculation.
An AVChannelLayout holds information about the channel layout of audio data.
Describe the class of an AVClass context structure.
May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options.
const char * def
Native access only.
unsigned size_min
Minimum number of elements in the array.
unsigned size_max
Maximum number of elements in the array, 0 when unlimited.
char sep
Separator between array elements in string representations of this option, used by av_opt_set() and a...
A single allowed range of values, or a single allowed value.
double component_min
Value's component range.
double value_min
Value range.
List of AVOptionRange structs.
int nb_ranges
Number of ranges per component.
AVOptionRange ** range
Array of option ranges.
int nb_components
Number of componentes.
double max
maximum valid value for the option
int offset
Native access only.
const char * unit
The logical unit to which the option belongs.
union AVOption::@14 default_val
Native access only, except when documented otherwise.
const char * help
short English help text
const AVOptionArrayDef * arr
Used for AV_OPT_TYPE_FLAG_ARRAY options.
double min
minimum valid value for the option
int flags
A combination of AV_OPT_FLAG_*.
Rational number (pair of numerator and denominator).