mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
Add Packet::time_base/set_time_base
Allows inspecting and adjusting the packet's time_base.
This commit is contained in:
@@ -143,6 +143,18 @@ impl Packet {
|
||||
self.0.dts = value.unwrap_or(AV_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(feature = "ffmpeg_5_0")]
|
||||
pub fn time_base(&self) -> Rational {
|
||||
self.0.time_base.into()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(feature = "ffmpeg_5_0")]
|
||||
pub fn set_time_base(&mut self, value: Rational) {
|
||||
self.0.time_base = value.into();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn size(&self) -> usize {
|
||||
self.0.size as usize
|
||||
|
||||
Reference in New Issue
Block a user