FFmpeg
Data Fields
AVCodecParserContext Struct Reference

#include <avcodec.h>

Data Fields

void * priv_data
 
struct AVCodecParserparser
 
int64_t frame_offset
 
int64_t cur_offset
 
int64_t next_frame_offset
 
int pict_type
 
int repeat_pict
 This field is used for proper frame duration computation in lavf. More...
 
int64_t pts
 
int64_t dts
 
int64_t last_pts
 
int64_t last_dts
 
int fetch_timestamp
 
int cur_frame_start_index
 
int64_t cur_frame_offset [AV_PARSER_PTS_NB]
 
int64_t cur_frame_pts [AV_PARSER_PTS_NB]
 
int64_t cur_frame_dts [AV_PARSER_PTS_NB]
 
int flags
 
int64_t offset
 byte offset from starting packet start More...
 
int64_t cur_frame_end [AV_PARSER_PTS_NB]
 
int key_frame
 Set by parser to 1 for key frames and 0 for non-key frames. More...
 
attribute_deprecated int64_t convergence_duration
 
int dts_sync_point
 Synchronization point for start of timestamp generation. More...
 
int dts_ref_dts_delta
 Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base. More...
 
int pts_dts_delta
 Presentation delay of current frame in units of AVCodecContext.time_base. More...
 
int64_t cur_frame_pos [AV_PARSER_PTS_NB]
 Position of the packet in file. More...
 
int64_t pos
 Byte position of currently parsed frame in stream. More...
 
int64_t last_pos
 Previous frame byte position. More...
 
int duration
 Duration of the current frame. More...
 
enum AVFieldOrder field_order
 
enum AVPictureStructure picture_structure
 Indicate whether a picture is coded as a frame, top field or bottom field. More...
 
int output_picture_number
 Picture number incremented in presentation or output order. More...
 
int width
 Dimensions of the decoded video intended for presentation. More...
 
int height
 
int coded_width
 Dimensions of the coded video. More...
 
int coded_height
 
int format
 The format of the coded data, corresponds to enum AVPixelFormat for video and for enum AVSampleFormat for audio. More...
 

Detailed Description

Examples
decode_audio.c, and decode_video.c.

Definition at line 5108 of file avcodec.h.

Field Documentation

◆ priv_data

void* AVCodecParserContext::priv_data

Definition at line 5109 of file avcodec.h.

◆ parser

struct AVCodecParser* AVCodecParserContext::parser

Definition at line 5110 of file avcodec.h.

◆ frame_offset

int64_t AVCodecParserContext::frame_offset

Definition at line 5111 of file avcodec.h.

Referenced by parse_packet().

◆ cur_offset

int64_t AVCodecParserContext::cur_offset

Definition at line 5112 of file avcodec.h.

◆ next_frame_offset

int64_t AVCodecParserContext::next_frame_offset

Definition at line 5114 of file avcodec.h.

Referenced by flac_read_timestamp().

◆ pict_type

int AVCodecParserContext::pict_type

Definition at line 5116 of file avcodec.h.

Referenced by compute_pkt_fields(), LLVMFuzzerTestOneInput(), and parse_packet().

◆ repeat_pict

int AVCodecParserContext::repeat_pict

This field is used for proper frame duration computation in lavf.

It signals, how much longer the frame duration of the current frame is compared to normal frame duration.

frame_duration = (1 + repeat_pict) * time_base

It is used by codecs like H.264 to display telecined material.

Definition at line 5126 of file avcodec.h.

Referenced by avformat_find_stream_info(), ff_compute_frame_duration(), and process_input_packet().

◆ pts

int64_t AVCodecParserContext::pts

◆ dts

int64_t AVCodecParserContext::dts

Definition at line 5128 of file avcodec.h.

Referenced by LLVMFuzzerTestOneInput(), and parse_packet().

◆ last_pts

int64_t AVCodecParserContext::last_pts

Definition at line 5131 of file avcodec.h.

◆ last_dts

int64_t AVCodecParserContext::last_dts

Definition at line 5132 of file avcodec.h.

◆ fetch_timestamp

int AVCodecParserContext::fetch_timestamp

Definition at line 5133 of file avcodec.h.

◆ cur_frame_start_index

int AVCodecParserContext::cur_frame_start_index

Definition at line 5136 of file avcodec.h.

◆ cur_frame_offset

int64_t AVCodecParserContext::cur_frame_offset[AV_PARSER_PTS_NB]

Definition at line 5137 of file avcodec.h.

◆ cur_frame_pts

int64_t AVCodecParserContext::cur_frame_pts[AV_PARSER_PTS_NB]

Definition at line 5138 of file avcodec.h.

◆ cur_frame_dts

int64_t AVCodecParserContext::cur_frame_dts[AV_PARSER_PTS_NB]

Definition at line 5139 of file avcodec.h.

◆ flags

int AVCodecParserContext::flags

◆ offset

int64_t AVCodecParserContext::offset

byte offset from starting packet start

Definition at line 5148 of file avcodec.h.

Referenced by compute_pkt_fields().

◆ cur_frame_end

int64_t AVCodecParserContext::cur_frame_end[AV_PARSER_PTS_NB]

Definition at line 5149 of file avcodec.h.

◆ key_frame

int AVCodecParserContext::key_frame

Set by parser to 1 for key frames and 0 for non-key frames.

It is initialized to -1, so if the parser doesn't set this flag, old-style fallback using AV_PICTURE_TYPE_I picture type as key frames will be used.

Definition at line 5157 of file avcodec.h.

Referenced by LLVMFuzzerTestOneInput(), and parse_packet().

◆ convergence_duration

attribute_deprecated int64_t AVCodecParserContext::convergence_duration
Deprecated:
unused

Definition at line 5164 of file avcodec.h.

Referenced by compute_pkt_fields().

◆ dts_sync_point

int AVCodecParserContext::dts_sync_point

Synchronization point for start of timestamp generation.

Set to >0 for sync point, 0 for no sync point and <0 for undefined (default).

For example, this corresponds to presence of H.264 buffering period SEI message.

Definition at line 5177 of file avcodec.h.

◆ dts_ref_dts_delta

int AVCodecParserContext::dts_ref_dts_delta

Offset of the current timestamp against last timestamp sync point in units of AVCodecContext.time_base.

Set to INT_MIN when dts_sync_point unused. Otherwise, it must contain a valid timestamp offset.

Note that the timestamp of sync point has usually a nonzero dts_ref_dts_delta, which refers to the previous sync point. Offset of the next frame after timestamp sync point will be usually 1.

For example, this corresponds to H.264 cpb_removal_delay.

Definition at line 5192 of file avcodec.h.

◆ pts_dts_delta

int AVCodecParserContext::pts_dts_delta

Presentation delay of current frame in units of AVCodecContext.time_base.

Set to INT_MIN when dts_sync_point unused. Otherwise, it must contain valid non-negative timestamp delta (presentation time of a frame must not lie in the past).

This delay represents the difference between decoding and presentation time of the frame.

For example, this corresponds to H.264 dpb_output_delay.

Definition at line 5206 of file avcodec.h.

◆ cur_frame_pos

int64_t AVCodecParserContext::cur_frame_pos[AV_PARSER_PTS_NB]

Position of the packet in file.

Analogous to cur_frame_pts/dts

Definition at line 5213 of file avcodec.h.

◆ pos

int64_t AVCodecParserContext::pos

Byte position of currently parsed frame in stream.

Definition at line 5218 of file avcodec.h.

Referenced by ffio_limit(), LLVMFuzzerTestOneInput(), and parse_packet().

◆ last_pos

int64_t AVCodecParserContext::last_pos

Previous frame byte position.

Definition at line 5223 of file avcodec.h.

◆ duration

int AVCodecParserContext::duration

Duration of the current frame.

For audio, this is in units of 1 / AVCodecContext.sample_rate. For all other types, this is in units of AVCodecContext.time_base.

Definition at line 5230 of file avcodec.h.

Referenced by get_best_header(), and parse_packet().

◆ field_order

enum AVFieldOrder AVCodecParserContext::field_order

Definition at line 5232 of file avcodec.h.

Referenced by ff_qsv_process_data().

◆ picture_structure

enum AVPictureStructure AVCodecParserContext::picture_structure

Indicate whether a picture is coded as a frame, top field or bottom field.

For example, H.264 field_pic_flag equal to 0 corresponds to AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag equal to 1 and bottom_field_flag equal to 0 corresponds to AV_PICTURE_STRUCTURE_TOP_FIELD.

Definition at line 5242 of file avcodec.h.

◆ output_picture_number

int AVCodecParserContext::output_picture_number

Picture number incremented in presentation or output order.

This field may be reinitialized at the first picture of a new sequence.

For example, this corresponds to H.264 PicOrderCnt.

Definition at line 5250 of file avcodec.h.

◆ width

int AVCodecParserContext::width

Dimensions of the decoded video intended for presentation.

Definition at line 5255 of file avcodec.h.

Referenced by ff_qsv_process_data().

◆ height

int AVCodecParserContext::height

Definition at line 5256 of file avcodec.h.

Referenced by ff_qsv_process_data().

◆ coded_width

int AVCodecParserContext::coded_width

Dimensions of the coded video.

Definition at line 5261 of file avcodec.h.

Referenced by ff_qsv_process_data().

◆ coded_height

int AVCodecParserContext::coded_height

Definition at line 5262 of file avcodec.h.

Referenced by ff_qsv_process_data().

◆ format

int AVCodecParserContext::format

The format of the coded data, corresponds to enum AVPixelFormat for video and for enum AVSampleFormat for audio.

Note that a decoder can have considerable freedom in how exactly it decodes the data, so the format reported here might be different from the one returned by a decoder.

Definition at line 5272 of file avcodec.h.

Referenced by ff_qsv_process_data().


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