|
FFmpeg
|
Buffer to print data progressively. More...
#include <libavutil/bprint.h>
Data Fields | |
| char * | str |
| string so far | |
| unsigned | len |
| length so far | |
| unsigned | size |
| allocated memory | |
| unsigned | size_max |
| maximum allocated memory | |
| char | reserved_internal_buffer [1] |
Buffer to print data progressively.
The string buffer grows as necessary and is always 0-terminated. The content of the string is never accessed, and thus is encoding-agnostic and can even hold binary data.
Small buffers are kept in the structure itself, and thus require no memory allocation at all (unless the contents of the buffer is needed after the structure goes out of scope). This is almost as lightweight as declaring a local char buf[512].
The length of the string can go beyond the allocated size: the buffer is then truncated, but the functions still keep account of the actual total length.
In other words, AVBPrint.len can be greater than AVBPrint.size and records the total length of what would have been to the buffer if there had been enough memory.
Append operations do not need to be tested for failure: if a memory allocation fails, data stop being appended to the buffer, but the length is still updated. This situation can be tested with av_bprint_is_complete().
The AVBPrint.size_max field determines several possible behaviours:
| char* AVBPrint::str |
string so far
Definition at line 99 of file bprint.h.
Referenced by add_event(), aribcaption_trans_ass_subtitle(), asmgen(), av_bprint_alloc(), av_bprint_append_data(), av_bprint_chars(), av_bprint_clear(), av_bprint_finalize(), av_bprint_get_buffer(), av_bprint_grow(), av_bprint_init(), av_bprint_init_for_buffer(), av_bprint_strftime(), av_vbprintf(), avcodec_string(), avio_vprintf(), avtext_context_open(), avtext_print_data(), channel_layout_retype(), chunk_end(), compact_print_int(), compact_print_section_header(), compact_print_str(), concat_parse_script(), config_output(), configure_audio_filters(), configure_input_audio_filter(), configure_output_audio_filter(), configure_output_video_filter(), create_ass_text(), dashenc_delete_segment_file(), decode_text_chunk(), decode_zbuf(), default_print_int(), default_print_section_header(), default_print_str(), disp_tree(), draw_qrcode(), dump_curves(), exchange_sdp(), ff_bprint_finalize_as_fam(), ff_iamf_add_audio_element(), ff_imf_parse_cpl(), ff_img_read_packet(), ff_print_debug_info2(), ff_print_time(), ff_ssl_read_key_cert(), ff_subtitles_queue_insert_bprint(), ff_sws_op_list_print(), ff_tx_init_subtx(), ff_url_read_all(), find_image_range(), flat_print_int(), flat_print_section_header(), flat_print_str(), flush_segment(), format_line(), gen_sub_ass(), gen_sub_text(), generate_sdp_offer(), get_bprint_line(), get_channel_layout_desc(), get_line(), gif_read_header(), has_link_pair(), hls_delete_old_segments(), ini_print_section_header(), init_report(), ist_add(), json_print_section_header(), libaribb24_handle_regions(), main(), make_command_flags_str(), mermaid_print_section_footer(), mermaid_print_section_header(), mermaid_subgraph_complete_start(), microdvd_decode_frame(), microdvd_init(), mov_read_kind(), mov_text_decode_frame(), mpl2_decode_frame(), of_map_group(), parse_assetmap(), parse_file(), parse_manifest(), parse_psfile(), print_cd_info(), print_dovi_metadata(), print_filter_formats(), print_filtergraphs_priv(), print_integers(), print_link_formats(), print_op(), print_report(), print_sanizied_id(), print_section_header_id(), print_streams(), query_formats(), read_header(), realtext_decode_frame(), realtext_read_header(), rstrip_spaces_buf(), sami_decode_frame(), sami_paragraph_to_ass(), sami_read_header(), sbg_read_header(), send_frame(), setup_protocols(), show_stream(), subviewer_decode_frame(), text_decode_frame(), tlog_ref(), tls_load_key_cert(), ttml_text_cb(), validate_string(), video_refresh(), webvtt_decode_frame(), webvtt_read_header(), write_frame(), write_packet(), xml_print_section_header(), and xml_print_value().
| unsigned AVBPrint::len |
length so far
Definition at line 99 of file bprint.h.
Referenced by add_event(), av_bprint_alloc(), av_bprint_append_data(), av_bprint_chars(), av_bprint_clear(), av_bprint_finalize(), av_bprint_get_buffer(), av_bprint_grow(), av_bprint_init(), av_bprint_init_for_buffer(), av_bprint_is_complete(), av_bprint_strftime(), av_channel_description(), av_channel_layout_describe(), av_channel_name(), av_escape(), av_vbprintf(), avcodec_string(), avfilter_graph_dump(), avfilter_graph_dump_to_buf(), avio_vprintf(), bprint_to_extradata(), configure_output_audio_filter(), configure_output_video_filter(), decode_iccp_chunk(), decode_text_chunk(), decode_zbuf(), disp_tree(), dump_curves(), ff_bprint_finalize_as_fam(), ff_bprint_to_codecpar_extradata(), ff_imf_parse_cpl(), ff_img_read_packet(), ff_print_time(), ff_ssl_read_key_cert(), ff_subtitles_queue_insert_bprint(), format_line(), gen_sub_ass(), gen_sub_text(), indent_to(), ist_add(), mermaid_print_section_footer(), mermaid_print_value(), mermaid_subgraph_complete_start(), microdvd_decode_frame(), mpsub_read_header(), parse_assetmap(), parse_manifest(), print_filtergraph(), print_filtergraphs_priv(), print_link_prop(), print_report(), query_formats(), rasm_print(), read_header(), read_string_to_bprint_overwrite(), realtext_read_header(), rstrip_spaces_buf(), sami_paragraph_to_ass(), sbg_read_header(), send_frame(), setup_protocols(), srt_read_header(), webvtt_read_header(), write_frame(), and write_packet().
| unsigned AVBPrint::size |
allocated memory
Definition at line 99 of file bprint.h.
Referenced by av_bprint_alloc(), av_bprint_finalize(), av_bprint_grow(), av_bprint_init(), av_bprint_init_for_buffer(), av_bprint_is_complete(), avcodec_string(), ff_print_time(), ff_ssl_read_key_cert(), format_line(), parse_file(), print_filtergraphs_priv(), and print_report().
| unsigned AVBPrint::size_max |
maximum allocated memory
Definition at line 99 of file bprint.h.
Referenced by av_bprint_alloc(), av_bprint_init(), and av_bprint_init_for_buffer().
| char AVBPrint::reserved_internal_buffer[1] |
Definition at line 99 of file bprint.h.
Referenced by av_bprint_init().