Struct mmids_core::VideoTimestamp
source · [−]pub struct VideoTimestamp { /* private fields */ }
Expand description
Represents timestamps relevant to video data. Contains the decoding time stamp (dts) and presentation time stamp (dts).
Implementations
sourceimpl VideoTimestamp
impl VideoTimestamp
sourcepub fn from_rtmp_data(
rtmp_timestamp: RtmpTimestamp,
composition_time_offset: i32
) -> Self
pub fn from_rtmp_data(
rtmp_timestamp: RtmpTimestamp,
composition_time_offset: i32
) -> Self
Creates a new video timestamp from RTMP data. RTMP packets contain a timestamp in the
RTMP header itself and a composition time offset in the AVCVIDEOPACKET
header. The RTMP
timestamp is the decoding timestamp (dts), while the composition time offset is added to the
dts to get the presentation timestamp (pts).
sourcepub fn from_durations(dts: Duration, pts: Duration) -> Self
pub fn from_durations(dts: Duration, pts: Duration) -> Self
Creates a new video timestamp based on absolute dts and pts values.
sourcepub fn pts_offset(&self) -> i32
pub fn pts_offset(&self) -> i32
Gets the offset from the decoding timestamp for the pts
Trait Implementations
sourceimpl Clone for VideoTimestamp
impl Clone for VideoTimestamp
sourcefn clone(&self) -> VideoTimestamp
fn clone(&self) -> VideoTimestamp
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VideoTimestamp
impl Debug for VideoTimestamp
sourceimpl PartialEq<VideoTimestamp> for VideoTimestamp
impl PartialEq<VideoTimestamp> for VideoTimestamp
sourcefn eq(&self, other: &VideoTimestamp) -> bool
fn eq(&self, other: &VideoTimestamp) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VideoTimestamp) -> bool
fn ne(&self, other: &VideoTimestamp) -> bool
This method tests for !=
.
impl StructuralPartialEq for VideoTimestamp
Auto Trait Implementations
impl RefUnwindSafe for VideoTimestamp
impl Send for VideoTimestamp
impl Sync for VideoTimestamp
impl Unpin for VideoTimestamp
impl UnwindSafe for VideoTimestamp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcepub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcepub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcepub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcepub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more