跳到主要内容

AVCodecParserContext

搜索

结构体 AVCodecParserContext 

源代码
#[repr(C)]
pub struct AVCodecParserContext {
Show 35 fields pub priv_data: *mut c_void, pub parser: *const 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 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_void§parser: *const AVCodecParser§frame_offset: i64§cur_offset: i64§next_frame_offset: i64§pict_type: c_int§repeat_pict: c_int

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.

§pts: i64§dts: i64§last_pts: i64§last_dts: i64§fetch_timestamp: c_int§cur_frame_start_index: c_int§cur_frame_offset: [i64; 4]§cur_frame_pts: [i64; 4]§cur_frame_dts: [i64; 4]§flags: c_int§offset: i64

< byte offset from starting packet start

§cur_frame_end: [i64; 4]§key_frame: c_int

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.

§dts_sync_point: c_int

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.

§dts_ref_dts_delta: c_int

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.

§pts_dts_delta: c_int

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.

§cur_frame_pos: [i64; 4]

Position of the packet in file.

Analogous to cur_frame_pts/dts

§pos: i64

Byte position of currently parsed frame in stream.

§last_pos: i64

Previous frame byte position.

§duration: c_int

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.

§field_order: AVFieldOrder§picture_structure: AVPictureStructure

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.

§output_picture_number: c_int

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.

§width: c_int

Dimensions of the decoded video intended for presentation.

§height: c_int§coded_width: c_int

Dimensions of the coded video.

§coded_height: c_int§format: c_int

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.

trait 实现§

源代码§

impl Clone for AVCodecParserContext

源代码§

fn clone(&self) -> AVCodecParserContext

Returns a duplicate of the value. 阅读更多
1.0.0 · 源代码§

fn clone_from(&mut self, source: &Self)

source 执行拷贝赋值。 阅读更多
源代码§

impl Debug for AVCodecParserContext

源代码§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化该值。 阅读更多
源代码§

impl PartialEq for AVCodecParserContext

源代码§

fn eq(&self, other: &AVCodecParserContext) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 源代码§

fn ne(&self, other: &Rhs) -> bool

测试 !=。默认实现几乎总是足够的,没有充分理由不应被重写。
源代码§

impl Copy for AVCodecParserContext

源代码§

impl Eq for AVCodecParserContext

源代码§

impl StructuralPartialEq for AVCodecParserContext

自动 trait 实现§

blanket 实现§

源代码§

impl<T> Any for T
where T: 'static + ?Sized,

源代码§

fn type_id(&self) -> TypeId

获取 selfTypeId阅读更多
源代码§

impl<T> Borrow<T> for T
where T: ?Sized,

源代码§

fn borrow(&self) -> &T

从拥有的值不可变地借用。 阅读更多
源代码§

impl<T> BorrowMut<T> for T
where T: ?Sized,

源代码§

fn borrow_mut(&mut self) -> &mut T

从拥有的值可变地借用。 阅读更多
源代码§

impl<T> CloneToUninit for T
where T: Clone,

源代码§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
self 执行拷贝赋值到 dest阅读更多
源代码§

impl<T> From<T> for T

源代码§

fn from(t: T) -> T

原样返回参数。

源代码§

impl<T, U> Into<U> for T
where U: From<T>,

源代码§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U 实现选择执行的操作。

源代码§

impl<T> ToOwned for T
where T: Clone,

源代码§

type Owned = T

获取所有权后得到的类型。
源代码§

fn to_owned(&self) -> T

通常通过克隆,从借用数据创建拥有的数据。 阅读更多
源代码§

fn clone_into(&self, target: &mut T)

通常通过克隆,使用借用数据替换拥有的数据。 阅读更多
源代码§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

源代码§

type Error = Infallible

转换出错时返回的类型。
源代码§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行该转换。
源代码§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

源代码§

type Error = <U as TryFrom<T>>::Error

转换出错时返回的类型。
源代码§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行该转换。