[−][src]Struct ac_ffmpeg::time::Timestamp
A timestamp supporting various time bases. All comparisons are done within microsecond time base.
Implementations
impl Timestamp
[src]
pub fn null() -> Self
[src]
Create a "null" timestamp (i.e. a timestamp set to the AV_NOPTS_VALUE).
pub const fn new(timestamp: i64, time_base: TimeBase) -> Self
[src]
Create a new timestamp with a given time base.
pub const fn from_secs(timestamp: i64) -> Self
[src]
Create a new timestamp with 1/1 time base.
pub const fn from_millis(timestamp: i64) -> Self
[src]
Create a new timestamp with 1/1_000 time base.
pub const fn from_micros(timestamp: i64) -> Self
[src]
Create a new timestamp with 1/1_000_000 time base.
pub const fn from_nanos(timestamp: i64) -> Self
[src]
Create a new timestamp with 1/1_000_000_000 time base.
pub fn time_base(&self) -> TimeBase
[src]
Get the time base.
pub fn timestamp(&self) -> i64
[src]
Get the raw timestamp value.
pub fn is_null(&self) -> bool
[src]
Check if this is the "null" timestamp (i.e. it is equal to the AV_NOPTS_VALUE).
pub fn with_time_base(&self, time_base: TimeBase) -> Self
[src]
Rescale the timestamp value to a given time base.
pub fn as_secs(&self) -> Option<i64>
[src]
Get the timestamp value in seconds.
pub fn as_millis(&self) -> Option<i64>
[src]
Get the timestamp value in milliseconds.
pub fn as_micros(&self) -> Option<i64>
[src]
Get the timestamp value in microseconds.
pub fn as_nanos(&self) -> Option<i64>
[src]
Get the timestamp value in nanoseconds.
pub fn as_f32(&self) -> Option<f32>
[src]
Get the timestamp value as a floating point number with 32-bit precision.
pub fn as_f64(&self) -> Option<f64>
[src]
Get the timestamp value as a floating point number with 64-bit precision.
Trait Implementations
impl Add<Duration> for Timestamp
[src]
type Output = Timestamp
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Self::Output
[src]
impl AddAssign<Duration> for Timestamp
[src]
fn add_assign(&mut self, rhs: Duration)
[src]
impl Clone for Timestamp
[src]
impl Copy for Timestamp
[src]
impl Debug for Timestamp
[src]
impl Eq for Timestamp
[src]
impl PartialEq<Timestamp> for Timestamp
[src]
impl PartialOrd<Timestamp> for Timestamp
[src]
fn partial_cmp(&self, other: &Timestamp) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Sub<Duration> for Timestamp
[src]
type Output = Timestamp
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Self::Output
[src]
impl Sub<Timestamp> for Timestamp
[src]
type Output = Duration
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl SubAssign<Duration> for Timestamp
[src]
fn sub_assign(&mut self, rhs: Duration)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnwindSafe for Timestamp
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,