Modules
Those functions get a value of the option with the given name from an object.
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
Serialize options that are not set to default values only.
More...
Serialize options that exactly match opt_flags only.
More...
Functions
Gets a pointer to the requested field in a struct.
More...
Check if given option is set to its default value.
More...
Check if given option is set to its default value.
More...
Check whether a particular flag is set in a flags field.
More...
Serialize object's options.
More...
Detailed Description
Macro Definition Documentation
◆ AV_OPT_SERIALIZE_SKIP_DEFAULTS
#define AV_OPT_SERIALIZE_SKIP_DEFAULTS 0x00000001
Serialize options that are not set to default values only.
Definition at line 930 of file opt.h.
◆ AV_OPT_SERIALIZE_OPT_FLAGS_EXACT
#define AV_OPT_SERIALIZE_OPT_FLAGS_EXACT 0x00000002
Serialize options that exactly match opt_flags only.
Definition at line 931 of file opt.h.
Function Documentation
◆ av_opt_ptr()
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,
- Returns
- a pointer to the field, it can be cast to the correct type and read or written to.
Definition at line 2016 of file opt.c.
Referenced by avformat_find_stream_info().
◆ av_opt_is_set_to_default()
int av_opt_is_set_to_default
(
void *
obj,
)
◆ av_opt_is_set_to_default_by_name()
int av_opt_is_set_to_default_by_name
(
void *
obj,
const char *
name,
)
Check if given option is set to its default value.
- Parameters
-
obj
AVClass object to check option on
name option name
search_flags combination of AV_OPT_SEARCH_*
- Returns
- >0 when option is set to its default, 0 when option is not set its default, <0 on error
Definition at line 2372 of file opt.c.
Referenced by main().
◆ av_opt_flag_is_set()
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.
- Parameters
-
field_name the name of the flag field option
flag_name the name of the flag to check
- Returns
- non-zero if the flag is set, zero if the flag isn't set, isn't of the right type, or the flags field doesn't exist.
Definition at line 1341 of file opt.c.
Referenced by ff_rtp_get_payload_type().
◆ av_opt_serialize()
int av_opt_serialize
(
void *
obj,
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.
- Parameters
-
[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
- Returns
- >= 0 on success, negative on error
- Warning
- Separators cannot be neither '\' nor '0円'. They also cannot be the same.
Definition at line 2384 of file opt.c.
Referenced by main().