pub struct AudioStreamer { /* private fields */ }
Expand description

Streams audio.

Trait Implementations§

source§

impl Streamer for AudioStreamer

§

type Frame = Audio

The associated type of frame used for the stream.
§

type ProcessedFrame = ()

The associated type after the frame is processed.
source§

fn stream_type(&self) -> Type

The type of data this stream corresponds to.
source§

fn is_primary_streamer(&self) -> bool

The primary streamer will control most of the state/syncing.
source§

fn stream_index(&self) -> usize

The stream index.
source§

fn cycle_stream(&mut self) -> usize

Move to the next stream index, if possible, and return the new_stream_index.
source§

fn decoder(&mut self) -> &mut Opened

The streamer’s decoder.
source§

fn input_context(&mut self) -> &mut Input

The streamer’s input context.
source§

fn elapsed_ms(&self) -> &Shared<i64>

The elapsed time of this streamer, in milliseconds.
source§

fn primary_elapsed_ms(&self) -> &Shared<i64>

The elapsed time of the primary streamer, in milliseconds.
source§

fn duration_ms(&self) -> i64

The total duration of the stream, in milliseconds.
source§

fn player_state(&self) -> &Shared<PlayerState>

The streamer’s state.
source§

fn decode_frame(&mut self) -> Result<Self::Frame>

Output a frame from the decoder.
source§

fn process_frame(&mut self, frame: Self::Frame) -> Result<Self::ProcessedFrame>

Process a decoded frame.
source§

fn seek(&mut self, seek_frac: f32)

Seek to a location within the stream.
source§

fn drop_frames(&mut self) -> Result<()>

Ignore the remainder of this packet.
source§

fn recieve_next_packet(&mut self) -> Result<()>

Recieve the next packet of the stream.
source§

fn reset(&mut self)

Reset the stream to its initial state.
source§

fn recieve_next_packet_until_frame(&mut self) -> Result<Self::ProcessedFrame>

Keep recieving packets until a frame can be decoded.
source§

fn apply_frame(&mut self, _frame: Self::ProcessedFrame)

Apply a processed frame
source§

fn recieve_next_frame(&mut self) -> Result<Self::ProcessedFrame>

Decode and process a frame.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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, U> Into<U> for Twhere 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 Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.