Skip to main content

SmoothClient

Struct SmoothClient 

Source
pub struct SmoothClient { /* private fields */ }
Expand description

The Smooth Streaming client engine. See the crate docs.

Implementations§

Source§

impl SmoothClient

Source

pub fn new(manifest_url: Url, config: SmoothConfig) -> Self

A client for the manifest at manifest_url; the first Action is its fetch.

Source

pub fn set_manifest_url(&mut self, url: Url)

Re-base relative fragment URLs on url, after a redirect of the manifest.

Source

pub fn is_started(&self) -> bool

True once a manifest has been accepted and the streams are resolved.

Source

pub fn is_live(&self) -> bool

True while the presentation is live and the session has not ended.

Source

pub fn is_ended(&self) -> bool

True once a static presentation has played to its end.

Source

pub fn is_fatal(&self) -> bool

True once the session has ended fatally.

Source

pub fn video_quality_count(&self) -> usize

How many QualityLevels the first video stream offers (0 before the first manifest).

Source

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).

Source

pub fn next_deadline(&self) -> Option<u64>

The earliest instant, in microseconds, at which Self::poll has more to do without any new input.

Source

pub fn poll(&mut self, now: u64) -> Option<Action>

The next fetch the host should perform, if any.

Source

pub fn next_output(&mut self) -> Option<Output>

The next thing to act on, if any.

Source

pub fn on_manifest(&mut self, now: u64, id: RequestId, bytes: &[u8])

A manifest body arrived for request id.

Source

pub fn on_fragment(&mut self, now: u64, id: RequestId, bytes: &[u8])

A fragment body arrived for request id.

Source

pub fn on_failure(&mut self, now: u64, id: RequestId, failure: FetchFailure)

The fetch for request id produced no usable body.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more