Struct ffmpeg_sys_next::AVCodecParserContext
source · [−]#[repr(C)]pub struct AVCodecParserContext {Show 36 fields
pub priv_data: *mut c_void,
pub parser: *mut AVCodecParser,
pub frame_offset: i64,
pub cur_offset: i64,
pub next_frame_offset: i64,
pub pict_type: c_int,
pub repeat_pict: c_int,
pub pts: i64,
pub dts: i64,
pub last_pts: i64,
pub last_dts: i64,
pub fetch_timestamp: c_int,
pub cur_frame_start_index: c_int,
pub cur_frame_offset: [i64; 4],
pub cur_frame_pts: [i64; 4],
pub cur_frame_dts: [i64; 4],
pub flags: c_int,
pub offset: i64,
pub cur_frame_end: [i64; 4],
pub key_frame: c_int,
pub convergence_duration: i64,
pub dts_sync_point: c_int,
pub dts_ref_dts_delta: c_int,
pub pts_dts_delta: c_int,
pub cur_frame_pos: [i64; 4],
pub pos: i64,
pub last_pos: i64,
pub duration: c_int,
pub field_order: AVFieldOrder,
pub picture_structure: AVPictureStructure,
pub output_picture_number: c_int,
pub width: c_int,
pub height: c_int,
pub coded_width: c_int,
pub coded_height: c_int,
pub format: c_int,
}Fields
priv_data: *mut c_voidparser: *mut AVCodecParserframe_offset: i64cur_offset: i64next_frame_offset: i64pict_type: c_intrepeat_pict: c_intThis 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.
pts: i64dts: i64last_pts: i64last_dts: i64fetch_timestamp: c_intcur_frame_start_index: c_intcur_frame_offset: [i64; 4]cur_frame_pts: [i64; 4]cur_frame_dts: [i64; 4]flags: c_intoffset: i64< byte offset from starting packet start
cur_frame_end: [i64; 4]key_frame: c_intSet 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.
convergence_duration: i64@deprecated unused
dts_sync_point: c_intSynchronization 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.
dts_ref_dts_delta: c_intOffset 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.
pts_dts_delta: c_intPresentation 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.
cur_frame_pos: [i64; 4]Position of the packet in file.
Analogous to cur_frame_pts/dts
pos: i64Byte position of currently parsed frame in stream.
last_pos: i64Previous frame byte position.
duration: c_intDuration 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.
field_order: AVFieldOrderpicture_structure: AVPictureStructureIndicate 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.
output_picture_number: c_intPicture 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.
width: c_intDimensions of the decoded video intended for presentation.
height: c_intcoded_width: c_intDimensions of the coded video.
coded_height: c_intformat: c_intThe 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.
Trait Implementations
sourceimpl Clone for AVCodecParserContext
impl Clone for AVCodecParserContext
sourcefn clone(&self) -> AVCodecParserContext
fn clone(&self) -> AVCodecParserContext
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for AVCodecParserContext
impl Debug for AVCodecParserContext
sourceimpl PartialEq<AVCodecParserContext> for AVCodecParserContext
impl PartialEq<AVCodecParserContext> for AVCodecParserContext
sourcefn eq(&self, other: &AVCodecParserContext) -> bool
fn eq(&self, other: &AVCodecParserContext) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &AVCodecParserContext) -> bool
fn ne(&self, other: &AVCodecParserContext) -> bool
This method tests for !=.
impl Copy for AVCodecParserContext
impl Eq for AVCodecParserContext
impl StructuralEq for AVCodecParserContext
impl StructuralPartialEq for AVCodecParserContext
Auto Trait Implementations
impl RefUnwindSafe for AVCodecParserContext
impl !Send for AVCodecParserContext
impl !Sync for AVCodecParserContext
impl Unpin for AVCodecParserContext
impl UnwindSafe for AVCodecParserContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more