encoder/{audio,video}: add flush()
methods`
This commit is contained in:
parent
4471ffc934
commit
c8a95364a2
@ -131,6 +131,12 @@ impl Encoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn flush(&mut self, out: &mut Packet) -> Result<bool, Error> {
|
||||||
|
unsafe {
|
||||||
|
self.encode(&frame::Audio::wrap(ptr::null_mut()), out)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn frame_size(&self) -> u32 {
|
pub fn frame_size(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.as_ptr()).frame_size as u32
|
(*self.as_ptr()).frame_size as u32
|
||||||
|
@ -304,6 +304,12 @@ impl Encoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn flush(&mut self, out: &mut Packet) -> Result<bool, Error> {
|
||||||
|
unsafe {
|
||||||
|
self.encode(&frame::Video::wrap(ptr::null_mut()), out)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn frame_size(&self) -> u32 {
|
pub fn frame_size(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.as_ptr()).frame_size as u32
|
(*self.as_ptr()).frame_size as u32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user