Main libavformat public API header. More...
#include <time.h>#include <stdio.h>#include "libavcodec/avcodec.h"#include "libavutil/dict.h"#include "libavutil/log.h"#include "avio.h"#include "libavformat/version.h"Go to the source code of this file.
Main libavformat public API header.
Definition in file avformat.h.
Definition at line 408 of file avformat.h.
Referenced by av_probe_input_buffer2(), init_input(), and sup_probe().
Definition at line 409 of file avformat.h.
Referenced by probe_codec().
score for file extension
Definition at line 411 of file avformat.h.
Referenced by ac3_eac3_probe(), adts_aac_probe(), alias_pix_read_probe(), aqt_probe(), av_probe_input_format3(), avr_probe(), avs_probe(), bmp_probe(), cavsvideo_probe(), cdxl_read_probe(), dpx_probe(), dts_probe(), dvbsub_probe(), exr_probe(), ff_spdif_probe(), flac_probe(), h261_probe(), h263_probe(), h264_probe(), hevc_probe(), idcin_probe(), img_read_probe(), j2k_probe(), jacosub_probe(), jpeg_probe(), jpegls_probe(), libquvi_probe(), loas_probe(), lvf_probe(), matroska_probe(), modplug_probe(), mov_probe(), mp3_read_probe(), mpc8_probe(), mpeg4video_probe(), mpegps_probe(), mpegvideo_probe(), mpsub_probe(), mtv_probe(), nsv_probe(), oma_read_probe(), pictor_probe(), probe(), pva_probe(), read_gab2_sub(), realtext_probe(), sdr2_probe(), sgi_probe(), str_probe(), subviewer1_probe(), subviewer_probe(), sunrast_probe(), sup_probe(), tak_probe(), tedcaptions_read_probe(), tiff_probe(), tta_probe(), vc1t_probe(), vmd_probe(), vqf_probe(), wsaud_probe(), and xa_probe().
score for file mime type
Definition at line 412 of file avformat.h.
Referenced by av_probe_input_format3().
maximum score
Definition at line 413 of file avformat.h.
Referenced by adp_probe(), aea_read_probe(), aiff_probe(), alias_pix_read_probe(), amr_probe(), apc_probe(), ape_probe(), apng_probe(), asf_probe(), ass_probe(), ast_probe(), avi_probe(), bfi_probe(), brender_read_probe(), cdata_probe(), cin_probe(), cine_read_probe(), concat_probe(), dfa_probe(), dirac_probe(), dnxhd_probe(), dsf_probe(), dss_probe(), dtshd_probe(), dv_probe(), dxa_probe(), ea_probe(), epaf_probe(), ff_spdif_probe(), ffm_probe(), film_probe(), fourxm_probe(), frm_read_probe(), gif_probe(), gxf_probe(), hls_probe(), hnm_probe(), iff_probe(), ilbc_probe(), img_read_probe(), ipmovie_probe(), ircam_probe(), iss_probe(), lmlm4_probe(), lvf_probe(), lxf_probe(), matroska_probe(), microdvd_probe(), mmf_probe(), mov_probe(), mpc8_probe(), mpc_probe(), mpegts_probe(), mpl2_probe(), msnwc_tcp_probe(), mtv_probe(), mv_probe(), mxf_probe(), nc_probe(), nist_probe(), nsv_probe(), nut_probe(), nuv_probe(), ogg_probe(), oma_read_probe(), pjs_probe(), pmp_probe(), png_probe(), probe(), probe_gme(), pva_probe(), pvf_probe(), qcp_probe(), r3d_probe(), read_probe(), redspark_probe(), rl2_probe(), rm_probe(), roq_probe(), rpl_probe(), rsd_probe(), rtsp_probe(), sami_probe(), sap_probe(), sbg_read_probe(), seq_probe(), siff_probe(), smacker_probe(), smjpeg_probe(), smush_read_probe(), sol_probe(), sox_probe(), srt_probe(), stl_probe(), subviewer_probe(), sup_probe(), swf_probe(), tedcaptions_read_probe(), thp_probe(), tmv_probe(), txd_probe(), v4l2_read_probe(), vid_probe(), vivo_probe(), voc_probe(), vplayer_probe(), vqf_probe(), wc3_probe(), webp_probe(), webvtt_probe(), wsvqa_probe(), wv_probe(), xmv_probe(), xwma_probe(), yop_probe(), and yuv4_probe().
extra allocated bytes at the end of the probe buffer
Definition at line 415 of file avformat.h.
Referenced by av_probe_input_buffer2(), av_probe_input_format3(), ff_img_read_header(), ff_img_read_packet(), main(), probe_codec(), and read_gab2_sub().
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition at line 418 of file avformat.h.
Referenced by av_probe_input_format3(), avformat_close_input(), estimate_timings(), ff_img_read_header(), ffmpeg_cleanup(), init_input(), main(), open_output_file(), open_slave(), print_times(), probe(), seg_write_header(), tee_write_trailer(), and write_header().
Needs 'd' in filename.
Definition at line 419 of file avformat.h.
Referenced by avformat_open_input(), and open_output_file().
Show format stream IDs numbers.
Definition at line 420 of file avformat.h.
Referenced by dump_stream_format(), and show_stream().
Format wants AVPicture structure for raw picture data.
Definition at line 421 of file avformat.h.
Referenced by do_video_out(), flush_encoders(), and write_video_frame().
Format wants global header.
Definition at line 423 of file avformat.h.
Referenced by add_stream(), init_muxer(), main(), new_output_stream(), and open_output_file().
Format does not need / have any timestamps.
Definition at line 424 of file avformat.h.
Referenced by av_interleaved_write_frame(), av_write_frame(), avformat_find_stream_info(), avformat_write_header(), do_video_out(), and write_frame().
Use generic index building code.
Definition at line 425 of file avformat.h.
Referenced by av_read_frame(), and read_frame_internal().
Format allows timestamp discontinuities.
Note, muxers always require valid (monotone) timestamps
Definition at line 426 of file avformat.h.
Referenced by process_input(), and read_thread().
Format allows variable fps.
Definition at line 427 of file avformat.h.
Referenced by do_video_out(), and transcode_init().
Format does not need width/height.
Definition at line 428 of file avformat.h.
Referenced by init_muxer().
Format does not require any streams.
Definition at line 429 of file avformat.h.
Referenced by init_muxer(), and transcode_init().
Format does not allow to fall back on binary search via read_timestamp.
Definition at line 430 of file avformat.h.
Referenced by seek_frame_internal(), and stream_component_open().
Format does not allow to fall back on generic search.
Definition at line 431 of file avformat.h.
Referenced by seek_frame_internal(), and stream_component_open().
Format does not allow seeking by bytes.
Definition at line 432 of file avformat.h.
Referenced by seek_frame_internal(), and stream_component_open().
Format allows flushing.
If not set, the muxer will not receive a NULL packet in the write_packet function.
Definition at line 433 of file avformat.h.
Referenced by av_write_frame().
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition at line 435 of file avformat.h.
Referenced by compute_pkt_fields2(), and write_frame().
Format allows muxing negative timestamps.
If not set the timestamp will be shifted in av_write_frame and av_interleaved_write_frame so they start from 0. The user or muxer can override this through AVFormatContext.avoid_negative_ts
Definition at line 442 of file avformat.h.
Referenced by avformat_write_header().
Seeking is based on PTS.
Definition at line 451 of file avformat.h.
Definition at line 736 of file avformat.h.
Referenced by ape_read_header(), asf_build_simple_index(), asf_read_pts(), av_read_frame(), avi_read_idx1(), avi_sync(), cine_read_header(), clean_index(), ff_img_read_packet(), ff_index_search_timestamp(), ff_voc_get_packet(), find_and_decode_index(), flv_read_packet(), matroska_add_index_entries(), matroska_parse_block(), mov_build_index(), mov_read_packet(), mov_read_trun(), mpc8_parse_seektable(), mpc_read_packet(), mpegps_read_pes_header(), mpegts_get_dts(), mv_read_header(), mxf_compute_ptses_fake_index(), nsv_parse_NSVs_header(), nut_write_packet(), nuv_read_dts(), parse_keyframes_index(), pmp_header(), pva_read_header(), read_braindead_odml_indx(), read_frame_internal(), read_header(), read_index(), read_pakt_chunk(), read_part_of_packet(), read_xing_toc(), rl2_read_header(), rm_read_dts(), rm_read_index(), rm_read_packet(), scan_file(), tta_read_header(), wv_read_packet(), and xwma_read_header().
Definition at line 742 of file avformat.h.
Referenced by dump_stream_format(), enable_tracks(), matroska_parse_tracks(), mkv_write_track(), mkv_write_tracks(), mov_read_tkhd(), new_rendition(), and transcode_init().
Definition at line 743 of file avformat.h.
Referenced by dump_stream_format().
Definition at line 744 of file avformat.h.
Referenced by dump_stream_format().
Definition at line 745 of file avformat.h.
Referenced by avformat_find_stream_info(), and dump_stream_format().
Definition at line 746 of file avformat.h.
Referenced by dump_stream_format().
Definition at line 747 of file avformat.h.
Referenced by avformat_find_stream_info(), and dump_stream_format().
Track should be used during playback by default.
Useful for subtitle track that should be displayed even when user did not explicitly ask for subtitles.
Definition at line 754 of file avformat.h.
Referenced by dump_stream_format(), matroska_parse_tracks(), mkv_write_track(), and new_rendition().
stream for hearing impaired audiences
Definition at line 755 of file avformat.h.
Referenced by av_find_best_stream(), avformat_find_stream_info(), dump_stream_format(), ff_parse_mpeg2_descriptor(), mpegts_write_pmt(), new_rendition(), and parse_chunks().
stream for visual impaired audiences
Definition at line 756 of file avformat.h.
Referenced by av_find_best_stream(), avformat_find_stream_info(), dump_stream_format(), ff_parse_mpeg2_descriptor(), mpegts_write_pmt(), new_rendition(), and parse_chunks().
stream without voice
Definition at line 757 of file avformat.h.
Referenced by avformat_find_stream_info(), dump_stream_format(), ff_parse_mpeg2_descriptor(), and mpegts_write_pmt().
The stream is stored in the file as an attached picture/"cover art" (e.g.
APIC frame in ID3v2). The single packet associated with it will be returned among the first few packets read from the file unless seeking takes place. It can also be accessed at any time in AVStream.attached_pic.
Definition at line 764 of file avformat.h.
Referenced by ape_tag_read_field(), asf_read_picture(), av_find_default_stream_index(), avformat_find_stream_info(), avformat_queue_attached_pictures(), ff_flac_parse_picture(), ff_id3v2_parse_apic(), get_attachment(), mov_read_covr(), open_output_file(), read_thread(), and select_reference_stream().
To specify text track kind (different from subtitles default).
Definition at line 769 of file avformat.h.
Referenced by mkv_write_track().
Definition at line 770 of file avformat.h.
Referenced by mkv_write_track().
Definition at line 771 of file avformat.h.
Referenced by mkv_write_track().
Options for behavior on timestamp wrap detection.
ignore the wrap
Definition at line 776 of file avformat.h.
Referenced by av_new_program(), avformat_new_stream(), and wrap_timestamp().
add the format specific offset on wrap detection
Definition at line 777 of file avformat.h.
Referenced by update_wrap_reference(), and wrap_timestamp().
subtract the format specific offset on wrap detection
Definition at line 778 of file avformat.h.
Referenced by ff_read_packet(), update_wrap_reference(), and wrap_timestamp().
The call resulted in updated metadata.
Definition at line 911 of file avformat.h.
Referenced by decode_info_header(), ff_vorbis_stream_comment(), and flv_write_packet().
Stream information used internally by av_find_stream_info()
Definition at line 924 of file avformat.h.
Referenced by avformat_find_stream_info(), ff_rfps_add_frame(), and ff_rfps_calculate().
Number of packets to buffer for codec probing.
Definition at line 971 of file avformat.h.
Referenced by avformat_new_stream(), ff_read_frame_flush(), and set_codec_from_probe_data().
Definition at line 988 of file avformat.h.
Referenced by avformat_new_stream(), compute_pkt_fields(), compute_pkt_fields2(), estimate_timings_from_pts(), ff_read_frame_flush(), and update_initial_timestamps().
Definition at line 1133 of file avformat.h.
signal that no header is present (streams are added dynamically)
Definition at line 1167 of file avformat.h.
Referenced by amf_parse_object(), avformat_find_stream_info(), avs_read_header(), cdxl_read_header(), create_stream(), ff_img_read_header(), ff_rtsp_open_transport_ctx(), flv_read_header(), handle_packet(), hls_read_header(), mpegps_read_header(), mpegts_read_header(), read_header(), roq_read_header(), sap_fetch_packet(), sap_read_header(), spdif_read_header(), str_read_header(), swf_read_header(), vid_read_header(), and wsvqa_read_header().
Generate missing pts even if it requires parsing future frames.
Definition at line 1317 of file avformat.h.
Referenced by av_read_frame(), open_input_stream(), and read_thread().
Ignore index.
Definition at line 1318 of file avformat.h.
Referenced by avi_read_header(), gxf_read_index(), matroska_add_index_entries(), matroska_parse_cues(), mov_read_default(), parse_keyframes_index(), and rm_read_header().
Do not block when reading packets from input.
Definition at line 1319 of file avformat.h.
Referenced by device_open(), dshow_read_packet(), fbdev_read_header(), fbdev_read_packet(), ff_alsa_open(), gdigrab_read_packet(), open_input_file(), pulse_write_header(), vfw_read_packet(), and write_header().
Ignore DTS on frames that contain both DTS & PTS.
Definition at line 1320 of file avformat.h.
Referenced by compute_pkt_fields().
Do not infer any values from other values, just return what is stored in the container.
Definition at line 1321 of file avformat.h.
Referenced by compute_pkt_fields(), and extract_mpeg4_header().
Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled.
Definition at line 1322 of file avformat.h.
Referenced by avformat_find_stream_info(), extract_mpeg4_header(), and read_frame_internal().
Do not buffer frames when possible.
Definition at line 1323 of file avformat.h.
Referenced by avformat_find_stream_info().
The caller has supplied a custom AVIOContext, don't avio_close() it.
Definition at line 1324 of file avformat.h.
Referenced by avformat_close_input(), avformat_open_input(), hls_read_header(), and init_input().
Discard frames marked corrupted.
Definition at line 1325 of file avformat.h.
Referenced by ff_read_packet().
Flush the AVIOContext every packet.
Definition at line 1326 of file avformat.h.
Referenced by av_write_frame(), avformat_write_header(), and write_packet().
When muxing, try to avoid writing any random/volatile data to the output.
This includes any random IDs, real-time timestamps/dates, muxer version, etc.
This flag is mainly intended for testing.
Definition at line 1333 of file avformat.h.
Referenced by ff_framehash_write_header(), flac_write_header(), init_muxer(), lrc_write_header(), mkv_write_attachments(), mkv_write_header(), mov_write_header(), mov_write_track_udta_tag(), mxf_write_header(), mxf_write_identification(), ogg_write_header(), put_flac_codecpriv(), rtp_write_header(), set_encoder_id(), and write_sm_data().
Enable RTP MP4A-LATM payload.
Definition at line 1334 of file avformat.h.
Referenced by ff_rtp_chain_mux_open().
try to interleave outputted packets by dts (using this flag can slow demuxing down)
Definition at line 1335 of file avformat.h.
Referenced by avi_read_header().
Enable use of private options by delaying codec open (this could be made default once all code is converted)
Definition at line 1336 of file avformat.h.
Referenced by avformat_open_input().
Don't merge side data but keep it separate.
Definition at line 1337 of file avformat.h.
Referenced by read_frame_internal().
Definition at line 1458 of file avformat.h.
Referenced by read_frame_internal().
The call resulted in updated metadata.
Definition at line 1490 of file avformat.h.
Referenced by amf_parse_object(), decode_info_header(), flac_read_header(), mov_metadata_gnre(), mov_metadata_int8_bypass_padding(), mov_metadata_int8_no_padding(), mov_metadata_loci(), mov_metadata_track_or_disc_number(), mov_read_udta_string(), and read_frame_internal().
Enabled when required by target format.
Definition at line 1506 of file avformat.h.
Referenced by avformat_write_header(), and mov_write_header().
Shift timestamps so they are non negative.
Definition at line 1507 of file avformat.h.
Referenced by avformat_write_header().
Shift timestamps so that they start at 0.
Definition at line 1508 of file avformat.h.
Referenced by dash_write_packet(), ff_mov_write_packet(), mov_write_header(), and write_packet().
seek backward
Definition at line 2179 of file avformat.h.
Referenced by av_seek_frame(), avformat_seek_file(), avi_read_packet(), avi_read_seek(), ff_gen_search(), ff_index_search_timestamp(), ff_pcm_read_seek(), ff_seek_frame_binary(), ffm_seek(), gxf_seek(), hls_read_seek(), matroska_read_seek(), movie_common_init(), mp3_seek(), nut_read_seek(), nut_write_packet(), read_seek(), rewind_file(), rl2_read_seek(), rtmp_read_seek(), and vqf_read_seek().
seeking based on position in bytes
Definition at line 2180 of file avformat.h.
Referenced by cine_read_seek(), concat_seek(), ff_subtitles_queue_seek(), hls_read_seek(), mv_read_seek(), read_seek(), read_thread(), rtmp_read_seek(), seek_frame_internal(), and stream_seek().
seek to any frame, even non-keyframes
Definition at line 2181 of file avformat.h.
Referenced by avformat_seek_file(), avi_read_packet(), avi_read_seek(), ff_add_index_entry(), ff_index_search_timestamp(), gxf_seek(), hls_read_packet(), hls_read_seek(), matroska_read_seek(), ogg_read_seek(), read_packet(), and recheck_discard_flags().
seeking based on frame number
Definition at line 2182 of file avformat.h.
Referenced by cine_read_seek(), concat_seek(), ff_subtitles_queue_seek(), mv_read_seek(), and read_seek().
Callback used by devices to communicate with application.
Definition at line 1181 of file avformat.h.
full parsing and repack
Only parse headers, do not repack.
full parsing and interpolation of timestamps for frames not starting on a packet boundary
full parsing and repack of the first frame only, only implemented for H.264 currently
full parsing and repack with timestamp and position generation by parser for raw this assumes that each packet in the file contains no demuxer level headers and just codec level data, otherwise position generation would fail
Definition at line 717 of file avformat.h.
The duration of a video can be estimated through various ways, and this enum can be used to know how the duration was estimated.
Duration accurately estimated from PTSes.
Duration estimated from a stream with a known duration.
Duration estimated from bitrate (less accurate)
Definition at line 1189 of file avformat.h.
Allocate and read the payload of a packet and initialize its fields with default values.
Definition at line 240 of file utils.c.
Referenced by adp_read_packet(), adx_read_packet(), aea_read_packet(), afc_read_packet(), aiff_read_packet(), apc_read_packet(), ape_tag_read_field(), asf_read_header(), asf_read_picture(), ast_read_packet(), av_append_packet(), bfi_read_packet(), cdata_read_packet(), cdxl_read_packet(), cin_read_packet(), cine_read_packet(), daud_packet(), dfa_read_packet(), dsf_read_packet(), dxa_read_packet(), ea_read_packet(), ff_pcm_read_packet(), ff_rm_parse_packet(), ff_rm_retrieve_cache(), ff_voc_get_packet(), film_read_packet(), flv_data_packet(), flv_read_packet(), fourxm_read_packet(), frm_read_packet(), g729_read_packet(), get_attachment(), gif_read_packet(), gsm_read_packet(), gxf_packet(), hnm_read_packet(), idcin_read_packet(), iff_read_packet(), ingenient_read_packet(), iss_read_packet(), lmlm4_read_packet(), load_ipmovie_packet(), lvf_read_packet(), mmf_read_packet(), mov_read_covr(), mov_read_packet(), mp3_read_packet(), mpc8_read_packet(), mpegps_read_packet(), msnwc_tcp_read_packet(), mtv_read_packet(), mv_read_packet(), mxf_decrypt_triplet(), mxf_get_d10_aes3_packet(), mxf_read_packet(), mxf_read_packet_old(), nc_read_packet(), nsv_read_chunk(), nuv_packet(), oma_read_packet(), pmp_packet(), pva_read_packet(), qcp_read_packet(), r3d_read_reda(), r3d_read_redv(), raw_read_packet(), rawvideo_read_packet(), read_packet(), redspark_read_packet(), rl2_read_packet(), roq_read_packet(), rpl_read_packet(), rsd_read_packet(), sdr2_read_packet(), seq_read_packet(), siff_read_packet(), smjpeg_read_packet(), smush_read_packet(), sol_read_packet(), sup_read_packet(), swf_read_packet(), thp_read_packet(), tmv_read_packet(), tta_read_packet(), txd_read_packet(), vc1t_read_packet(), vid_read_packet(), vivo_read_packet(), wc3_read_packet(), wsaud_read_packet(), wsvqa_read_packet(), xa_read_packet(), xmv_fetch_audio_packet(), xmv_fetch_video_packet(), xwma_read_packet(), yop_read_packet(), and yuv4_read_packet().
Read data and append it to the current content of the AVPacket.
If pkt->size is 0 this is identical to av_get_packet. Note that this uses av_grow_packet and thus involves a realloc which is inefficient. Thus this function should only be used when there is no reasonable way to know (an upper bound of) the final size.
Definition at line 250 of file utils.c.
Referenced by apng_read_packet(), dfa_read_packet(), ea_read_packet(), read_packet(), sup_read_packet(), vivo_read_packet(), wc3_read_header(), and wc3_read_packet().
Definition at line 121 of file utils.c.
Referenced by process_input_packet().
Referenced by add_av_stream(), and read_ffserver_streams().
Referenced by add_av_stream(), and add_codec().
Returns the pts of the last muxed packet + its duration.
the retuned value is undefined when used with a demuxer.
Definition at line 116 of file utils.c.
Referenced by do_video_stats(), and print_report().
Definition at line 169 of file utils.c.
Referenced by show_format().
Referenced by open_input_file().
Referenced by open_input_file().
Referenced by open_input_file().
Referenced by open_input_file().
Referenced by avdevice_dev_to_app_control_message().
This function will cause global side data to be injected in the next packet of each stream as well as after any subsequent seek.
Definition at line 126 of file utils.c.
Referenced by read_thread().
Allocate an AVFormatContext for an output format.
avformat_free_context() can be used to free the context and everything allocated by the framework within it.
Definition at line 118 of file mux.c.
Referenced by avdevice_list_output_sinks(), hls_mux_init(), main(), open_output_file(), open_slave(), segment_mux_init(), and write_packet().