|
FFmpeg
|
Macros | |
| #define | AV_OPT_SEARCH_CHILDREN (1 << 0) |
| Search in possible children of the given object first. | |
| #define | AV_OPT_SEARCH_FAKE_OBJ (1 << 1) |
| The obj passed to av_opt_find() or av_opt_set() is fake – only a double pointer to AVClass instead of a required pointer to a struct containing AVClass. | |
| #define | AV_OPT_ALLOW_NULL (1 << 2) |
| In av_opt_get, return NULL if the option has a pointer type and is set to NULL, rather than returning an empty string. | |
| #define | AV_OPT_ARRAY_REPLACE (1 << 3) |
| May be used with av_opt_set_array() to signal that new elements should replace the existing ones in the indicated range. | |
| #define | AV_OPT_MULTI_COMPONENT_RANGE (1 << 12) |
| Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than one component for certain option types. | |
Enumerations | |
| enum | { AV_OPT_FLAG_IMPLICIT_KEY = 1 } |
Functions | |
| 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. | |
| void | av_opt_free (void *obj) |
| Free all allocated objects in obj. | |
| const AVOption * | av_opt_next (const void *obj, const AVOption *prev) |
| Iterate over all AVOptions belonging to obj. | |
| void * | av_opt_child_next (void *obj, void *prev) |
| Iterate over AVOptions-enabled children of obj. | |
| const AVClass * | av_opt_child_class_iterate (const AVClass *parent, void **iter) |
| Iterate over potential AVOptions-enabled children of parent. | |
| 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. | |
| 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. | |
| int | av_opt_show2 (void *obj, void *av_log_obj, int req_flags, int rej_flags) |
| Show the obj options. | |
| 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. | |
| #define AV_OPT_SEARCH_CHILDREN (1 << 0) |
Search in possible children of the given object first.
Definition at line 604 of file opt.h.
Referenced by apply_enc_options(), av_bsf_init_dict(), av_opt_find2(), av_probe_input_buffer2(), avcodec_open2(), avfilter_graph_segment_apply_opts(), avfilter_init_dict(), avformat_find_stream_info(), avformat_stream_group_create(), avtext_context_open(), bsf_list_append_internal(), check_avoptions_used(), configure_audio_filters(), configure_video_filters(), dec_open(), estimate_timings_from_pts(), ff_encode_reconf_parse_dict(), ff_filter_process_command(), ff_rtp_chain_mux_open(), ffio_copy_url_options(), filter_opt_apply(), init_filter(), init_filter_graph(), init_filters(), init_filters(), init_muxer(), insert_trim(), lavfi_read_header(), list_devices_for_context(), main(), mpjpeg_get_boundary(), multiview_setup(), new_stream_video(), of_parse_iamf_submixes(), open_url(), open_url(), opt_default(), ost_add(), parse_key_value_pair(), parse_manifest(), parse_playlist(), pcm_read_header(), process_client(), read_data_continuous(), read_frame_internal(), and set_string_number().
| #define AV_OPT_SEARCH_FAKE_OBJ (1 << 1) |
The obj passed to av_opt_find() or av_opt_set() is fake – only a double pointer to AVClass instead of a required pointer to a struct containing AVClass.
This is useful for searching for options or verifying they can be applied without needing to allocate the corresponding object.
Definition at line 612 of file opt.h.
Referenced by av_opt_find2(), check_avoptions_used(), ff_encode_reconf_parse_dict(), filter_codec_opts(), ifile_open(), opt_default(), opt_list(), opt_set_init(), and stream_specifier_parse().
| #define AV_OPT_ALLOW_NULL (1 << 2) |
In av_opt_get, return NULL if the option has a pointer type and is set to NULL, rather than returning an empty string.
Definition at line 618 of file opt.h.
Referenced by av_opt_get(), main(), and opt_get_elem().
| #define AV_OPT_ARRAY_REPLACE (1 << 3) |
May be used with av_opt_set_array() to signal that new elements should replace the existing ones in the indicated range.
Definition at line 624 of file opt.h.
Referenced by av_opt_set_array().
| #define AV_OPT_MULTI_COMPONENT_RANGE (1 << 12) |
Allows av_opt_query_ranges and av_opt_query_ranges_default to return more than one component for certain option types.
Definition at line 631 of file opt.h.
Referenced by av_opt_query_ranges().
| anonymous enum |
| void av_opt_set_defaults | ( | void * | s | ) |
Set the values of all AVOption fields to their default values.
| s | an AVOption-enabled struct (its first member must be a pointer to AVClass) |
Definition at line 1754 of file opt.c.
Referenced by av_bsf_alloc(), av_bsf_graph_alloc(), av_iamf_audio_element_alloc(), av_iamf_mix_presentation_alloc(), av_iamf_param_definition_alloc(), avcodec_dct_alloc(), avcodec_open2(), avfilter_graph_alloc(), avformat_alloc_context(), avformat_alloc_output_context2(), avformat_open_input(), avformat_stream_group_create(), avtext_context_open(), avtextwriter_context_open(), ff_alloc_input_device_context(), ff_bsf_alloc(), ff_dnn_init_child_class(), ff_filter_alloc(), ff_framesync_preinit(), ff_packetsync_preinit(), init(), init_context_defaults(), init_muxer(), main(), ofilter_alloc(), swr_alloc(), sws_alloc_context(), and url_alloc_for_protocol().
| void av_opt_set_defaults2 | ( | void * | s, |
| int | mask, | ||
| int | flags ) |
Set the values of all AVOption fields to their default values.
Only these AVOption fields for which (opt->flags & mask) == flags will have their default applied to s.
| s | an AVOption-enabled struct (its first member must be a pointer to AVClass) |
| mask | combination of AV_OPT_FLAG_* |
| flags | combination of AV_OPT_FLAG_* |
Definition at line 1759 of file opt.c.
Referenced by av_opt_set_defaults(), and init_context_defaults().
| void av_opt_free | ( | void * | obj | ) |
Free all allocated objects in obj.
Definition at line 2025 of file opt.c.
Referenced by av_bsf_free(), av_bsf_graph_free(), av_iamf_audio_element_free(), av_iamf_mix_presentation_free(), av_write_trailer(), avfilter_free(), avfilter_graph_free(), avformat_free_context(), avio_close(), avtext_context_close(), avtextwriter_context_close(), close(), command(), ff_bsf_free(), ff_codec_close(), ff_frame_thread_free(), ff_free_stream_group(), ffurl_closep(), and main().
Iterate over all AVOptions belonging to obj.
| obj | an AVOptions-enabled struct or a double pointer to an AVClass describing it. |
| prev | result of the previous call to av_opt_next() on this object or NULL |
Definition at line 47 of file opt.c.
Referenced by av_opt_copy(), av_opt_find2(), av_opt_free(), av_opt_set_defaults2(), bsf_list_append_internal(), bsf_opt_parse(), ff_filter_opt_parse(), get_opt_const_name(), get_opt_flags_string(), main(), opt_list(), opt_serialize(), print_option(), print_private_data(), set_string_number(), and show_opts().
| void * av_opt_child_next | ( | void * | obj, |
| void * | prev ) |
Iterate over AVOptions-enabled children of obj.
| prev | result of a previous call to this function or NULL |
Definition at line 2118 of file opt.c.
Referenced by av_opt_find2(), and opt_serialize().
Iterate over potential AVOptions-enabled children of parent.
| iter | a pointer where iteration state is stored. |
Definition at line 2126 of file opt.c.
Referenced by av_opt_find2(), and show_help_children().
| 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.
Consider only options which have all the specified flags set.
| [in] | obj | A pointer to a struct whose first element is a pointer to an AVClass. Alternatively a double pointer to an AVClass, if AV_OPT_SEARCH_FAKE_OBJ search flag is set. |
| [in] | name | The name of the option to look for. |
| [in] | unit | When searching for named constants, name of the unit it belongs to. |
| opt_flags | Find only options with all the specified flags set (AV_OPT_FLAG). | |
| search_flags | A combination of AV_OPT_SEARCH_*. |
Definition at line 2067 of file opt.c.
Referenced by av_opt_flag_is_set(), av_opt_query_ranges_default(), check_avoptions_used(), check_opt_bitexact(), ff_encode_reconf_parse_dict(), filter_codec_opts(), filter_opt_apply(), find_opt(), ifile_open(), main(), opt_find(), parse_options(), set_string_number(), and stream_specifier_parse().
| 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.
Consider only options which have all the specified flags set.
| [in] | obj | A pointer to a struct whose first element is a pointer to an AVClass. Alternatively a double pointer to an AVClass, if AV_OPT_SEARCH_FAKE_OBJ search flag is set. |
| [in] | name | The name of the option to look for. |
| [in] | unit | When searching for named constants, name of the unit it belongs to. |
| opt_flags | Find only options with all the specified flags set (AV_OPT_FLAG). | |
| search_flags | A combination of AV_OPT_SEARCH_*. | |
| [out] | target_obj | if non-NULL, an object to which the option belongs will be written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present in search_flags. This parameter is ignored if search_flags contain AV_OPT_SEARCH_FAKE_OBJ. |
Definition at line 2073 of file opt.c.
Referenced by av_opt_find(), av_opt_find2(), av_opt_get(), av_opt_get_array(), av_opt_get_array_size(), av_opt_get_chlayout(), av_opt_get_dict_val(), av_opt_get_image_size(), av_opt_is_set_to_default_by_name(), ff_filter_process_command(), get_format(), get_number(), main(), and opt_set_init().
| int av_opt_show2 | ( | void * | obj, |
| void * | av_log_obj, | ||
| int | req_flags, | ||
| int | rej_flags ) |
Show the obj options.
| req_flags | requested flags for the options to show. Show only the options for which it is opt->flags & req_flags. |
| rej_flags | rejected flags for the options to show. Show only the options for which it is !(opt->flags & req_flags). |
| av_log_obj | log context to use for showing the options |
Definition at line 1742 of file opt.c.
Referenced by main(), and show_help_children().
| 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.
| ropts | pointer to the options string, will be updated to point to the rest of the string (one of the pairs_sep or the final NUL) |
| 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 ',' |
| flags | flags; see the AV_OPT_FLAG_* values below |
| rkey | parsed key; must be freed using av_free() |
| rval | parsed value; must be freed using av_free() |
Definition at line 1951 of file opt.c.
Referenced by av_opt_set_from_string(), bsf_opt_parse(), ff_filter_opt_parse(), ff_tee_parse_slave_options(), init_report(), and parse_channel_list().