Skip to content

Commit

Permalink
feat(encoder): expose framerate
Browse files Browse the repository at this point in the history
  • Loading branch information
tilpner committed Jun 8, 2022
1 parent 5f643dc commit 4378d48
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/codec/encoder/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4378d48

Please sign in to comment.