FFmpeg
|
Modules | |
Option setting functions | |
Those functions set the field of obj with the given name to value. | |
Functions | |
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. More... | |
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. More... | |
int | av_opt_set_dict (void *obj, struct AVDictionary **options) |
Set all the options from a given dictionary on an object. More... | |
int | av_opt_set_dict2 (void *obj, struct AVDictionary **options, int search_flags) |
Set all the options from a given dictionary on an object. More... | |
int | av_opt_copy (void *dest, const void *src) |
Copy options from src object into dest object. More... | |
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.
For each key/value pair found, stores the value in the field in ctx that is named like the key. ctx must be an AVClass context, storing is done using AVOptions.
opts | options string to parse, may be NULL |
key_val_sep | a 0-terminated list of characters used to separate key from value |
pairs_sep | a 0-terminated list of characters used to separate two pairs from each other |
Definition at line 1809 of file opt.c.
Referenced by avfilter_graph_segment_create_filters(), command(), ff_stream_add_bitstream_filter(), and main().
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.
For each key=value pair found, set the value of the corresponding option in ctx.
ctx | the AVClass object to set options on |
opts | the options string, key-value pairs separated by a delimiter |
shorthand | a NULL-terminated array of options names for shorthand notation: if the first field in opts has no key part, the key is taken from the first element of shorthand; then again for the second, etc., until either opts is finished, shorthand is finished or a named option is found; after that, all options must be named |
key_val_sep | a 0-terminated list of characters used to separate key from value, for example '=' |
pairs_sep | a 0-terminated list of characters used to separate two pairs from each other, for example ':' or ',' |
Options names must use only the following characters: a-z A-Z 0-9 - . / _ Separators must use characters distinct from option names and from each other.
Definition at line 1889 of file opt.c.
Referenced by bsf_list_append_internal(), ff_dnn_init(), and main().
int av_opt_set_dict | ( | void * | obj, |
struct AVDictionary ** | options | ||
) |
Set all the options from a given dictionary on an object.
obj | a struct whose first element is a pointer to AVClass |
options | options to process. This dictionary will be freed and replaced by a new one containing all options not found in obj. Of course this new dictionary needs to be freed by caller with av_dict_free(). |
Definition at line 1978 of file opt.c.
Referenced by avcodec_open2(), avformat_open_input(), avio_open_dir(), dynamic_set_parameter(), ff_http_do_new_request2(), ffurl_open_whitelist(), init_muxer(), of_parse_iamf_audio_element_layers(), of_parse_iamf_submixes(), and streamcopy_init().
int av_opt_set_dict2 | ( | void * | obj, |
struct AVDictionary ** | options, | ||
int | search_flags | ||
) |
Set all the options from a given dictionary on an object.
obj | a struct whose first element is a pointer to AVClass |
options | options to process. This dictionary will be freed and replaced by a new one containing all options not found in obj. Of course this new dictionary needs to be freed by caller with av_dict_free(). |
search_flags | A combination of AV_OPT_SEARCH_*. |
Definition at line 1954 of file opt.c.
Referenced by av_opt_set_dict(), avfilter_graph_segment_apply_opts(), avfilter_init_dict(), avformat_stream_group_create(), bsf_list_append_internal(), dec_open(), init_muxer(), list_devices_for_context(), of_parse_iamf_submixes(), and ost_add().
int av_opt_copy | ( | void * | dest, |
const void * | src | ||
) |
Copy options from src object into dest object.
The underlying AVClass of both src and dest must coincide. The guarantee below does not apply if this is not fulfilled.
Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. Original memory allocated for such options is freed unless both src and dest options points to the same memory.
Even on error it is guaranteed that allocated options from src and dest no longer alias each other afterwards; in particular calling av_opt_free() on both src and dest is safe afterwards if dest has been memdup'ed from src.
dest | Object to copy from |
src | Object to copy into |
Definition at line 2141 of file opt.c.
Referenced by command(), config_props(), context_init_threaded(), ff_frame_thread_encoder_init(), ffurl_open_whitelist(), and init_thread().