format/stream: add id accessor
This commit is contained in:
@ -21,6 +21,12 @@ impl<'a> Stream<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
pub fn codec(&self) -> codec::Context {
|
||||||
unsafe {
|
unsafe {
|
||||||
codec::Context::wrap((*self.as_ptr()).codec, Some(self.context.destructor()))
|
codec::Context::wrap((*self.as_ptr()).codec, Some(self.context.destructor()))
|
||||||
|
Reference in New Issue
Block a user