{en,de}coder/audio: add frame_size() method

This commit is contained in:
lummax
2015-09-06 12:55:52 +02:00
committed by meh
parent ced43fe83b
commit 29450c4260
2 changed files with 12 additions and 0 deletions

View File

@ -88,6 +88,12 @@ impl Audio {
} }
} }
pub fn frame_size(&self) -> u32 {
unsafe {
(*self.as_ptr()).frame_size as u32
}
}
pub fn frame_start(&self) -> Option<usize> { pub fn frame_start(&self) -> Option<usize> {
unsafe { unsafe {
match (*self.as_ptr()).timecode_frame_start { match (*self.as_ptr()).timecode_frame_start {

View File

@ -130,6 +130,12 @@ impl Encoder {
} }
} }
} }
pub fn frame_size(&self) -> u32 {
unsafe {
(*self.as_ptr()).frame_size as u32
}
}
} }
impl Deref for Encoder { impl Deref for Encoder {