[−][src]Struct mediasoup::consumer::Consumer
Implementations
impl Consumer
[src]
pub fn id(&self) -> ConsumerId
[src]
Consumer id.
pub fn producer_id(&self) -> ProducerId
[src]
Associated Producer id.
pub fn kind(&self) -> MediaKind
[src]
Media kind.
pub fn rtp_parameters(&self) -> &RtpParameters
[src]
RTP parameters.
pub fn type(&self) -> ConsumerType
[src]
Consumer type.
pub fn paused(&self) -> bool
[src]
Whether the Consumer is paused.
pub fn producer_paused(&self) -> bool
[src]
Whether the associate Producer is paused.
pub fn priority(&self) -> u8
[src]
Current priority.
pub fn score(&self) -> ConsumerScore
[src]
Consumer score.
pub fn preferred_layers(&self) -> Option<ConsumerLayers>
[src]
Preferred video layers.
pub fn current_layers(&self) -> Option<ConsumerLayers>
[src]
Current video layers.
pub fn app_data(&self) -> &AppData
[src]
App custom data.
pub async fn get_stats<'_>(&'_ self) -> Result<ConsumerStats, RequestError>
[src]
Get Consumer stats.
pub async fn pause<'_>(&'_ self) -> Result<(), RequestError>
[src]
Pause the Consumer.
pub async fn resume<'_>(&'_ self) -> Result<(), RequestError>
[src]
Resume the Consumer.
pub async fn set_preferred_layers<'_>(
&'_ self,
consumer_layers: ConsumerLayers
) -> Result<(), RequestError>
[src]
&'_ self,
consumer_layers: ConsumerLayers
) -> Result<(), RequestError>
Set preferred video layers.
pub async fn set_priority<'_>(
&'_ self,
priority: u8
) -> Result<(), RequestError>
[src]
&'_ self,
priority: u8
) -> Result<(), RequestError>
Set priority.
pub async fn unset_priority<'_>(&'_ self) -> Result<(), RequestError>
[src]
Unset priority.
pub async fn request_key_frame<'_>(&'_ self) -> Result<(), RequestError>
[src]
Request a key frame to the Producer.
pub async fn enable_trace_event<'_>(
&'_ self,
types: Vec<ConsumerTraceEventType>
) -> Result<(), RequestError>
[src]
&'_ self,
types: Vec<ConsumerTraceEventType>
) -> Result<(), RequestError>
Enable 'trace' event.
pub fn on_rtp<F: Fn(&Bytes) + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_pause<F: Fn() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_resume<F: Fn() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_producer_pause<F: Fn() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_producer_resume<F: Fn() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_score<F: Fn(&ConsumerScore) + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_layers_change<F: Fn(&ConsumerLayers) + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_trace<F: Fn(&ConsumerTraceEventData) + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_producer_close<F: FnOnce() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
pub fn on_close<F: FnOnce() + Send + 'static>(
&self,
callback: F
) -> HandlerId<'static>
[src]
&self,
callback: F
) -> HandlerId<'static>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Consumer
impl Send for Consumer
impl Sync for Consumer
impl Unpin for Consumer
impl !UnwindSafe for Consumer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,