feat(encoder): expose framerate

This commit is contained in:
tilpner
2022-06-08 23:39:15 +02:00
parent 5f643dc347
commit 4378d480ed
+12
View File
@@ -144,6 +144,18 @@ impl Encoder {
}
}
}
pub fn frame_rate(&self) -> Option<Rational> {
unsafe {
let fr = Rational::from((*self.as_ptr()).framerate);
if fr == Rational(0, 1) {
None
}
else {
Some(fr)
}
}
}
}
impl Deref for Encoder {