pub struct SegmentEncoder {
pub encoded_segments: Vec<EncodedSegment>,
}Expand description
Encoder that tracks encoded segments.
Fields§
§encoded_segments: Vec<EncodedSegment>All encoded segments.
Implementations§
Source§impl SegmentEncoder
impl SegmentEncoder
Sourcepub fn add_segment(&mut self, segment: EncodedSegment)
pub fn add_segment(&mut self, segment: EncodedSegment)
Adds a segment to the encoder’s list.
Sourcepub fn segment_count(&self) -> usize
pub fn segment_count(&self) -> usize
Returns the total number of encoded segments.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Returns the total encoded size in bytes.
Sourcepub fn average_bitrate_kbps(&self) -> Option<u32>
pub fn average_bitrate_kbps(&self) -> Option<u32>
Returns the average bitrate across all segments.
Trait Implementations§
Source§impl Clone for SegmentEncoder
impl Clone for SegmentEncoder
Source§fn clone(&self) -> SegmentEncoder
fn clone(&self) -> SegmentEncoder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentEncoder
impl Debug for SegmentEncoder
Source§impl Default for SegmentEncoder
impl Default for SegmentEncoder
Source§fn default() -> SegmentEncoder
fn default() -> SegmentEncoder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SegmentEncoder
impl RefUnwindSafe for SegmentEncoder
impl Send for SegmentEncoder
impl Sync for SegmentEncoder
impl Unpin for SegmentEncoder
impl UnsafeUnpin for SegmentEncoder
impl UnwindSafe for SegmentEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more