pub struct SmoothClient { /* private fields */ }Expand description
The Smooth Streaming client engine. See the crate docs.
Implementations§
Source§impl SmoothClient
impl SmoothClient
Sourcepub fn new(manifest_url: Url, config: SmoothConfig) -> Self
pub fn new(manifest_url: Url, config: SmoothConfig) -> Self
A client for the manifest at manifest_url; the first Action is its fetch.
Sourcepub fn set_manifest_url(&mut self, url: Url)
pub fn set_manifest_url(&mut self, url: Url)
Re-base relative fragment URLs on url, after a redirect of the manifest.
Sourcepub fn is_started(&self) -> bool
pub fn is_started(&self) -> bool
True once a manifest has been accepted and the streams are resolved.
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
True while the presentation is live and the session has not ended.
Sourcepub fn video_quality_count(&self) -> usize
pub fn video_quality_count(&self) -> usize
How many QualityLevels the first video stream offers (0 before the first manifest).
Sourcepub fn select_video_quality(&mut self, index: usize) -> bool
pub fn select_video_quality(&mut self, index: usize) -> bool
Fetch the first video stream’s later fragments at QualityLevel index
(an index into Output::Qualities); false when there is no such level.
Fragments already requested keep their level. Once the tracks are
announced, a level of the same codec family is accepted even when its
codec configuration (parameter sets, resolution) differs: the new
configuration is announced as Output::TracksChanged before the first
sample of the new level. A level of another codec family is refused (false).
Sourcepub fn next_deadline(&self) -> Option<u64>
pub fn next_deadline(&self) -> Option<u64>
The earliest instant, in microseconds, at which Self::poll has more to do
without any new input.
Sourcepub fn poll(&mut self, now: u64) -> Option<Action>
pub fn poll(&mut self, now: u64) -> Option<Action>
The next fetch the host should perform, if any.
Sourcepub fn next_output(&mut self) -> Option<Output>
pub fn next_output(&mut self) -> Option<Output>
The next thing to act on, if any.
Sourcepub fn on_manifest(&mut self, now: u64, id: RequestId, bytes: &[u8])
pub fn on_manifest(&mut self, now: u64, id: RequestId, bytes: &[u8])
A manifest body arrived for request id.
Sourcepub fn on_fragment(&mut self, now: u64, id: RequestId, bytes: &[u8])
pub fn on_fragment(&mut self, now: u64, id: RequestId, bytes: &[u8])
A fragment body arrived for request id.
Sourcepub fn on_failure(&mut self, now: u64, id: RequestId, failure: FetchFailure)
pub fn on_failure(&mut self, now: u64, id: RequestId, failure: FetchFailure)
The fetch for request id produced no usable body.