pub struct MediaSegment {
pub segment_id: String,
pub stream_id: String,
pub sequence: u64,
pub duration_secs: f32,
pub data: Vec<u8>,
pub content_type: String,
}Expand description
A single media segment as stored in the cache.
Fields§
§segment_id: StringUnique identifier for this segment (e.g. "stream1-0003").
stream_id: StringLogical stream this segment belongs to (e.g. a rendition URL prefix).
sequence: u64Monotonically increasing sequence number within the stream.
duration_secs: f32Playback duration of this segment in seconds.
data: Vec<u8>Raw encoded media data.
content_type: StringMIME content type (e.g. "video/mp2t" or "video/mp4").
Implementations§
Trait Implementations§
Source§impl Clone for MediaSegment
impl Clone for MediaSegment
Source§fn clone(&self) -> MediaSegment
fn clone(&self) -> MediaSegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MediaSegment
impl RefUnwindSafe for MediaSegment
impl Send for MediaSegment
impl Sync for MediaSegment
impl Unpin for MediaSegment
impl UnsafeUnpin for MediaSegment
impl UnwindSafe for MediaSegment
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