FFmpeg
|
Format I/O context. More...
#include <avformat.h>
Data Fields | |
const AVClass * | av_class |
A class for logging and AVOptions. More... | |
ff_const59 struct AVInputFormat * | iformat |
The input container format. More... | |
ff_const59 struct AVOutputFormat * | oformat |
The output container format. More... | |
void * | priv_data |
Format private data. More... | |
AVIOContext * | pb |
I/O context. More... | |
int | ctx_flags |
Flags signalling stream properties. More... | |
unsigned int | nb_streams |
Number of elements in AVFormatContext.streams. More... | |
AVStream ** | streams |
A list of all streams in the file. More... | |
char * | url |
input or output URL. More... | |
int64_t | start_time |
Position of the first frame of the component, in AV_TIME_BASE fractional seconds. More... | |
int64_t | duration |
Duration of the stream, in AV_TIME_BASE fractional seconds. More... | |
int64_t | bit_rate |
Total stream bitrate in bit/s, 0 if not available. More... | |
unsigned int | packet_size |
int | max_delay |
int | flags |
Flags modifying the (de)muxer behaviour. More... | |
int64_t | probesize |
Maximum size of the data read from input for determining the input container format. More... | |
int64_t | max_analyze_duration |
Maximum duration (in AV_TIME_BASE units) of the data read from input in avformat_find_stream_info(). More... | |
const uint8_t * | key |
int | keylen |
unsigned int | nb_programs |
AVProgram ** | programs |
enum AVCodecID | video_codec_id |
Forced video codec_id. More... | |
enum AVCodecID | audio_codec_id |
Forced audio codec_id. More... | |
enum AVCodecID | subtitle_codec_id |
Forced subtitle codec_id. More... | |
unsigned int | max_index_size |
Maximum amount of memory in bytes to use for the index of each stream. More... | |
unsigned int | max_picture_buffer |
Maximum amount of memory in bytes to use for buffering frames obtained from realtime capture devices. More... | |
unsigned int | nb_chapters |
Number of chapters in AVChapter array. More... | |
AVChapter ** | chapters |
AVDictionary * | metadata |
Metadata that applies to the whole file. More... | |
int64_t | start_time_realtime |
Start time of the stream in real world time, in microseconds since the Unix epoch (00:00 1st January 1970). More... | |
int | fps_probe_size |
The number of frames used for determining the framerate in avformat_find_stream_info(). More... | |
int | error_recognition |
Error recognition; higher values will detect more errors but may misdetect some more or less valid parts as errors. More... | |
AVIOInterruptCB | interrupt_callback |
Custom interrupt callbacks for the I/O layer. More... | |
int | debug |
Flags to enable debugging. More... | |
int64_t | max_interleave_delta |
Maximum buffering duration for interleaving. More... | |
int | strict_std_compliance |
Allow non-standard and experimental extension. More... | |
int | event_flags |
Flags for the user to detect events happening on the file. More... | |
int | max_ts_probe |
Maximum number of packets to read while waiting for the first timestamp. More... | |
int | avoid_negative_ts |
Avoid negative timestamps during muxing. More... | |
int | ts_id |
Transport stream id. More... | |
int | audio_preload |
Audio preload in microseconds. More... | |
int | max_chunk_duration |
Max chunk time in microseconds. More... | |
int | max_chunk_size |
Max chunk size in bytes Note, not all formats support this and unpredictable things may happen if it is used when not supported. More... | |
int | use_wallclock_as_timestamps |
forces the use of wallclock timestamps as pts/dts of packets This has undefined results in the presence of B frames. More... | |
int | avio_flags |
avio flags, used to force AVIO_FLAG_DIRECT. More... | |
enum AVDurationEstimationMethod | duration_estimation_method |
The duration field can be estimated through various ways, and this field can be used to know how the duration was estimated. More... | |
int64_t | skip_initial_bytes |
Skip initial bytes when opening stream. More... | |
unsigned int | correct_ts_overflow |
Correct single timestamp overflows. More... | |
int | seek2any |
Force seeking to any (also non key) frames. More... | |
int | flush_packets |
Flush the I/O context after each packet. More... | |
int | probe_score |
format probing score. More... | |
int | format_probesize |
number of bytes to read maximally to identify format. More... | |
char * | codec_whitelist |
',' separated list of allowed decoders. More... | |
char * | format_whitelist |
',' separated list of allowed demuxers. More... | |
AVFormatInternal * | internal |
An opaque field for libavformat internal usage. More... | |
int | io_repositioned |
IO repositioned flag. More... | |
AVCodec * | video_codec |
Forced video codec. More... | |
AVCodec * | audio_codec |
Forced audio codec. More... | |
AVCodec * | subtitle_codec |
Forced subtitle codec. More... | |
AVCodec * | data_codec |
Forced data codec. More... | |
int | metadata_header_padding |
Number of bytes to be written as padding in a metadata header. More... | |
void * | opaque |
User data. More... | |
av_format_control_message | control_message_cb |
Callback used by devices to communicate with application. More... | |
int64_t | output_ts_offset |
Output timestamp offset, in microseconds. More... | |
uint8_t * | dump_separator |
dump format separator. More... | |
enum AVCodecID | data_codec_id |
Forced Data codec_id. More... | |
char * | protocol_whitelist |
',' separated list of allowed protocols. More... | |
int(* | io_open )(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options) |
A callback for opening new IO streams. More... | |
void(* | io_close )(struct AVFormatContext *s, AVIOContext *pb) |
A callback for closing the streams opened with AVFormatContext.io_open(). More... | |
char * | protocol_blacklist |
',' separated list of disallowed protocols. More... | |
int | max_streams |
The maximum number of streams. More... | |
int | skip_estimate_duration_from_pts |
Skip duration calcuation in estimate_timings_from_pts. More... | |
Format I/O context.
New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVFormatContext) must not be used outside libav*, use avformat_alloc_context() to create an AVFormatContext.
Fields can be accessed through AVOptions (av_opt*), the name string used matches the associated command line parameter name and can be found in libavformat/options_table.h. The AVOption/command line parameter names differ in some cases from the C structure field names for historic reasons or brevity.
Definition at line 1342 of file avformat.h.
const AVClass* AVFormatContext::av_class |
A class for logging and AVOptions.
Set by avformat_alloc_context(). Exports (de)muxer private options if they exist.
Definition at line 1347 of file avformat.h.
Referenced by av_bsf_alloc(), av_hwdevice_ctx_alloc(), and av_hwframe_ctx_alloc().
ff_const59 struct AVInputFormat* AVFormatContext::iformat |
The input container format.
Demuxing only, set by avformat_open_input().
Definition at line 1354 of file avformat.h.
Referenced by assert_file_overwrite(), av_demuxer_open(), av_dump_format(), avformat_find_stream_info(), dump_stream_format(), estimate_timings(), open_input_file(), rawvideo_read_header(), read_thread(), show_format(), show_stream(), and v210_read_header().
ff_const59 struct AVOutputFormat* AVFormatContext::oformat |
The output container format.
Muxing only, must be set by the caller before avformat_write_header().
Definition at line 1361 of file avformat.h.
Referenced by add_stream(), av_dump_format(), chunk_end(), chunk_mux_init(), dash_check_bitstream(), dash_init(), do_video_out(), dump_stream_format(), ff_rtp_chain_mux_open(), hds_write_header(), hls_mux_init(), hls_start(), hls_write_packet(), init_fps(), init_output_stream_encode(), init_output_stream_streamcopy(), ism_write_header(), log_slave(), main(), mpeg_mux_init(), mpegts_init(), new_output_stream(), open_output_file(), print_sdp(), rtp_mpegts_write_header(), seg_check_bitstream(), seg_write_header(), segment_mux_init(), segment_start(), transcode_init(), webm_chunk_write_header(), webm_chunk_write_packet(), and webm_chunk_write_trailer().
void* AVFormatContext::priv_data |
Format private data.
This is an AVOptions-enabled struct if and only if iformat/oformat.priv_class is not NULL.
Definition at line 1370 of file avformat.h.
Referenced by add_display_matrix(), add_file(), add_video_stream(), android_camera_read_close(), android_camera_read_header(), android_camera_read_packet(), apng_write_header(), apng_write_packet(), apng_write_trailer(), av1_frame_split_close(), av1_frame_split_filter(), av1_frame_split_flush(), av1_frame_split_init(), av1_parser_close(), av1_parser_init(), av1_parser_parse(), av_bitstream_filter_init(), av_bsf_alloc(), av_bsf_free(), av_bsf_list_finalize(), avformat_find_stream_info(), avpacket_queue_init(), bsf_child_next(), camera_dev_disconnected(), camera_dev_error(), cbs_av1_close(), cbs_av1_read_unit(), cbs_av1_write_obu(), cbs_h2645_split_fragment(), cbs_h264_close(), cbs_h265_close(), cdef_params(), chunk_mux_init(), cine_read_packet(), cine_read_seek(), close_slaves(), color_config(), concat_read_close(), concat_read_header(), concat_read_packet(), concat_seek(), convert_timestamp(), create_capture_session(), create_image_reader(), create_subcc_packet(), create_subcc_streams(), daala_gptopts(), dec_ref_pic_marking(), decklink_input_callback::decklink_input_callback(), decklink_select_input(), decklink_setup_audio(), decklink_setup_video(), decklink_write_audio_packet(), decklink_write_video_packet(), detect_stream_specific(), device_init(), device_open(), dshow_add_device(), dshow_cycle_devices(), dshow_cycle_formats(), dshow_cycle_pins(), dshow_list_device_options(), dshow_open_device(), dshow_read_header(), dshow_set_audio_buffer_size(), dshow_try_setup_crossbar_options(), dump_extradata(), efi_read(), encode_nals(), extract_extradata_av1(), extract_extradata_close(), extract_extradata_filter(), extract_extradata_h2645(), extract_extradata_init(), extract_extradata_mpeg12(), extract_extradata_mpeg4(), extract_extradata_vc1(), failing_deinit(), failing_write_header(), failing_write_packet(), failing_write_trailer(), fbdev_read_close(), fbdev_read_header(), fbdev_read_packet(), ff_alsa_open(), ff_cbs_close(), ff_cbs_init(), ff_decklink_cleanup(), ff_decklink_init_device(), ff_decklink_list_formats(), ff_decklink_read_close(), ff_decklink_read_header(), ff_decklink_read_packet(), ff_decklink_set_configs(), ff_decklink_set_format(), ff_decklink_write_header(), ff_decklink_write_packet(), ff_decklink_write_trailer(), ff_rtp_send_h261(), ff_rtp_send_vp9(), fifo_consumer_thread(), fifo_deinit(), fifo_init(), fifo_mux_init(), fifo_thread_attempt_recovery(), fifo_thread_flush_output(), fifo_thread_process_recovery_failure(), fifo_thread_recover(), fifo_thread_write_header(), fifo_thread_write_packet(), fifo_thread_write_trailer(), fifo_write_header(), fifo_write_packet(), fifo_write_trailer(), film_grain_params(), film_init(), film_write_header(), film_write_packet(), flush_packet(), frame_header_obu(), frame_size(), frame_size_with_refs(), frm_read_packet(), gdv_read_header(), gdv_read_packet(), get_current_fragment(), get_image_format(), get_metadata(), get_sensor_orientation(), get_system_header_size(), get_vcd_padding_size(), h264_extradata_to_annexb(), h264_mp4toannexb_filter(), h264_mp4toannexb_flush(), h264_mp4toannexb_init(), hevc_mp4toannexb_filter(), hevc_mp4toannexb_init(), hls_start(), hls_write_packet(), image_available(), init_convert_timestamp(), kmsgrab_read_close(), kmsgrab_read_header(), kmsgrab_read_packet(), lavfi_read_close(), lavfi_read_header(), lavfi_read_packet(), list_formats(), list_standards(), loop_filter_params(), lr_params(), match_framerate(), match_streams(), match_streams_exact_id(), match_streams_one_to_one(), match_video_size(), mmap_init(), mmap_read_frame(), mmap_start(), mpeg4_unpack_bframes_filter(), mpeg4_unpack_bframes_init(), mpeg_mux_init(), mpeg_mux_write_packet(), mv_read_header(), mv_read_packet(), mv_read_seek(), noise(), open_camera(), open_file(), open_next_file(), opus_decode_flush(), opus_find_frame_end(), opus_header(), opus_packet(), opus_parse(), output_packet(), parse_audio_var(), parse_device_name(), parse_global_var(), picture_coding_extension(), picture_display_extension(), pps(), pps_range_extension(), pred_weight_table(), put_pack_header(), put_padding_packet(), put_system_header(), put_vcd_padding_sector(), quantization_params(), rawvideo_read_header(), read_close(), read_data(), read_header(), read_packet(), read_seek(), read_tx_mode(), real_seek(), reconfig_encoder(), ref_pic_list_modification(), remove_extradata(), remove_extradata_close(), remove_extradata_init(), render_size(), rv10_write_header(), sbg_read_header(), scalability_structure(), scan_file(), scc_write_header(), scc_write_packet(), sds_read_header(), sds_read_packet(), segment_start(), sei_active_parameter_sets(), sei_buffering_period(), sei_decoded_picture_hash(), sei_pic_timing(), send_packet(), send_picture(), sequence_extension(), sequence_header(), setup_crossbar_options(), skip_mode_params(), slice_header(), slice_segment_header(), smush_read_header(), smush_read_packet(), sps(), srt_write_header(), srt_write_packet(), superres_params(), synth_frame(), synth_superframe(), tedcaptions_read_close(), tedcaptions_read_header(), tedcaptions_read_packet(), tedcaptions_read_seek(), tee_process_slave_failure(), tee_write_header(), tee_write_packet(), tee_write_trailer(), temporal_delimiter_obu(), test_copy_print_codec(), theora_gptopts(), tile_group_obu(), tile_info(), truehd_core_filter(), truehd_core_flush(), try_seek(), uncompressed_header(), update_init_section(), v210_read_header(), v4l2_get_device_list(), v4l2_read_close(), v4l2_read_header(), v4l2_read_packet(), v4l2_set_parameters(), decklink_input_callback::VideoInputFrameArrived(), vp9_superframe_close(), vp9_superframe_filter(), vp9_superframe_flush(), vp9_superframe_init(), vp9_superframe_split_filter(), vp9_superframe_split_flush(), vp9_superframe_split_init(), vp9_superframe_split_uninit(), wait_for_image_format(), wmavoice_decode_end(), wmavoice_decode_init(), wmavoice_decode_packet(), wmavoice_flush(), write_headers(), write_streamheader(), wv_read_block_header(), wv_write_packet(), wv_write_trailer(), and X264_frame().
AVIOContext* AVFormatContext::pb |
I/O context.
Do NOT set this field if AVFMT_NOFILE flag is set in iformat/oformat.flags. In such a case, the (de)muxer will handle I/O in some other way and this field will be NULL.
Definition at line 1384 of file avformat.h.
Referenced by apng_write_header(), apng_write_trailer(), asfrtp_parse_packet(), av_demuxer_open(), avformat_find_stream_info(), avi_read_close(), chunk_end(), chunk_start(), cine_read_header(), cine_read_packet(), cine_read_seek(), close_demux_for_component(), close_slave(), concat_read_header(), dash_flush(), dash_free(), dash_init(), dash_write_packet(), dnxhd_encode_block(), dnxhd_encode_dc(), dnxhd_encode_thread(), efi_read(), estimate_timings(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), event_loop(), ff_mov_add_hinted_packet(), ff_mov_close_hinting(), ff_rtp_chain_mux_open(), ff_rtsp_tcp_write_packet(), ff_rtsp_undo_setup(), ff_sauce_read(), ff_wms_parse_sdp_a_line(), fifo_thread_write_trailer(), film_write_header(), film_write_packet(), film_write_packet_to_header(), finish(), flush_dynbuf(), flush_packet(), free_playlist_list(), free_representation(), frm_read_header(), frm_read_packet(), gdv_read_header(), gdv_read_packet(), hds_flush(), hds_free(), hds_write_header(), hls_mux_init(), hls_read_header(), hls_start(), hls_window(), hls_write_packet(), hls_write_trailer(), init_fps(), ism_flush(), ism_free(), ism_write_header(), LLVMFuzzerTestOneInput(), main(), microdvd_write_packet(), mpegts_write_packet_internal(), msnwc_tcp_read_header(), msnwc_tcp_read_packet(), mv_read_header(), mv_read_packet(), mv_read_seek(), mxf_parse_handle_essence(), mxf_read_local_tags(), mxf_seek_to_previous_partition(), need_output(), open_output_file(), parse_audio_var(), parse_global_var(), parse_playlist(), parse_video_var(), print_report(), put_vcd_padding_sector(), rdt_parse_packet(), read_gab2_sub(), read_header(), read_packet(), read_seek(), read_table(), read_thread(), reanalyze(), reopen_demux_for_component(), rtp_mpegts_write_close(), rtp_mpegts_write_header(), rtp_mpegts_write_packet(), rv10_write_header(), sap_read_header(), sap_write_close(), sbg_read_header(), scc_write_header(), scc_write_packet(), sds_read_header(), sds_read_packet(), section_write_packet(), seg_init(), seg_write_header(), seg_write_packet(), seg_write_trailer(), segment_end(), segment_start(), shift_data(), show_format(), smush_read_header(), smush_read_packet(), srt_write_packet(), tedcaptions_read_header(), update_stream_timings(), var_read_metadata(), webm_chunk_write_header(), webm_chunk_write_packet(), webm_chunk_write_trailer(), webvtt_write_header(), webvtt_write_packet(), write_packet_header(), wv_write_packet(), and wv_write_trailer().
int AVFormatContext::ctx_flags |
Flags signalling stream properties.
A combination of AVFMTCTX_*. Set by libavformat.
Definition at line 1391 of file avformat.h.
Referenced by avformat_find_stream_info(), handle_packet(), hls_read_header(), hls_read_packet(), and sap_read_header().
unsigned int AVFormatContext::nb_streams |
Number of elements in AVFormatContext.streams.
Set by avformat_new_stream(), must not be modified by any other code.
Definition at line 1398 of file avformat.h.
Referenced by add_input_streams(), add_stream(), apng_write_header(), asfrtp_parse_sdp_line(), av_dump_format(), av_find_best_stream(), av_program_add_stream_index(), avformat_find_stream_info(), check_init_output_file(), check_video_streams(), chunk_mux_init(), close_slave(), concat_read_header(), configure_output_audio_filter(), copy_metadata(), create_subcc_streams(), do_video_out(), dump_video_streams(), estimate_timings(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), ff_decklink_write_header(), ff_metadata_conv_ctx(), ff_nut_reset_ts(), ff_rdt_parse_open(), ff_rfps_calculate(), fifo_mux_init(), fifo_thread_write_header(), fill_all_stream_timings(), film_init(), find_stream(), find_video_stream_info(), finish_output_stream(), get_system_header_size(), handle_file(), handle_id3(), handle_packet(), has_duration(), hds_write_header(), hls_read_header(), hls_read_packet(), id3_has_changed_values(), init_filters(), init_output_stream_encode(), log_slave(), main(), match_streams(), match_streams_exact_id(), match_streams_one_to_one(), movie_common_init(), mpeg_mux_end(), mpeg_mux_init(), mv_read_packet(), mv_read_seek(), mxf_compute_index_tables(), mxf_parse_structural_metadata(), need_output(), new_output_stream(), open_demux_for_component(), open_input_file(), open_output_file(), open_slave(), output_packet(), pmt_cb(), print_final_stats(), put_system_header(), read_gab2_sub(), read_interval_packets(), read_packet(), read_thread(), real_seek(), remove_decoded_packets(), reopen_demux_for_component(), rv10_write_header(), sap_fetch_packet(), sap_read_header(), scc_write_header(), seg_init(), set_disposition_bits(), show_format(), srt_write_header(), stream_component_close(), stream_component_open(), sub2video_prepare(), tee_write_header(), transcode_init(), update_stream_timings(), update_streams_from_subdemuxer(), webm_chunk_write_trailer(), webvtt_write_header(), write_headers(), write_index(), write_mainheader(), and wv_write_header().
AVStream** AVFormatContext::streams |
A list of all streams in the file.
New streams are created with avformat_new_stream().
Freed by libavformat in avformat_free_context().
Definition at line 1410 of file avformat.h.
Referenced by add_input_streams(), apng_write_header(), asfrtp_parse_packet(), asfrtp_parse_sdp_line(), av_find_best_stream(), avformat_find_stream_info(), check_video_streams(), chunk_mux_init(), cine_read_packet(), concat_read_header(), configure_output_audio_filter(), copy_metadata(), dash_check_bitstream(), dash_read_packet(), decklink_write_video_packet(), dump_stream_format(), dump_video_streams(), dv_parse_sdp_line(), encode_write(), encode_write_frame(), estimate_timings(), estimate_timings_from_bit_rate(), estimate_timings_from_pts(), ff_alsa_open(), ff_decklink_write_header(), ff_decklink_write_packet(), ff_load_image(), ff_metadata_conv_ctx(), ff_mov_init_hinting(), ff_rdt_parse_open(), ff_rfps_calculate(), ff_rtp_chain_mux_open(), ff_sauce_read(), ff_write_chained(), fifo_mux_init(), fifo_thread_attempt_recovery(), fifo_thread_write_header(), fifo_thread_write_packet(), fill_all_stream_timings(), fill_timing_for_id3_timestamped_stream(), film_init(), film_write_header(), film_write_packet(), find_stream(), find_video_stream_info(), flush_packet(), frm_read_packet(), get_private_data(), get_system_header_size(), get_timebase(), handle_file(), handle_packet(), has_duration(), hds_write_header(), hevc_parse_sdp_line(), hls_read_packet(), hls_write_header(), id3_has_changed_values(), init_convert_timestamp(), init_filters(), init_output_stream_encode(), lavfi_read_header(), log_packet(), log_slave(), main(), match_streams_exact_id(), match_streams_one_to_one(), mov_write_udta_sdp(), movie_common_init(), mpeg_mux_end(), mpeg_mux_init(), mpeg_mux_write_packet(), mpegts_push_data(), mpegts_write_packet_internal(), mv_read_packet(), mv_read_seek(), mxf_compute_index_tables(), mxf_parse_structural_metadata(), mxf_set_audio_pts(), open_codec_context(), open_demux_for_component(), open_input_file(), open_output_file(), open_slave(), opt_map(), opt_map_channel(), opt_target(), opus_header(), opus_packet(), output_packet(), output_segment_list(), pmt_cb(), put_system_header(), read_gab2_sub(), read_packet(), read_seek(), read_thread(), real_seek(), remove_decoded_packets(), reopen_demux_for_component(), report_new_stream(), rtp_mpegts_write_header(), rtp_mpegts_write_packet(), sap_fetch_packet(), sap_read_header(), sap_write_header(), sbg_read_packet(), sbg_read_seek2(), scc_write_header(), seek_test(), seg_check_bitstream(), seg_init(), seg_write_header(), set_disposition_bits(), srt_write_header(), stream_component_close(), stream_component_open(), sub2video_prepare(), tee_write_packet(), update_stream_extradata(), update_stream_timings(), update_streams_from_subdemuxer(), v4l2_read_packet(), v4l2_set_parameters(), video_decode(), video_decode_example(), webm_chunk_write_trailer(), webvtt_write_header(), write_headers(), write_hls_media_playlist(), and wv_write_header().
char* AVFormatContext::url |
input or output URL.
Unlike the old filename field, this field has no length restriction.
Freed by libavformat in avformat_free_context().
Definition at line 1438 of file avformat.h.
Referenced by add_file(), assert_file_overwrite(), check_decode_result(), check_init_output_file(), dash_init(), decklink_setup_video(), fbdev_read_header(), ff_alsa_open(), ff_decklink_list_formats(), ff_decklink_read_header(), ff_decklink_write_header(), ff_rtsp_setup_output_streams(), fifo_init(), fifo_thread_write_header(), hls_append_segment(), hls_delete_old_segments(), hls_mux_init(), hls_rename_temp_file(), hls_start(), hls_write_packet(), hls_write_trailer(), lavfi_read_header(), log_slave(), open_output_file(), parse_device_name(), print_final_stats(), read_header(), seg_init(), seg_write_header(), seg_write_packet(), segment_end(), segment_start(), set_segment_filename(), shift_data(), show_format(), sls_flag_file_rename(), sls_flag_use_localtime_filename(), sls_flags_filename_process(), tee_write_header(), transcode(), v4l2_read_header(), and webm_chunk_write_header().
int64_t AVFormatContext::start_time |
Position of the first frame of the component, in AV_TIME_BASE fractional seconds.
NEVER set this value directly: It is deduced from the AVStream values.
Demuxing only, set by libavformat.
Definition at line 1447 of file avformat.h.
Referenced by av_dump_format(), decode(), estimate_timings(), event_loop(), fill_all_stream_timings(), movie_common_init(), open_input_file(), read_packets(), read_thread(), reap_screen(), rewind_file(), show_format(), and update_stream_timings().
int64_t AVFormatContext::duration |
Duration of the stream, in AV_TIME_BASE fractional seconds.
Only set this value if you know none of the individual stream durations and also do not set any of them. This is deduced from the AVStream values if not set.
Demuxing only, set by libavformat.
Definition at line 1457 of file avformat.h.
Referenced by av_dump_format(), concat_read_header(), estimate_timings(), estimate_timings_from_bit_rate(), event_loop(), fill_all_stream_timings(), get_best_effort_duration(), has_duration(), open_input_file(), open_output_file(), opus_find_frame_end(), process_command(), request_frame(), show_format(), and update_stream_timings().
int64_t AVFormatContext::bit_rate |
Total stream bitrate in bit/s, 0 if not available.
Never set it directly if the file_size and the duration are known as FFmpeg can compute it automatically.
Definition at line 1464 of file avformat.h.
Referenced by av_dump_format(), estimate_timings(), estimate_timings_from_bit_rate(), event_loop(), get_bit_rate(), LLVMFuzzerTestOneInput(), psy_3gpp_init(), reconfig_encoder(), show_format(), and update_stream_timings().
unsigned int AVFormatContext::packet_size |
Definition at line 1466 of file avformat.h.
Referenced by dss_723_1_read_packet(), dss_read_seek(), dss_sp_read_packet(), mpeg_mux_init(), rawvideo_read_header(), and v210_read_header().
int AVFormatContext::max_delay |
Definition at line 1467 of file avformat.h.
Referenced by chunk_mux_init(), ff_rtp_chain_mux_open(), fifo_mux_init(), hls_mux_init(), mpeg_mux_init(), open_output_file(), output_packet(), rtp_mpegts_write_header(), sap_read_header(), and segment_mux_init().
int AVFormatContext::flags |
Flags modifying the (de)muxer behaviour.
A combination of AVFMT_FLAG_*. Set by the user before avformat_open_input() / avformat_write_header().
Definition at line 1473 of file avformat.h.
Referenced by android_camera_read_packet(), avfilter_init_dict(), avformat_find_stream_info(), dash_init(), device_open(), dnxhd_decode_macroblock(), fbdev_read_header(), fbdev_read_packet(), ff_alsa_open(), ff_rtp_chain_mux_open(), fifo_mux_init(), hds_write_header(), hls_read_header(), init_fps(), main(), mlp_encode_init(), mov_write_isml_manifest(), nvenc_map_preset(), nvenc_setup_h264_config(), nvenc_setup_rate_control(), open_file(), open_input_file(), open_output_file(), open_slave(), psy_3gpp_init(), read_packet(), read_thread(), reopen_demux_for_component(), segment_mux_init(), set_enable_expr(), tdsc_init(), vaapi_encode_init_gop_structure(), vaapi_encode_init_rate_control(), vaapi_encode_init_slice_structure(), vaapi_frames_init(), vble_decode_frame(), vpx_init(), and write_major_sync().
int64_t AVFormatContext::probesize |
Maximum size of the data read from input for determining the input container format.
Demuxing only, set by the caller before avformat_open_input().
Definition at line 1508 of file avformat.h.
Referenced by avformat_find_stream_info(), lavfi_read_header(), and reopen_demux_for_component().
int64_t AVFormatContext::max_analyze_duration |
Maximum duration (in AV_TIME_BASE units) of the data read from input in avformat_find_stream_info().
Demuxing only, set by the caller before avformat_find_stream_info(). Can be set to 0 to let avformat choose using a heuristic.
Definition at line 1516 of file avformat.h.
Referenced by avformat_find_stream_info(), and reopen_demux_for_component().
const uint8_t* AVFormatContext::key |
Definition at line 1518 of file avformat.h.
Referenced by av_tea_init(), av_xtea_init(), av_xtea_le_init(), tea_crypt_ecb(), xtea_crypt_ecb(), and xtea_le_crypt_ecb().
int AVFormatContext::keylen |
Definition at line 1519 of file avformat.h.
unsigned int AVFormatContext::nb_programs |
Definition at line 1521 of file avformat.h.
Referenced by av_dump_format(), av_find_program_from_stream(), av_new_program(), av_program_add_stream_index(), clear_avprogram(), discard_pid(), ff_metadata_conv_ctx(), open_output_file(), pat_cb(), show_format(), show_programs(), and update_stream_timings().
AVProgram** AVFormatContext::programs |
Definition at line 1522 of file avformat.h.
Referenced by av_dump_format(), av_find_program_from_stream(), av_new_program(), av_program_add_stream_index(), clear_avprogram(), discard_pid(), ff_metadata_conv_ctx(), open_output_file(), pat_cb(), show_programs(), and update_stream_timings().
enum AVCodecID AVFormatContext::video_codec_id |
Forced video codec_id.
Demuxing: Set by user.
Definition at line 1528 of file avformat.h.
Referenced by device_try_init(), dshow_cycle_formats(), dshow_cycle_pins(), dshow_read_header(), mmap_read_frame(), open_input_file(), and v4l2_read_header().
enum AVCodecID AVFormatContext::audio_codec_id |
Forced audio codec_id.
Demuxing: Set by user.
Definition at line 1534 of file avformat.h.
Referenced by open_input_file().
enum AVCodecID AVFormatContext::subtitle_codec_id |
Forced subtitle codec_id.
Demuxing: Set by user.
Definition at line 1540 of file avformat.h.
Referenced by open_input_file().
unsigned int AVFormatContext::max_index_size |
Maximum amount of memory in bytes to use for the index of each stream.
If the index exceeds this size, entries will be discarded as needed to maintain a smaller size. This can lead to slower or less accurate seeking (depends on demuxer). Demuxers for which a full in-memory index is mandatory will ignore this.
Definition at line 1552 of file avformat.h.
unsigned int AVFormatContext::max_picture_buffer |
Maximum amount of memory in bytes to use for buffering frames obtained from realtime capture devices.
Definition at line 1558 of file avformat.h.
unsigned int AVFormatContext::nb_chapters |
Number of chapters in AVChapter array.
When muxing, chapters are normally written in the file header, so nb_chapters should normally be initialized before write_header is called. Some muxers (e.g. mov and mkv) can also write chapters in the trailer. To write chapters in the trailer, nb_chapters must be zero when write_header is called and non-zero when write_trailer is called.
Definition at line 1571 of file avformat.h.
Referenced by av_dump_format(), copy_chapters(), event_loop(), ff_metadata_conv_ctx(), ogm_chapter(), open_output_file(), parse_forced_key_frames(), show_chapters(), and write_headers().
AVChapter** AVFormatContext::chapters |
Definition at line 1572 of file avformat.h.
Referenced by av_dump_format(), copy_chapters(), ff_metadata_conv_ctx(), ogm_chapter(), open_output_file(), parse_forced_key_frames(), show_chapters(), and write_chapter().
AVDictionary* AVFormatContext::metadata |
Metadata that applies to the whole file.
Freed by libavformat in avformat_free_context().
Definition at line 1582 of file avformat.h.
Referenced by av_dump_format(), chunk_mux_init(), ff_decklink_read_packet(), ff_metadata_conv_ctx(), ff_sauce_read(), ff_wms_parse_sdp_a_line(), fifo_mux_init(), handle_id3(), hls_mux_init(), hls_read_header(), hls_read_packet(), main(), metadata_obu(), mxf_parse_structural_metadata(), open_output_file(), open_slave(), read_header(), read_string(), read_thread(), read_uint16(), read_uint32(), read_uint64(), read_uint8(), rv10_write_header(), scan_file(), segment_mux_init(), show_format(), and var_read_metadata().
int64_t AVFormatContext::start_time_realtime |
Start time of the stream in real world time, in microseconds since the Unix epoch (00:00 1st January 1970).
That is, pts=0 in the stream was captured at this real world time.
Definition at line 1595 of file avformat.h.
Referenced by ff_rtp_chain_mux_open().
int AVFormatContext::fps_probe_size |
The number of frames used for determining the framerate in avformat_find_stream_info().
Demuxing only, set by the caller before avformat_find_stream_info().
Definition at line 1602 of file avformat.h.
Referenced by avformat_find_stream_info().
int AVFormatContext::error_recognition |
Error recognition; higher values will detect more errors but may misdetect some more or less valid parts as errors.
Demuxing only, set by the caller before avformat_open_input().
Definition at line 1609 of file avformat.h.
AVIOInterruptCB AVFormatContext::interrupt_callback |
Custom interrupt callbacks for the I/O layer.
demuxing: set by the user before avformat_open_input(). muxing: set by the user before avformat_write_header() (mainly useful for AVFMT_NOFILE formats). The callback should also be passed to avio_open2() if it's used to open the file.
Definition at line 1620 of file avformat.h.
Referenced by avformat_find_stream_info(), check_init_output_file(), chunk_mux_init(), dash_init(), failing_write_packet(), ff_rtp_chain_mux_open(), fifo_mux_init(), hds_write_header(), hls_mux_init(), ism_seek(), ism_write_header(), lavfi_read_header(), open_file(), open_input_file(), open_output_file(), open_slave(), read_thread(), sap_read_header(), and segment_mux_init().
int AVFormatContext::debug |
Flags to enable debugging.
Definition at line 1625 of file avformat.h.
Referenced by amf_load_library(), and ff_amf_encode_close().
int64_t AVFormatContext::max_interleave_delta |
Maximum buffering duration for interleaving.
To ensure all the streams are interleaved correctly, av_interleaved_write_frame() will wait until it has at least one packet for each stream before actually writing any packets to the output file. When some streams are "sparse" (i.e. there are large gaps between successive packets), this can result in excessive buffering.
This field specifies the maximum difference between the timestamps of the first and the last packet in the muxing queue, above which libavformat will output a packet regardless of whether it has queued a packet for all the streams.
Muxing only, set by the caller before avformat_write_header().
Definition at line 1644 of file avformat.h.
int AVFormatContext::strict_std_compliance |
Allow non-standard and experimental extension.
Definition at line 1650 of file avformat.h.
Referenced by dash_init(), ff_rtp_chain_mux_open(), mov_write_video_tag(), and open_slave().
int AVFormatContext::event_flags |
Flags for the user to detect events happening on the file.
Flags must be cleared by the user once the event has been handled. A combination of AVFMT_EVENT_FLAG_*.
Definition at line 1657 of file avformat.h.
Referenced by hls_read_packet().
int AVFormatContext::max_ts_probe |
Maximum number of packets to read while waiting for the first timestamp.
Decoding only.
Definition at line 1664 of file avformat.h.
Referenced by avformat_find_stream_info().
int AVFormatContext::avoid_negative_ts |
Avoid negative timestamps during muxing.
Any value of the AVFMT_AVOID_NEG_TS_* constants. Note, this only works when using av_interleaved_write_frame. (interleave_packet_per_dts is in use)
Definition at line 1673 of file avformat.h.
Referenced by dash_init(), and seg_init().
int AVFormatContext::ts_id |
Transport stream id.
This will be moved into demuxer private options. Thus no API/ABI compatibility
Definition at line 1682 of file avformat.h.
Referenced by pat_cb().
int AVFormatContext::audio_preload |
Audio preload in microseconds.
Note, not all formats support this and unpredictable things may happen if it is used when not supported.
Definition at line 1690 of file avformat.h.
int AVFormatContext::max_chunk_duration |
Max chunk time in microseconds.
Note, not all formats support this and unpredictable things may happen if it is used when not supported.
Definition at line 1698 of file avformat.h.
int AVFormatContext::max_chunk_size |
Max chunk size in bytes Note, not all formats support this and unpredictable things may happen if it is used when not supported.
Definition at line 1706 of file avformat.h.
int AVFormatContext::use_wallclock_as_timestamps |
forces the use of wallclock timestamps as pts/dts of packets This has undefined results in the presence of B frames.
Definition at line 1714 of file avformat.h.
int AVFormatContext::avio_flags |
avio flags, used to force AVIO_FLAG_DIRECT.
Definition at line 1721 of file avformat.h.
enum AVDurationEstimationMethod AVFormatContext::duration_estimation_method |
The duration field can be estimated through various ways, and this field can be used to know how the duration was estimated.
Definition at line 1729 of file avformat.h.
Referenced by av_fmt_ctx_get_duration_estimation_method(), and estimate_timings().
int64_t AVFormatContext::skip_initial_bytes |
Skip initial bytes when opening stream.
Definition at line 1736 of file avformat.h.
unsigned int AVFormatContext::correct_ts_overflow |
Correct single timestamp overflows.
Definition at line 1743 of file avformat.h.
int AVFormatContext::seek2any |
Force seeking to any (also non key) frames.
Definition at line 1750 of file avformat.h.
int AVFormatContext::flush_packets |
Flush the I/O context after each packet.
Definition at line 1757 of file avformat.h.
int AVFormatContext::probe_score |
format probing score.
The maximal score is AVPROBE_SCORE_MAX, its set when the demuxer probes the format.
Definition at line 1766 of file avformat.h.
Referenced by show_format().
int AVFormatContext::format_probesize |
number of bytes to read maximally to identify format.
Definition at line 1773 of file avformat.h.
char* AVFormatContext::codec_whitelist |
',' separated list of allowed decoders.
If NULL then all are allowed
Definition at line 1781 of file avformat.h.
Referenced by avformat_find_stream_info(), and ff_copy_whiteblacklists().
char* AVFormatContext::format_whitelist |
',' separated list of allowed demuxers.
If NULL then all are allowed
Definition at line 1789 of file avformat.h.
Referenced by av_demuxer_open(), and ff_copy_whiteblacklists().
AVFormatInternal* AVFormatContext::internal |
An opaque field for libavformat internal usage.
Must not be accessed in any way by callers.
Definition at line 1795 of file avformat.h.
Referenced by activate(), apply_lut(), apply_unsharp_c(), av_bsf_alloc(), av_bsf_flush(), av_bsf_free(), av_bsf_send_packet(), av_demuxer_open(), av_hwdevice_ctx_alloc(), av_hwdevice_ctx_init(), av_hwdevice_get_hwframe_constraints(), av_hwdevice_hwconfig_alloc(), av_hwframe_ctx_alloc(), av_hwframe_ctx_init(), av_hwframe_get_buffer(), av_hwframe_transfer_data(), av_hwframe_transfer_get_formats(), averageiir2d(), avfilter_init_dict(), avformat_alloc_context(), avformat_find_stream_info(), blend_frame(), blend_frames(), chromatic_adaptation(), cuda_frames_init(), cuda_transfer_data_from(), cuda_transfer_data_to(), d3d11va_alloc_single(), d3d11va_create_staging_texture(), d3d11va_frames_init(), d3d11va_frames_uninit(), d3d11va_pool_alloc(), d3d11va_transfer_data(), d3d11va_transfer_get_formats(), do_blend(), do_convolve(), dxva2_frames_init(), dxva2_frames_uninit(), dxva2_init_pool(), dxva2_pool_alloc(), estimate_timings_from_bit_rate(), ff_bsf_get_packet(), ff_bsf_get_packet_ref(), filter(), filter_frame(), filter_frame16(), filter_frame8(), filter_grey_edge(), fir_frame(), frame_alloc(), gaussianiir2d(), geq_filter_frame(), get_deriv(), headphone_frame(), hwdevice_ctx_free(), hwframe_ctx_free(), nlmeans_plane(), output_frame(), plot_spectrum_column(), process_frame(), qsv_device_init(), qsv_frames_init(), qsv_frames_uninit(), qsv_init_child_ctx(), qsv_init_internal_session(), qsv_init_pool(), qsv_map_from(), qsv_pool_alloc(), qsv_transfer_data_child(), qsv_transfer_data_from(), qsv_transfer_data_to(), spatial_activate(), thread_execute(), vdpau_buffer_free(), vdpau_device_init(), vdpau_device_uninit(), vdpau_frames_get_constraints(), vdpau_frames_init(), vdpau_init_pixmfts(), vdpau_pool_alloc(), vdpau_transfer_data_from(), vdpau_transfer_data_to(), and vdpau_transfer_get_formats().
int AVFormatContext::io_repositioned |
IO repositioned flag.
This is set by avformat when the underlaying IO context read pointer is repositioned, for example when doing byte based seeking. Demuxers can use the flag to detect such changes.
Definition at line 1803 of file avformat.h.
AVCodec* AVFormatContext::video_codec |
Forced video codec.
This allows forcing a specific decoder, even when there are multiple with the same codec_id. Demuxing: Set by user
Definition at line 1811 of file avformat.h.
Referenced by open_input_file().
AVCodec* AVFormatContext::audio_codec |
Forced audio codec.
This allows forcing a specific decoder, even when there are multiple with the same codec_id. Demuxing: Set by user
Definition at line 1819 of file avformat.h.
Referenced by dss_read_header(), dss_read_packet(), dss_read_seek(), and open_input_file().
AVCodec* AVFormatContext::subtitle_codec |
Forced subtitle codec.
This allows forcing a specific decoder, even when there are multiple with the same codec_id. Demuxing: Set by user
Definition at line 1827 of file avformat.h.
Referenced by open_input_file().
AVCodec* AVFormatContext::data_codec |
Forced data codec.
This allows forcing a specific decoder, even when there are multiple with the same codec_id. Demuxing: Set by user
Definition at line 1835 of file avformat.h.
Referenced by open_input_file().
int AVFormatContext::metadata_header_padding |
Number of bytes to be written as padding in a metadata header.
Demuxing: Unused. Muxing: Set by user via av_format_set_metadata_header_padding.
Definition at line 1842 of file avformat.h.
void* AVFormatContext::opaque |
User data.
This is a place for some private data of the user.
Definition at line 1848 of file avformat.h.
Referenced by dash_init(), fifo_mux_init(), hls_mux_init(), open_slave(), program_opencl_config_output(), and segment_mux_init().
av_format_control_message AVFormatContext::control_message_cb |
Callback used by devices to communicate with application.
Definition at line 1853 of file avformat.h.
int64_t AVFormatContext::output_ts_offset |
Output timestamp offset, in microseconds.
Muxing: set by user
Definition at line 1859 of file avformat.h.
uint8_t* AVFormatContext::dump_separator |
dump format separator.
can be ", " or "\n " or anything else
Definition at line 1867 of file avformat.h.
Referenced by dump_stream_format().
enum AVCodecID AVFormatContext::data_codec_id |
Forced Data codec_id.
Demuxing: Set by user.
Definition at line 1873 of file avformat.h.
Referenced by open_input_file().
char* AVFormatContext::protocol_whitelist |
',' separated list of allowed protocols.
Definition at line 1902 of file avformat.h.
Referenced by ff_copy_whiteblacklists(), ism_seek(), and lavfi_read_header().
int(* AVFormatContext::io_open) (struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options) |
A callback for opening new IO streams.
Whenever a muxer or a demuxer needs to open an IO stream (typically from avformat_open_input() for demuxers, but for certain formats can happen at other times as well), it will call this callback to obtain an IO context.
s | the format context |
pb | on success, the newly opened IO context should be returned here |
url | the url to open |
flags | a combination of AVIO_FLAG_* |
options | a dictionary of additional options, with the same semantics as in avio_open2() |
Definition at line 1924 of file avformat.h.
Referenced by dash_init(), fifo_mux_init(), hls_delete_old_segments(), hls_mux_init(), hls_read_header(), open_slave(), read_header(), reopen_demux_for_component(), seg_write_header(), segment_mux_init(), and shift_data().
void(* AVFormatContext::io_close) (struct AVFormatContext *s, AVIOContext *pb) |
A callback for closing the streams opened with AVFormatContext.io_open().
Definition at line 1930 of file avformat.h.
Referenced by dash_init(), fifo_mux_init(), hls_mux_init(), open_slave(), and segment_mux_init().
char* AVFormatContext::protocol_blacklist |
',' separated list of disallowed protocols.
Definition at line 1937 of file avformat.h.
Referenced by ff_copy_whiteblacklists(), and ism_seek().
int AVFormatContext::max_streams |
The maximum number of streams.
Definition at line 1944 of file avformat.h.
int AVFormatContext::skip_estimate_duration_from_pts |
Skip duration calcuation in estimate_timings_from_pts.
Definition at line 1951 of file avformat.h.
Referenced by estimate_timings_from_pts().