FFmpeg
|
Modules | |
Option getting functions | |
Those functions get a value of the option with the given name from an object. | |
Evaluating option strings | |
This group of functions can be used to evaluate option strings and get numbers out of them. They do the same thing as av_opt_set(), except the result is written into the caller-supplied pointer. | |
Macros | |
#define | AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 |
Serialize options that are not set to default values only. More... | |
#define | AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 |
Serialize options that exactly match opt_flags only. More... | |
#define | AV_OPT_SERIALIZE_SEARCH_CHILDREN 0x00000004 |
Serialize options in possible children of the given object. More... | |
Functions | |
attribute_deprecated void * | av_opt_ptr (const AVClass *avclass, void *obj, const char *name) |
Gets a pointer to the requested field in a struct. More... | |
int | av_opt_is_set_to_default (void *obj, const AVOption *o) |
Check if given option is set to its default value. More... | |
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. More... | |
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. More... | |
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. More... | |
#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001 |
#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002 |
#define AV_OPT_SERIALIZE_SEARCH_CHILDREN 0x00000004 |
attribute_deprecated void* av_opt_ptr | ( | const AVClass * | avclass, |
void * | obj, | ||
const char * | name | ||
) |
Gets a pointer to the requested field in a struct.
This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled,
int av_opt_is_set_to_default | ( | void * | obj, |
const AVOption * | o | ||
) |
Check if given option is set to its default value.
Options o must belong to the obj. This function must not be called to check child's options state.
obj | AVClass object to check option on |
o | option to be checked |
Definition at line 2571 of file opt.c.
Referenced by av_opt_is_set_to_default_by_name(), and opt_serialize().
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.
obj | AVClass object to check option on |
name | option name |
search_flags | combination of AV_OPT_SEARCH_* |
Definition at line 2707 of file opt.c.
Referenced by main(), and new_stream_video().
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.
field_name | the name of the flag field option |
flag_name | the name of the flag to check |
Definition at line 1391 of file opt.c.
Referenced by ff_rtp_get_payload_type().
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.
Create a string containing object's serialized options. Such string may be passed back to av_opt_set_from_string() in order to restore option values. A key/value or pairs separator occurring in the serialized value or name string are escaped through the av_escape() function.
[in] | obj | AVClass object to serialize |
[in] | opt_flags | serialize options with all the specified flags set (AV_OPT_FLAG) |
[in] | flags | combination of AV_OPT_SERIALIZE_* flags |
[out] | buffer | Pointer to buffer that will be allocated with string containg serialized options. Buffer must be freed by the caller when is no longer needed. |
[in] | key_val_sep | character used to separate key from value |
[in] | pairs_sep | character used to separate two pairs from each other |
Definition at line 2762 of file opt.c.
Referenced by main(), and of_serialize_options().