pub struct AvPacket<'a> {
packet: AVPacket,
_buffer_data: PhantomData<&'a ()>,
}
Expand description
An encoded input packet that can be submitted to AvCodecContext::try_send_packet
.
Fields§
§packet: AVPacket
§_buffer_data: PhantomData<&'a ()>
Implementations§
source§impl<'a> AvPacket<'a>
impl<'a> AvPacket<'a>
sourcepub fn empty() -> Self
pub fn empty() -> Self
Create an empty AvPacket without buffers.
This packet should be only used with an encoder; in which case the encoder will
automatically allocate a buffer of appropriate size and store it inside this AvPacket
.
sourcepub fn new<T: AvBufferSource>(pts: i64, input_data: &'a mut T) -> Self
pub fn new<T: AvBufferSource>(pts: i64, input_data: &'a mut T) -> Self
Create a new AvPacket that borrows the input_data
.
The returned AvPacket
will hold a reference to input_data
, meaning that libavcodec might
perform a copy from/to it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for AvPacket<'a>
impl<'a> !Send for AvPacket<'a>
impl<'a> !Sync for AvPacket<'a>
impl<'a> Unpin for AvPacket<'a>
impl<'a> UnwindSafe for AvPacket<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more