Libav
|
Simple key:value store. More...
Data Structures | |
struct | AVDictionaryEntry |
Macros | |
#define | AV_DICT_MATCH_CASE 1 |
#define | AV_DICT_IGNORE_SUFFIX 2 |
#define | AV_DICT_DONT_STRDUP_KEY 4 |
Take ownership of a key that's been allocated with av_malloc() and children. More... | |
#define | AV_DICT_DONT_STRDUP_VAL 8 |
Take ownership of a value that's been allocated with av_malloc() and chilren. More... | |
#define | AV_DICT_DONT_OVERWRITE 16 |
Don't overwrite existing entries. More... | |
#define | AV_DICT_APPEND 32 |
If the entry already exists, append to it. More... | |
#define | AV_DICT_MATCH_CASE 1 |
#define | AV_DICT_IGNORE_SUFFIX 2 |
#define | AV_DICT_DONT_STRDUP_KEY 4 |
Take ownership of a key that's been allocated with av_malloc() and children. More... | |
#define | AV_DICT_DONT_STRDUP_VAL 8 |
Take ownership of a value that's been allocated with av_malloc() and chilren. More... | |
#define | AV_DICT_DONT_OVERWRITE 16 |
Don't overwrite existing entries. More... | |
#define | AV_DICT_APPEND 32 |
If the entry already exists, append to it. More... | |
Functions | |
AVDictionaryEntry * | av_dict_get (const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags) |
Get a dictionary entry with matching key. More... | |
int | av_dict_count (const AVDictionary *m) |
Get number of entries in dictionary. More... | |
int | av_dict_set (AVDictionary **pm, const char *key, const char *value, int flags) |
Set the given entry in *pm, overwriting an existing entry. More... | |
int | av_dict_parse_string (AVDictionary **pm, const char *str, const char *key_val_sep, const char *pairs_sep, int flags) |
Parse the key/value pairs list and add to a dictionary. More... | |
void | av_dict_copy (AVDictionary **dst, const AVDictionary *src, int flags) |
Copy entries from one AVDictionary struct into another. More... | |
void | av_dict_free (AVDictionary **m) |
Free all the memory allocated for an AVDictionary struct and all keys and values. More... | |
Simple key:value store.
Dictionaries are used for storing key:value pairs. To create an AVDictionary, simply pass an address of a NULL pointer to av_dict_set(). NULL can be used as an empty dictionary wherever a pointer to an AVDictionary is required. Use av_dict_get() to retrieve an entry or iterate over all entries and finally av_dict_free() to free the dictionary and all its contents.
#define AV_DICT_MATCH_CASE 1 |
Definition at line 61 of file dict.h.
Referenced by av_dict_get(), ff_riff_write_info(), get_date_tag(), and riff_has_valid_tags().
#define AV_DICT_IGNORE_SUFFIX 2 |
Definition at line 62 of file dict.h.
Referenced by asf_write_header1(), assert_avoptions(), av_dict_copy(), av_dict_get(), av_opt_set_dict(), avfilter_init_str(), config_output(), configure_filtergraph(), decode_thread(), dump_metadata(), ff_ape_write_tag(), ff_id3v2_write_metadata(), ff_metadata_conv(), ff_vorbiscomment_length(), ff_vorbiscomment_write(), filter_codec_opts(), flv_write_header(), init(), libx265_encode_init(), main(), mkv_write_tag(), mkv_write_tags(), mov_write_string_metadata(), mp3_read_header(), mpc_read_header(), open_input_file(), open_output_file(), probe_dict(), smjpeg_write_header(), stream_component_open(), strip_specifiers(), tta_read_header(), write_chapter(), write_globalinfo(), write_tags(), wv_read_header(), and X264_init().
#define AV_DICT_DONT_STRDUP_KEY 4 |
Take ownership of a key that's been allocated with av_malloc() and children.
Definition at line 63 of file dict.h.
Referenced by av_dict_parse_string(), av_dict_set(), ff_vorbis_comment(), mov_read_replaygain(), read_tag(), and read_ttag().
#define AV_DICT_DONT_STRDUP_VAL 8 |
Take ownership of a value that's been allocated with av_malloc() and chilren.
Definition at line 66 of file dict.h.
Referenced by add_metadata(), ape_tag_read_field(), asf_read_picture(), av_dict_parse_string(), av_dict_set(), avi_read_tag(), ff_flac_parse_picture(), ff_read_riff_info(), ff_rtp_chain_mux_open(), ff_sauce_read(), ff_vorbis_comment(), get_meta(), get_metadata(), mov_read_replaygain(), ogm_chapter(), read_tag(), read_ttag(), set_encoder_id(), smjpeg_read_header(), sox_read_header(), var_read_metadata(), and wc3_read_header().
#define AV_DICT_DONT_OVERWRITE 16 |
Don't overwrite existing entries.
Definition at line 69 of file dict.h.
Referenced by av_dict_set(), copy_metadata(), new_output_stream(), open_output_file(), read_ttag(), set_encoder_id(), and transcode_init().
#define AV_DICT_APPEND 32 |
If the entry already exists, append to it.
Note that no delimiter is added, the strings are simply concatenated.
Definition at line 70 of file dict.h.
Referenced by av_dict_set().
#define AV_DICT_DONT_STRDUP_KEY 4 |
Take ownership of a key that's been allocated with av_malloc() and children.
#define AV_DICT_DONT_STRDUP_VAL 8 |
Take ownership of a value that's been allocated with av_malloc() and chilren.
#define AV_DICT_DONT_OVERWRITE 16 |
#define AV_DICT_APPEND 32 |
AVDictionaryEntry * av_dict_get | ( | const AVDictionary * | m, |
const char * | key, | ||
const AVDictionaryEntry * | prev, | ||
int | flags | ||
) |
Get a dictionary entry with matching key.
prev | Set to the previous matching element to find the next. If set to NULL the first matching element is returned. |
flags | Allows case as well as suffix-insensitive comparisons. |
Definition at line 38 of file dict.c.
Referenced by asf_write_header1(), asf_write_markers(), assert_avoptions(), av_dict_copy(), av_dict_set(), av_dump_format(), av_opt_set_dict(), avfilter_init_str(), avi_write_header(), bwf_write_bext_chunk(), bwf_write_bext_string(), check_stream_specifier(), config_output(), configure_filtergraph(), decode_thread(), dump_attachment(), dump_metadata(), dump_stream_format(), dv_init_mux(), ff_ape_write_tag(), ff_id3v2_write_apic(), ff_id3v2_write_metadata(), ff_metadata_conv(), ff_replaygain_export(), ff_riff_write_info(), ff_vorbiscomment_length(), ff_vorbiscomment_write(), filter_codec_opts(), flac_read_header(), flac_write_header(), flv_read_packet(), flv_write_header(), get_date_tag(), gxf_write_umf_material_description(), id3v1_create_tag(), id3v1_set_string(), init(), init_input_stream(), libx265_encode_init(), main(), matroska_parse_flac(), mkv_write_attachments(), mkv_write_chapters(), mkv_write_header(), mkv_write_stereo_mode(), mkv_write_tag(), mkv_write_tags(), mkv_write_track(), mov_create_chapter_track(), mov_write_3gp_udta_tag(), mov_write_chpl_tag(), mov_write_hdlr_tag(), mov_write_header(), mov_write_string_metadata(), mov_write_track_metadata(), mov_write_trkn_tag(), mov_write_uuidusmt_tag(), mov_write_video_tag(), mp3_read_header(), mpc_read_header(), mpegts_write_header(), mpegts_write_pmt(), mxf_write_header(), open_input_file(), open_output_file(), probe_dict(), riff_has_valid_tags(), rv10_write_header(), sap_write_header(), set_encoder_id(), show_format_entry_integer(), show_format_entry_string(), smjpeg_write_header(), sox_write_header(), stream_component_open(), strip_specifiers(), transcode_init(), tta_read_header(), write_chapter(), write_globalinfo(), write_tags(), wv_read_header(), and X264_init().
int av_dict_count | ( | const AVDictionary * | m | ) |
Get number of entries in dictionary.
m | dictionary |
Definition at line 33 of file dict.c.
Referenced by asf_write_header1(), dump_metadata(), and ff_vorbiscomment_write().
int av_dict_set | ( | AVDictionary ** | pm, |
const char * | key, | ||
const char * | value, | ||
int | flags | ||
) |
Set the given entry in *pm, overwriting an existing entry.
pm | pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *pm. |
key | entry key to add to *pm (will be av_strduped depending on flags) |
value | entry value to add to *pm (will be av_strduped depending on flags). Passing a NULL value will cause an existing entry to be deleted. |
Definition at line 68 of file dict.c.
Referenced by add_metadata(), amf_parse_object(), ape_tag_read_field(), asf_read_header(), asf_read_picture(), av_dict_copy(), av_opt_set_dict(), avformat_find_stream_info(), avi_metadata_creation_time(), avi_read_nikon(), avi_read_tag(), avpriv_new_chapter(), decode_info_header(), ff_flac_parse_picture(), ff_id3v2_parse_apic(), ff_metadata_conv(), ff_parse_mpeg2_descriptor(), ff_read_riff_info(), ff_rtp_chain_mux_open(), ff_sauce_read(), ff_vorbis_comment(), ff_wms_parse_sdp_a_line(), filter_codec_opts(), flac_read_header(), flac_write_header(), get_attachment(), get_meta(), get_metadata(), get_string(), get_tag(), hls_read_header(), icecast_open(), init(), init_filter_graph(), init_input_stream(), init_muxer(), ism_seek(), ism_write_header(), main(), matroska_convert_tag(), matroska_parse_tracks(), matroska_read_header(), merge_date(), mov_metadata_creation_time(), mov_metadata_gnre(), mov_metadata_int8_bypass_padding(), mov_metadata_int8_no_padding(), mov_metadata_loci(), mov_metadata_track_or_disc_number(), mov_parse_stsd_video(), mov_read_ftyp(), mov_read_mdhd(), mov_read_replaygain(), mov_read_udta_string(), mp3_parse_info_tag(), mxf_parse_structural_metadata(), new_output_stream(), nsv_parse_NSVf_header(), ogm_chapter(), open_input_file(), open_output_file(), opt_default(), opt_show_format_entry(), parse_chunks(), parse_icy(), parse_key_value_pair(), parse_tag(), process_unnamed_options(), put_flac_codecpriv(), r3d_read_red1(), read_gab2_sub(), read_info_chunk(), read_tag(), read_ttag(), rm_read_metadata(), rpl_read_header(), rtmp_open(), sap_write_header(), sdt_cb(), set_encoder_id(), smjpeg_read_header(), sox_read_header(), stream_component_open(), strip_specifiers(), transcode_init(), try_decode_frame(), update_metadata(), var_read_metadata(), vqf_read_header(), and wc3_read_header().
int av_dict_parse_string | ( | AVDictionary ** | pm, |
const char * | str, | ||
const char * | key_val_sep, | ||
const char * | pairs_sep, | ||
int | flags | ||
) |
Parse the key/value pairs list and add to a dictionary.
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 |
flags | flags to use when adding to dictionary. AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. |
Definition at line 147 of file dict.c.
Referenced by avfilter_init_str(), libx265_encode_init(), and X264_init().
void av_dict_copy | ( | AVDictionary ** | dst, |
const AVDictionary * | src, | ||
int | flags | ||
) |
Copy entries from one AVDictionary struct into another.
dst | pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst |
src | pointer to source AVDictionary struct |
flags | flags to use when setting entries in *dst |
Definition at line 184 of file dict.c.
Referenced by av_frame_copy_props(), av_opt_get_dict_val(), av_opt_set_dict_val(), avcodec_open2(), avformat_open_input(), copy_chapters(), copy_metadata(), ff_http_do_new_request(), ff_wms_parse_sdp_a_line(), http_open(), http_seek(), init_muxer(), new_output_stream(), open_output_file(), opt_target(), and read_frame_internal().
void av_dict_free | ( | AVDictionary ** | m | ) |
Free all the memory allocated for an AVDictionary struct and all keys and values.
Definition at line 170 of file dict.c.
Referenced by av_opt_free(), av_opt_set_dict(), av_opt_set_dict_val(), avcodec_open2(), avconv_cleanup(), avfilter_init_str(), avformat_find_stream_info(), avformat_free_context(), avformat_open_input(), avprobe_cleanup(), decode_thread(), ff_http_do_new_request(), ff_metadata_conv(), ff_rtp_chain_mux_open(), ff_wms_parse_sdp_a_line(), free_side_data(), http_close(), http_open(), http_seek(), icecast_open(), init_filter_graph(), init_muxer(), ism_seek(), ism_write_header(), libx265_encode_init(), main(), matroska_parse_flac(), open_input_file(), open_output_file(), put_flac_codecpriv(), read_frame_internal(), rtmp_open(), transcode(), try_decode_frame(), uninit(), uninit_opts(), uninit_parse_context(), and X264_init().