FFmpeg
Data Fields
FFStream Struct Reference

#include <internal.h>

Data Fields

AVStream pub
 The public context. More...
 
int reorder
 Set to 1 if the codec allows reordering, so pts can be different from dts. More...
 
AVBSFContextbsfc
 bitstream filter to run on stream More...
 
int bitstream_checked
 Whether or not check_bitstream should still be run on each packet. More...
 
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 {
   AVBSFContext *   bsf
 
   int   inited
 
extract_extradata
 
int need_context_update
 Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar) More...
 
int is_intra_only
 
FFFracpriv_pts
 
struct {
   int64_t   last_dts
 
   int64_t   duration_gcd
 
   int   duration_count
 
   int64_t   rfps_duration_sum
 
   double(*   duration_error )[2][MAX_STD_TIMEBASES]
 
   int64_t   codec_info_duration
 
   int64_t   codec_info_duration_fields
 
   int   frame_delay_evidence
 
   int   found_decoder
 0 -> decoder has not been searched for yet. More...
 
   int64_t   last_duration
 
   int64_t   fps_first_dts
 Those are used for average framerate estimation. More...
 
   int   fps_first_dts_idx
 
   int64_t   fps_last_dts
 
   int   fps_last_dts_idx
 
} * info
 Stream information used internally by avformat_find_stream_info() More...
 
AVIndexEntryindex_entries
 Only used if the format does not support seeking natively. More...
 
int nb_index_entries
 
unsigned int index_entries_allocated_size
 
int64_t interleaver_chunk_size
 
int64_t interleaver_chunk_duration
 
int request_probe
 stream probing state -1 -> probing finished 0 -> no probing requested rest -> perform probing with request_probe being the minimum score to accept. More...
 
int skip_to_keyframe
 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...
 
int64_t 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). More...
 
int64_t first_discard_sample
 If not 0, the first audio sample that should be discarded from the stream. More...
 
int64_t last_discard_sample
 The sample after last sample that is intended to be discarded after first_discard_sample. More...
 
int 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. More...
 
int64_t mux_ts_offset
 Timestamp offset added to timestamps before muxing. More...
 
int64_t pts_wrap_reference
 Internal data to check for wrapping of the time stamp. More...
 
int pts_wrap_behavior
 Options for behavior, when a wrap is detected. More...
 
int update_initial_durations_done
 Internal data to prevent doing update_initial_durations() twice. More...
 
int64_t pts_reorder_error [MAX_REORDER_DELAY+1]
 Internal data to generate dts from pts. More...
 
uint8_t pts_reorder_error_count [MAX_REORDER_DELAY+1]
 
int64_t pts_buffer [MAX_REORDER_DELAY+1]
 
int64_t last_dts_for_order_check
 Internal data to analyze DTS and detect faulty mpeg streams. More...
 
uint8_t dts_ordered
 
uint8_t dts_misordered
 
int inject_global_side_data
 Internal data to inject global side data. More...
 
AVRational display_aspect_ratio
 display aspect ratio (0 if unknown) More...
 
AVProbeData probe_data
 
PacketListEntrylast_in_packet_buffer
 last packet in packet_buffer for this stream when muxing. More...
 
int64_t last_IP_pts
 
int last_IP_duration
 
int probe_packets
 Number of packets to buffer for codec probing. More...
 
enum AVStreamParseType need_parsing
 
struct AVCodecParserContextparser
 
int codec_info_nb_frames
 Number of frames that have been demuxed during avformat_find_stream_info() More...
 
int stream_identifier
 Stream Identifier This is the MPEG-TS stream identifier +1 0 means unknown. More...
 
int64_t first_dts
 Timestamp corresponding to the last dts sync point. More...
 
int64_t cur_dts
 

Detailed Description

Definition at line 194 of file internal.h.

Field Documentation

◆ pub

AVStream FFStream::pub

The public context.

Definition at line 198 of file internal.h.

Referenced by avformat_new_stream(), and check_bitstream().

◆ reorder

int FFStream::reorder

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

Definition at line 204 of file internal.h.

Referenced by init_muxer(), and prepare_input_packet().

◆ bsfc

AVBSFContext* FFStream::bsfc

bitstream filter to run on stream

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

Definition at line 211 of file internal.h.

Referenced by av_write_trailer(), dash_check_bitstream(), ff_stream_add_bitstream_filter(), free_stream(), 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 216 of file internal.h.

Referenced by check_bitstream().

◆ avctx

AVCodecContext* FFStream::avctx

◆ avctx_inited

int FFStream::avctx_inited

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

Definition at line 225 of file internal.h.

Referenced by avformat_find_stream_info(), and compute_frame_duration().

◆ bsf

AVBSFContext* FFStream::bsf

◆ inited

int FFStream::inited

◆ extract_extradata

struct { ... } FFStream::extract_extradata

◆ need_context_update

int FFStream::need_context_update

◆ is_intra_only

int FFStream::is_intra_only

Definition at line 240 of file internal.h.

Referenced by init_muxer(), and prepare_input_packet().

◆ priv_pts

FFFrac* FFStream::priv_pts

Definition at line 242 of file internal.h.

Referenced by av_stream_get_end_pts(), free_stream(), and init_pts().

◆ last_dts

int64_t FFStream::last_dts

Definition at line 249 of file internal.h.

Referenced by avformat_new_stream(), ff_rfps_add_frame(), and ff_rfps_calculate().

◆ duration_gcd

int64_t FFStream::duration_gcd

Definition at line 250 of file internal.h.

Referenced by ff_rfps_add_frame(), and ff_rfps_calculate().

◆ duration_count

int FFStream::duration_count

Definition at line 251 of file internal.h.

Referenced by avformat_find_stream_info(), ff_rfps_add_frame(), and ff_rfps_calculate().

◆ rfps_duration_sum

int64_t FFStream::rfps_duration_sum

Definition at line 252 of file internal.h.

Referenced by ff_rfps_add_frame(), and ff_rfps_calculate().

◆ duration_error

double(* FFStream::duration_error)[2][MAX_STD_TIMEBASES]

◆ codec_info_duration

int64_t FFStream::codec_info_duration

Definition at line 254 of file internal.h.

Referenced by avformat_find_stream_info(), and ff_rfps_calculate().

◆ codec_info_duration_fields

int64_t FFStream::codec_info_duration_fields

Definition at line 255 of file internal.h.

Referenced by avformat_find_stream_info().

◆ frame_delay_evidence

int FFStream::frame_delay_evidence

Definition at line 256 of file internal.h.

Referenced by avformat_find_stream_info().

◆ found_decoder

int FFStream::found_decoder

0 -> decoder has not been searched for yet.

>0 -> decoder found <0 -> decoder with codec_id == -found_decoder has not been found

Definition at line 263 of file internal.h.

Referenced by avformat_find_stream_info(), has_codec_parameters(), read_frame_internal(), and try_decode_frame().

◆ last_duration

int64_t FFStream::last_duration

Definition at line 265 of file internal.h.

Referenced by estimate_timings_from_pts().

◆ fps_first_dts

int64_t FFStream::fps_first_dts

Those are used for average framerate estimation.

Definition at line 270 of file internal.h.

Referenced by avformat_find_stream_info(), and avformat_new_stream().

◆ fps_first_dts_idx

int FFStream::fps_first_dts_idx

Definition at line 271 of file internal.h.

Referenced by avformat_find_stream_info().

◆ fps_last_dts

int64_t FFStream::fps_last_dts

Definition at line 272 of file internal.h.

Referenced by avformat_find_stream_info(), and avformat_new_stream().

◆ fps_last_dts_idx

int FFStream::fps_last_dts_idx

Definition at line 273 of file internal.h.

Referenced by avformat_find_stream_info().

◆ info

struct { ... } * FFStream::info

◆ index_entries

AVIndexEntry* FFStream::index_entries

◆ nb_index_entries

int FFStream::nb_index_entries

◆ index_entries_allocated_size

unsigned int FFStream::index_entries_allocated_size

◆ interleaver_chunk_size

int64_t FFStream::interleaver_chunk_size

Definition at line 282 of file internal.h.

Referenced by ff_interleave_add_packet().

◆ interleaver_chunk_duration

int64_t FFStream::interleaver_chunk_duration

Definition at line 283 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 291 of file internal.h.

Referenced by asf_read_stream_properties(), avformat_find_stream_info(), avi_read_header(), ff_parse_mpeg2_descriptor(), ff_read_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 296 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 301 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 310 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 318 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 325 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 331 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 336 of file internal.h.

Referenced by ff_get_muxer_ts_offset(), and write_packet().

◆ pts_wrap_reference

int64_t FFStream::pts_wrap_reference

Internal data to check for wrapping of the time stamp.

Definition at line 341 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 353 of file internal.h.

Referenced by avformat_new_stream(), ff_read_packet(), mpegts_push_data(), 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 358 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 365 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 366 of file internal.h.

Referenced by select_from_pts_buffer().

◆ pts_buffer

int64_t FFStream::pts_buffer[MAX_REORDER_DELAY+1]

◆ 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 373 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 374 of file internal.h.

Referenced by compute_pkt_fields().

◆ dts_misordered

uint8_t FFStream::dts_misordered

Definition at line 375 of file internal.h.

Referenced by compute_pkt_fields().

◆ inject_global_side_data

int FFStream::inject_global_side_data

Internal data to inject global side data.

Definition at line 380 of file internal.h.

Referenced by av_format_inject_global_side_data(), avformat_new_stream(), ff_read_frame_flush(), and read_frame_internal().

◆ 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 387 of file internal.h.

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

◆ probe_data

AVProbeData FFStream::probe_data

Definition at line 389 of file internal.h.

Referenced by 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 394 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

◆ last_IP_duration

int FFStream::last_IP_duration

Definition at line 397 of file internal.h.

Referenced by compute_pkt_fields().

◆ probe_packets

int FFStream::probe_packets

◆ need_parsing

enum AVStreamParseType FFStream::need_parsing

◆ parser

struct AVCodecParserContext* FFStream::parser

◆ codec_info_nb_frames

int FFStream::codec_info_nb_frames

◆ stream_identifier

int FFStream::stream_identifier

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

Definition at line 418 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 428 of file internal.h.

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

◆ cur_dts

int64_t FFStream::cur_dts

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