FFmpeg
Data Fields
FFStream Struct Reference

#include <internal.h>

Data Fields

  The public context. More...
 
 
int  reorder
  Set to 1 if the codec allows reordering, so pts can be different from dts. More...
 
struct AVBSFContextbsfc
  bitstream filter to run on stream More...
 
  Whether or not check_bitstream should still be run on each packet. More...
 
struct AVCodecContextavctx
  The codec context used by avformat_find_stream_info, the parser, etc. More...
 
int  avctx_inited
  1 if avctx has been initialized with the values from the codec parameters More...
 
struct {
   struct AVBSFContext *   bsf
 
   int   inited
 
 
  Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar) More...
 
 
 
struct FFStreamInfoinfo
  Stream information used internally by avformat_find_stream_info() More...
 
  Only used if the format does not support seeking natively. More...
 
 
 
 
 
  stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with request_probe being the minimum score to accept. More...
 
  Indicates that everything up to the next keyframe should be discarded. More...
 
int  skip_samples
  Number of samples to skip at the start of the frame decoded from the next packet. More...
 
  If not 0, the number of samples that should be skipped from the start of the stream (the samples are removed from packets with pts==0, which also assumes negative timestamps do not happen). More...
 
  If not 0, the first audio sample that should be discarded from the stream. More...
 
  The sample after last sample that is intended to be discarded after first_discard_sample. More...
 
  Number of internally decoded frames, used internally in libavformat, do not access its lifetime differs from info which is why it is not in that structure. More...
 
  Timestamp offset added to timestamps before muxing. More...
 
  This is the lowest ts allowed in this track; it may be set by the muxer during init or write_header and influences the automatic timestamp shifting code. More...
 
  Internal data to check for wrapping of the time stamp. More...
 
  Options for behavior, when a wrap is detected. More...
 
  Internal data to prevent doing update_initial_durations() twice. More...
 
  Internal data to generate dts from pts. More...
 
 
 
  Internal data to analyze DTS and detect faulty mpeg streams. More...
 
uint8_t  dts_ordered
 
uint8_t  dts_misordered
 
  display aspect ratio (0 if unknown) More...
 
 
  last packet in packet_buffer for this stream when muxing. More...
 
 
 
  Number of packets to buffer for codec probing. More...
 
 
 
  Number of frames that have been demuxed during avformat_find_stream_info() More...
 
  Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown. More...
 
  Timestamp corresponding to the last dts sync point. More...
 
 
const struct AVCodecDescriptorcodec_desc
 

Detailed Description

Definition at line 128 of file internal.h.

Field Documentation

pub

AVStream FFStream::pub

The public context.

Definition at line 132 of file internal.h.

Referenced by avformat_new_stream(), check_bitstream(), codec_close(), and handle_avoid_negative_ts().

fmtctx

AVFormatContext* FFStream::fmtctx

Definition at line 134 of file internal.h.

Referenced by avformat_new_stream(), and avformat_stream_group_add_stream().

reorder

int FFStream::reorder

Set to 1 if the codec allows reordering, so pts can be different from dts.

Definition at line 139 of file internal.h.

Referenced by init_muxer(), and prepare_input_packet().

bsfc

struct AVBSFContext* FFStream::bsfc

bitstream filter to run on stream

  • encoding: Set by muxer using ff_stream_add_bitstream_filter
  • decoding: unused

Definition at line 146 of file internal.h.

Referenced by av_write_trailer(), dash_check_bitstream(), ff_free_stream(), ff_stream_add_bitstream_filter(), seg_check_bitstream(), write_packets_common(), and write_packets_from_bsfs().

bitstream_checked

int FFStream::bitstream_checked

Whether or not check_bitstream should still be run on each packet.

Definition at line 151 of file internal.h.

Referenced by check_bitstream().

avctx

struct AVCodecContext* FFStream::avctx

The codec context used by avformat_find_stream_info, the parser, etc.

Definition at line 156 of file internal.h.

Referenced by av_guess_frame_rate(), avformat_find_stream_info(), avformat_new_stream(), avpriv_set_pts_info(), codec_close(), compute_frame_duration(), compute_pkt_fields(), dump_stream_format(), estimate_timings_from_bit_rate(), extract_extradata(), ff_free_stream(), has_codec_parameters(), has_decode_delay_been_guessed(), parse_packet(), read_frame_internal(), select_from_pts_buffer(), tb_unreliable(), try_decode_frame(), update_dts_from_pts(), update_initial_durations(), and update_stream_avctx().

avctx_inited

int FFStream::avctx_inited

1 if avctx has been initialized with the values from the codec parameters

Definition at line 160 of file internal.h.

Referenced by avformat_find_stream_info(), and compute_frame_duration().

bsf

struct AVBSFContext* FFStream::bsf

Definition at line 166 of file internal.h.

Referenced by avformat_find_stream_info(), extract_extradata(), extract_extradata_init(), and ff_free_stream().

inited

int FFStream::inited

Definition at line 167 of file internal.h.

Referenced by avformat_find_stream_info(), extract_extradata(), extract_extradata_init(), and read_frame_internal().

extract_extradata

struct { ... } FFStream::extract_extradata

Referenced by avformat_find_stream_info(), extract_extradata(), extract_extradata_init(), ff_free_stream(), and read_frame_internal().

need_context_update

int FFStream::need_context_update

Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)

Definition at line 173 of file internal.h.

Referenced by avformat_new_stream(), ff_parse_mpeg2_descriptor(), flv_get_extradata(), flv_set_video_codec(), m4sl_cb(), mpegts_find_stream_type(), mpegts_set_stream_info(), ogm_header(), read_frame_internal(), set_codec_from_probe_data(), set_stream_info_from_input_stream(), and update_stream_avctx().

is_intra_only

int FFStream::is_intra_only

Definition at line 175 of file internal.h.

Referenced by init_muxer(), and prepare_input_packet().

priv_pts

FFFrac FFStream::priv_pts

Definition at line 177 of file internal.h.

Referenced by compute_muxer_pkt_fields(), and init_pts().

info

struct FFStreamInfo* FFStream::info

Stream information used internally by avformat_find_stream_info()

Definition at line 182 of file internal.h.

Referenced by avformat_find_stream_info(), avformat_new_stream(), estimate_timings_from_pts(), ff_free_stream(), ff_rfps_add_frame(), ff_rfps_calculate(), has_codec_parameters(), has_decode_delay_been_guessed(), read_frame_internal(), and try_decode_frame().

index_entries

AVIndexEntry* FFStream::index_entries

Only used if the format does not support seeking natively.

Definition at line 184 of file internal.h.

Referenced by add_index_entry(), asf_read_seek(), av_add_index_entry(), av_index_search_timestamp(), av_write_trailer(), avformat_index_get_entry(), avformat_index_get_entry_from_timestamp(), avi_read_idx1(), avi_read_packet(), avi_read_seek(), avi_sync(), calculate_bitrate(), can_seek_to_key_sample(), check_stream_max_drift(), cine_read_packet(), clean_index(), clear_index_entries(), dhav_read_seek(), ff_configure_buffers_for_index(), ff_free_stream(), ff_reduce_index(), ff_seek_frame_binary(), find_prev_closest_index(), fix_index_entry_timestamps(), flac_seek(), guess_ni_flag(), gxf_seek(), hxvs_build_index(), ifv_read_packet(), img_read_seek(), mov_build_index(), mov_estimate_video_delay(), mov_finalize_packet(), mov_find_next_sample(), mov_fix_index(), mov_get_skip_samples(), mov_read_chapters(), mov_read_packet(), mov_read_rtmd_track(), mov_read_seek(), mov_read_timecode_track(), mov_read_trun(), mp3_read_header(), mp3_seek(), mpc8_read_seek(), mpc_read_seek(), mv_read_packet(), ni_prepare_read(), nsv_read_seek(), nut_write_packet(), pdv_read_packet(), read_header(), read_packet(), read_seek(), reset_index_position(), rka_read_packet(), rl2_read_packet(), rl2_read_seek(), rpl_read_packet(), scan_file(), seek_frame_generic(), smacker_read_seek(), tta_read_packet(), and voc_read_seek().

nb_index_entries

int FFStream::nb_index_entries

Definition at line 186 of file internal.h.

Referenced by add_index_entry(), asf_read_seek(), av_add_index_entry(), av_index_search_timestamp(), avformat_index_get_entries_count(), avformat_index_get_entry(), avformat_index_get_entry_from_timestamp(), avi_read_idx1(), avi_read_packet(), avi_read_seek(), avi_sync(), calculate_bitrate(), check_stream_max_drift(), cine_read_packet(), clean_index(), clear_index_entries(), ff_configure_buffers_for_index(), ff_reduce_index(), find_prev_closest_index(), flac_seek(), guess_ni_flag(), hxvs_build_index(), ifv_read_packet(), mov_build_index(), mov_estimate_video_delay(), mov_finalize_packet(), mov_find_next_sample(), mov_fix_index(), mov_read_chapters(), mov_read_packet(), mov_read_rtmd_track(), mov_read_timecode_track(), mov_read_trun(), mp3_read_header(), mpc_read_seek(), ni_prepare_read(), nut_write_packet(), pdv_read_packet(), read_header(), read_packet(), read_seek(), reset_index_position(), rka_read_packet(), rl2_read_packet(), rpl_read_packet(), scan_file(), seek_frame_generic(), tta_read_packet(), and voc_read_seek().

index_entries_allocated_size

unsigned int FFStream::index_entries_allocated_size

Definition at line 187 of file internal.h.

Referenced by add_index_entry(), av_add_index_entry(), hxvs_build_index(), mov_build_index(), mov_fix_index(), mov_read_packet(), mov_read_trun(), and scan_file().

interleaver_chunk_size

int64_t FFStream::interleaver_chunk_size

Definition at line 189 of file internal.h.

Referenced by ff_interleave_add_packet().

interleaver_chunk_duration

int64_t FFStream::interleaver_chunk_duration

Definition at line 190 of file internal.h.

Referenced by ff_interleave_add_packet().

request_probe

int FFStream::request_probe

stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with request_probe being the minimum score to accept.

Definition at line 198 of file internal.h.

Referenced by asf_read_stream_properties(), avformat_find_stream_info(), avi_read_header(), dvdvideo_audio_stream_add(), dvdvideo_subp_stream_add(), dvdvideo_video_stream_add(), ff_parse_mpeg2_descriptor(), ff_read_packet(), handle_new_packet(), mpegps_read_packet(), mpegts_find_stream_type(), mpegts_push_data(), mpegts_set_stream_info(), probe_codec(), and set_codec_from_probe_data().

skip_to_keyframe

int FFStream::skip_to_keyframe

Indicates that everything up to the next keyframe should be discarded.

Definition at line 203 of file internal.h.

Referenced by read_frame_internal().

skip_samples

int FFStream::skip_samples

Number of samples to skip at the start of the frame decoded from the next packet.

Definition at line 208 of file internal.h.

Referenced by ff_read_frame_flush(), mov_fix_index(), mov_read_header(), mov_read_seek(), read_frame_internal(), swf_read_packet(), and update_initial_timestamps().

start_skip_samples

int64_t FFStream::start_skip_samples

If not 0, the number of samples that should be skipped from the start of the stream (the samples are removed from packets with pts==0, which also assumes negative timestamps do not happen).

Intended for use with formats such as mp3 with ad-hoc gapless audio support.

Definition at line 217 of file internal.h.

Referenced by mp3_parse_info_tag(), and read_frame_internal().

first_discard_sample

int64_t FFStream::first_discard_sample

If not 0, the first audio sample that should be discarded from the stream.

This is broken by design (needs global sample count), but can't be avoided for broken by design formats such as mp3 with ad-hoc gapless audio support.

Definition at line 225 of file internal.h.

Referenced by mp3_parse_info_tag(), and read_frame_internal().

last_discard_sample

int64_t FFStream::last_discard_sample

The sample after last sample that is intended to be discarded after first_discard_sample.

Works on frame boundaries only. Used to prevent early EOF if the gapless info is broken (considered concatenated mp3s).

Definition at line 232 of file internal.h.

Referenced by mp3_parse_info_tag().

nb_decoded_frames

int FFStream::nb_decoded_frames

Number of internally decoded frames, used internally in libavformat, do not access its lifetime differs from info which is why it is not in that structure.

Definition at line 238 of file internal.h.

Referenced by has_codec_parameters(), has_decode_delay_been_guessed(), and try_decode_frame().

mux_ts_offset

int64_t FFStream::mux_ts_offset

Timestamp offset added to timestamps before muxing.

Definition at line 243 of file internal.h.

Referenced by ff_get_muxer_ts_offset(), and handle_avoid_negative_ts().

lowest_ts_allowed

int64_t FFStream::lowest_ts_allowed

This is the lowest ts allowed in this track; it may be set by the muxer during init or write_header and influences the automatic timestamp shifting code.

Definition at line 250 of file internal.h.

Referenced by handle_avoid_negative_ts(), mkv_write_track(), and webm_chunk_write_header().

pts_wrap_reference

int64_t FFStream::pts_wrap_reference

Internal data to check for wrapping of the time stamp.

Definition at line 255 of file internal.h.

Referenced by avformat_new_stream(), mpegts_push_data(), update_wrap_reference(), and wrap_timestamp().

pts_wrap_behavior

int FFStream::pts_wrap_behavior

Options for behavior, when a wrap is detected.

Defined by AV_PTS_WRAP_ values.

If correction is enabled, there are two possibilities: If the first time stamp is near the wrap point, the wrap offset will be subtracted, which will create negative time stamps. Otherwise the offset will be added.

Definition at line 267 of file internal.h.

Referenced by avformat_new_stream(), mpegts_push_data(), update_timestamps(), update_wrap_reference(), and wrap_timestamp().

update_initial_durations_done

int FFStream::update_initial_durations_done

Internal data to prevent doing update_initial_durations() twice.

Definition at line 272 of file internal.h.

Referenced by update_initial_durations().

pts_reorder_error

int64_t FFStream::pts_reorder_error[MAX_REORDER_DELAY+1]

Internal data to generate dts from pts.

Definition at line 279 of file internal.h.

Referenced by select_from_pts_buffer().

pts_reorder_error_count

uint8_t FFStream::pts_reorder_error_count[MAX_REORDER_DELAY+1]

Definition at line 280 of file internal.h.

Referenced by select_from_pts_buffer().

pts_buffer

int64_t FFStream::pts_buffer[MAX_REORDER_DELAY+1]

Definition at line 282 of file internal.h.

Referenced by avformat_new_stream(), compute_muxer_pkt_fields(), compute_pkt_fields(), estimate_timings_from_pts(), and ff_read_frame_flush().

last_dts_for_order_check

int64_t FFStream::last_dts_for_order_check

Internal data to analyze DTS and detect faulty mpeg streams.

Definition at line 287 of file internal.h.

Referenced by avformat_new_stream(), compute_pkt_fields(), estimate_timings_from_pts(), and ff_read_frame_flush().

dts_ordered

uint8_t FFStream::dts_ordered

Definition at line 288 of file internal.h.

Referenced by compute_pkt_fields().

dts_misordered

uint8_t FFStream::dts_misordered

Definition at line 289 of file internal.h.

Referenced by compute_pkt_fields().

display_aspect_ratio

AVRational FFStream::display_aspect_ratio

display aspect ratio (0 if unknown)

  • encoding: unused
  • decoding: Set by libavformat to calculate sample_aspect_ratio internally

Definition at line 296 of file internal.h.

Referenced by avformat_find_stream_info(), dvdvideo_video_stream_add(), mov_read_ares(), and mxf_parse_structural_metadata().

probe_data

AVProbeData FFStream::probe_data

Definition at line 298 of file internal.h.

Referenced by ff_free_stream(), and probe_codec().

last_in_packet_buffer

PacketListEntry* FFStream::last_in_packet_buffer

last packet in packet_buffer for this stream when muxing.

Definition at line 303 of file internal.h.

Referenced by ff_interleave_add_packet(), ff_interleave_packet_per_dts(), and mxf_interleave_get_packet().

last_IP_pts

int64_t FFStream::last_IP_pts

Definition at line 305 of file internal.h.

Referenced by avformat_new_stream(), compute_pkt_fields(), decode_frame(), estimate_timings_from_pts(), and ff_read_frame_flush().

last_IP_duration

int FFStream::last_IP_duration

Definition at line 306 of file internal.h.

Referenced by compute_pkt_fields().

probe_packets

int FFStream::probe_packets

Number of packets to buffer for codec probing.

Definition at line 311 of file internal.h.

Referenced by avformat_new_stream(), ff_read_frame_flush(), ff_read_packet(), mpegts_set_stream_info(), probe_codec(), sbg_read_header(), set_codec_from_probe_data(), and tedcaptions_read_header().

need_parsing

enum AVStreamParseType FFStream::need_parsing

Definition at line 314 of file internal.h.

Referenced by aa_read_header(), acm_read_header(), adts_aac_read_header(), adx_read_header(), apv_read_header(), asf_read_stream_properties(), asfrtp_parse_sdp_line(), av1_read_header(), avformat_find_stream_info(), avi_read_header(), avpriv_stream_set_need_parsing(), compute_pkt_fields(), create_new_audio_stream(), dtshd_read_header(), dvdvideo_audio_stream_add(), dvdvideo_subp_stream_add(), dvdvideo_video_stream_add(), evc_read_header(), ff_img_read_header(), ff_parse_mpeg2_descriptor(), ff_raw_audio_read_header(), ff_raw_video_read_header(), ff_rm_read_mdpr_codecdata(), ff_spdif_read_packet(), film_read_header(), flac_header(), flac_read_header(), flv_set_audio_codec(), flv_set_video_codec(), get_codec_data(), get_sindex(), gif_read_header(), hxvs_create_video_stream(), init_video_stream(), ipu_read_header(), jpegxl_anim_read_header(), lmlm4_read_header(), loas_read_header(), lxf_read_header(), m4sl_cb(), mov_finalize_stsd_codec(), mov_parse_stsd_audio(), mov_read_header(), mov_read_packet(), mov_read_stss(), mov_read_trak(), mp3_read_header(), mpegps_read_packet(), mpegts_set_stream_info(), msf_read_header(), mtv_read_header(), mxf_parse_structural_metadata(), mxf_read_packet(), nc_read_header(), new_stream(), nsv_parse_NSVs_header(), nsv_read_chunk(), ogm_header(), oma_read_header(), parse_chunk(), parse_packet(), pva_read_header(), read_frame_internal(), read_header(), rm_read_audio_stream_info(), s337m_read_packet(), scd_read_track(), sdr2_read_header(), tak_read_header(), theora_header(), ty_read_header(), vp8_header(), xvag_read_header(), and xwma_read_header().

parser

struct AVCodecParserContext* FFStream::parser

Definition at line 315 of file internal.h.

Referenced by av_stream_get_parser(), avformat_find_stream_info(), estimate_timings_from_pts(), ff_free_stream(), ff_img_read_packet(), ff_read_frame_flush(), parse_packet(), read_frame_internal(), and update_stream_avctx().

codec_info_nb_frames

int FFStream::codec_info_nb_frames

Number of frames that have been demuxed during avformat_find_stream_info()

Definition at line 320 of file internal.h.

Referenced by av_find_best_stream(), av_find_default_stream_index(), avformat_find_stream_info(), dump_stream_format(), estimate_timings_from_bit_rate(), has_codec_parameters(), and try_decode_frame().

stream_identifier

int FFStream::stream_identifier

Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown.

Definition at line 327 of file internal.h.

Referenced by ff_parse_mpeg2_descriptor().

first_dts

int64_t FFStream::first_dts

Timestamp corresponding to the last dts sync point.

Initialized when AVCodecParserContext.dts_sync_point >= 0 and a DTS is received from the underlying container. Otherwise set to AV_NOPTS_VALUE by default.

Definition at line 337 of file internal.h.

Referenced by add_dstream(), avformat_find_stream_info(), avformat_new_stream(), estimate_timings_from_pts(), ff_read_frame_flush(), hds_write_packet(), ism_write_packet(), rdt_parse_sdp_line(), update_initial_durations(), update_initial_timestamps(), and update_timestamps().

cur_dts

int64_t FFStream::cur_dts

Definition at line 338 of file internal.h.

Referenced by avformat_new_stream(), avpriv_update_cur_dts(), compute_muxer_pkt_fields(), compute_pkt_fields(), concat_read_packet(), estimate_timings_from_pts(), ff_pcm_read_seek(), ff_read_frame_flush(), fifo_thread_write_header(), prepare_input_packet(), sbg_read_header(), sbg_read_packet(), sbg_read_seek2(), tedcaptions_read_header(), update_initial_durations(), update_initial_timestamps(), update_timestamps(), and vqf_read_seek().

codec_desc

const struct AVCodecDescriptor* FFStream::codec_desc

Definition at line 340 of file internal.h.

Referenced by av_guess_frame_rate(), avformat_find_stream_info(), compute_frame_duration(), read_frame_internal(), tb_unreliable(), and update_stream_avctx().


The documentation for this struct was generated from the following file:

Generated on Wed Nov 19 2025 19:24:11 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /