codec: introduce Parameters
As of ffmpeg 3.1, a new `AVCodecParameters` type and related API introduced. This commit contains minimal changes to support new API.
This commit is contained in:
@ -27,6 +27,12 @@ impl<'a> Stream<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn codec_parameters(&self) -> codec::Parameters {
|
||||
unsafe {
|
||||
codec::Parameters::wrap((*self.as_ptr()).codecpar, Some(self.context.destructor()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn index(&self) -> usize {
|
||||
unsafe {
|
||||
(*self.as_ptr()).index as usize
|
||||
|
Reference in New Issue
Block a user