Struct rsmpeg::avcodec::AVCodecContext [−][src]
pub struct AVCodecContext { /* fields omitted */ }
Implementations
impl AVCodecContext
[src]
impl AVCodecContext
[src]pub fn as_ptr(&self) -> *const AVCodecContext
[src]
pub fn as_mut_ptr(&mut self) -> *mut AVCodecContext
[src]
pub unsafe fn set_ptr(&mut self, ptr: NonNull<AVCodecContext>)
[src]
pub unsafe fn set_ptr(&mut self, ptr: NonNull<AVCodecContext>)
[src]Safety
This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.
pub unsafe fn from_raw(raw: NonNull<AVCodecContext>) -> Self
[src]
pub unsafe fn from_raw(raw: NonNull<AVCodecContext>) -> Self
[src]Safety
This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.
pub fn into_raw(self) -> NonNull<AVCodecContext>
[src]
impl AVCodecContext
[src]
impl AVCodecContext
[src]pub fn set_framerate(&mut self, framerate: AVRational)
[src]
pub fn set_channel_layout(&mut self, channel_layout: u64)
[src]
pub fn set_height(&mut self, height: i32)
[src]
pub fn set_width(&mut self, width: i32)
[src]
pub fn set_sample_aspect_ratio(&mut self, sample_aspect_ratio: AVRational)
[src]
pub fn set_pix_fmt(&mut self, pix_fmt: i32)
[src]
pub fn set_time_base(&mut self, time_base: AVRational)
[src]
pub fn set_sample_rate(&mut self, sample_rate: i32)
[src]
pub fn set_channels(&mut self, channels: i32)
[src]
pub fn set_sample_fmt(&mut self, sample_fmt: i32)
[src]
pub fn set_flags(&mut self, flags: i32)
[src]
pub fn set_bit_rate(&mut self, bit_rate: i64)
[src]
pub fn set_strict_std_compliance(&mut self, strict_std_compliance: i32)
[src]
pub fn set_gop_size(&mut self, gop_size: i32)
[src]
pub fn set_max_b_frames(&mut self, max_b_frames: i32)
[src]
impl AVCodecContext
[src]
impl AVCodecContext
[src]pub fn new(codec: &AVCodec) -> Self
[src]
pub fn new(codec: &AVCodec) -> Self
[src]Create a new AVCodecContext
instance, allocate private data and
initialize defaults for the given AVCodec
.
pub fn open(
&mut self,
dict: Option<AVDictionary>
) -> Result<Option<AVDictionary>>
[src]
pub fn open(
&mut self,
dict: Option<AVDictionary>
) -> Result<Option<AVDictionary>>
[src]Initialize the AVCodecContext
.
dict: A AVDictionary
filled with AVCodecContext
and AVCodec
private options. Function returns a AVDictionary
filled with
options that were not found if given dictionary. It can usually be
ignored.
pub fn decode_packet(&mut self, packet: &AVPacket) -> Result<Option<AVFrame>>
[src]
👎 Deprecated: This is a wrapper around the deprecated api avcodec_decode_video2()
and avcodec_decode_audio4()
.
pub fn decode_packet(&mut self, packet: &AVPacket) -> Result<Option<AVFrame>>
[src]This is a wrapper around the deprecated api avcodec_decode_video2()
and avcodec_decode_audio4()
.
This is a wrapper around the deprecated api avcodec_decode_video2()
and
avcodec_decode_audio4()
.
Return Some(frame)
on getting a frame(AVFrame
), return None
on
not getting frame(or say frame decoding haven’t finished), Return
Err(_)
on decoding error.
pub fn encode_frame(
&mut self,
frame: Option<&AVFrame>
) -> Result<Option<AVPacket>>
[src]
👎 Deprecated: This is a wrapper around deprecated api: avcodec_encode_video2
and avcodec_encode_audio2
.
pub fn encode_frame(
&mut self,
frame: Option<&AVFrame>
) -> Result<Option<AVPacket>>
[src]This is a wrapper around deprecated api: avcodec_encode_video2
and avcodec_encode_audio2
.
This is a wrapper around deprecated api: avcodec_encode_video2
and avcodec_encode_audio2
.
Return Some(Packet)
on getting a packet(AVPacket
), return None
on not getting packet(or say packet encoding haven’t finished), Return
Err(_)
on decoding error.
pub fn send_packet(&mut self, packet: Option<&AVPacket>) -> Result<()>
[src]
pub fn send_packet(&mut self, packet: Option<&AVPacket>) -> Result<()>
[src]Trying to push a packet to current decoding_context(AVCodecContext
).
pub fn receive_frame(&mut self) -> Result<AVFrame>
[src]
pub fn receive_frame(&mut self) -> Result<AVFrame>
[src]Trying to pull a frame from current decoding_context(AVCodecContext
).
pub fn send_frame(&mut self, frame: Option<&AVFrame>) -> Result<()>
[src]
pub fn send_frame(&mut self, frame: Option<&AVFrame>) -> Result<()>
[src]Trying to push a frame to current encoding_context(AVCodecContext
).
pub fn receive_packet(&mut self) -> Result<AVPacket>
[src]
pub fn receive_packet(&mut self) -> Result<AVPacket>
[src]Trying to pull a packet from current encoding_context(AVCodecContext
).
pub fn set_codecpar(&mut self, codecpar: AVCodecParametersRef<'_>) -> Result<()>
[src]
pub fn set_codecpar(&mut self, codecpar: AVCodecParametersRef<'_>) -> Result<()>
[src]Fill the codec context based on the values from the supplied codec parameters.
pub fn extract_codecpar(&self) -> AVCodecParameters
[src]
pub fn extract_codecpar(&self) -> AVCodecParameters
[src]Get a filled AVCodecParameters
based on the values from current AVCodecContext
.
impl<'ctx> AVCodecContext
[src]
impl<'ctx> AVCodecContext
[src]pub fn codec(&'ctx self) -> AVCodecRef<'ctx>
[src]
pub fn codec(&'ctx self) -> AVCodecRef<'ctx>
[src]Get a reference to the AVCodec
in current codec context.
Trait Implementations
impl Deref for AVCodecContext
[src]
impl Deref for AVCodecContext
[src]type Target = AVCodecContext
type Target = AVCodecContext
The resulting type after dereferencing.