pub struct Representation {
pub id: String,
pub stream: StreamInfo,
pub timescale: u32,
pub segment_durations: Vec<u64>,
pub addressing: SegmentAddressing,
pub max_playout_rate: Option<f64>,
}Expand description
One selectable rendition within an adaptation set.
Fields§
§id: StringA unique id within the manifest (also used in segment URLs).
stream: StreamInfoThe stream this representation carries.
timescale: u32Timescale the segment durations are expressed in.
segment_durations: Vec<u64>Per-segment durations, in timescale ticks, in order.
addressing: SegmentAddressingHow segments are addressed (template vs on-demand base).
max_playout_rate: Option<f64>When set, this is a trick-play representation (maxPlayoutRate).
Implementations§
Source§impl Representation
impl Representation
Sourcepub fn new(
id: impl Into<String>,
stream: StreamInfo,
init: impl Into<String>,
media: impl Into<String>,
timescale: u32,
segment_durations: Vec<u64>,
) -> Self
pub fn new( id: impl Into<String>, stream: StreamInfo, init: impl Into<String>, media: impl Into<String>, timescale: u32, segment_durations: Vec<u64>, ) -> Self
Build a standard multi-file VOD representation starting at segment number 1.
Sourcepub fn on_demand(
id: impl Into<String>,
stream: StreamInfo,
timescale: u32,
segment_durations: Vec<u64>,
base: SegmentBaseInfo,
) -> Self
pub fn on_demand( id: impl Into<String>, stream: StreamInfo, timescale: u32, segment_durations: Vec<u64>, base: SegmentBaseInfo, ) -> Self
Build an on-demand single-file representation with byte-range addressing.
Sourcepub fn init(&self) -> Option<&str>
pub fn init(&self) -> Option<&str>
Convenience accessors for template fields (legacy package path).
Sourcepub fn set_start_number(&mut self, n: u32)
pub fn set_start_number(&mut self, n: u32)
Mutable template start number (no-op for on-demand).
Sourcepub fn set_presentation_time_offset(&mut self, pto: u64)
pub fn set_presentation_time_offset(&mut self, pto: u64)
Mutable template presentation time offset (no-op for on-demand).
Sourcepub fn set_availability_time_offset(&mut self, ato: Option<f64>)
pub fn set_availability_time_offset(&mut self, ato: Option<f64>)
Mutable template availability time offset (no-op for on-demand).
Trait Implementations§
Source§impl Clone for Representation
impl Clone for Representation
Source§fn clone(&self) -> Representation
fn clone(&self) -> Representation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more