format/stream: add id accessor

This commit is contained in:
Tadas Barzdžius
2017-12-06 17:13:46 +02:00
committed by meh
parent 94ebdf143c
commit 20c7ef399a

View File

@ -21,6 +21,12 @@ impl<'a> Stream<'a> {
}
impl<'a> Stream<'a> {
pub fn id(&self) -> i32 {
unsafe {
i32::from((*self.as_ptr()).id)
}
}
pub fn codec(&self) -> codec::Context {
unsafe {
codec::Context::wrap((*self.as_ptr()).codec, Some(self.context.destructor()))