Trait mediasoup::rtp_observer::RtpObserver [−][src]
An RTP observer inspects the media received by a set of selected producers.
mediasoup implements the following RTP observers:
Required methods
fn id(&self) -> RtpObserverId
[src]
RtpObserver id.
fn paused(&self) -> bool
[src]
Whether the RtpObserver is paused.
fn app_data(&self) -> &AppData
[src]
Custom application data.
fn closed(&self) -> bool
[src]
Whether the RTP observer is closed.
#[must_use]fn pause<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Pauses the RTP observer. No RTP is inspected until resume() is called.
#[must_use]fn resume<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Resumes the RTP observer. RTP is inspected again.
#[must_use]fn add_producer<'life0, 'async_trait>(
&'life0 self,
rtp_observer_add_producer_options: RtpObserverAddProducerOptions
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
rtp_observer_add_producer_options: RtpObserverAddProducerOptions
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Provides the RTP observer with a new producer to monitor.
#[must_use]fn remove_producer<'life0, 'async_trait>(
&'life0 self,
producer_id: ProducerId
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
producer_id: ProducerId
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Removes the given producer from the RTP observer.
fn on_pause(&self, callback: Box<dyn Fn() + Send + Sync + 'static>) -> HandlerId
[src]
Callback is called when the RTP observer is paused.
fn on_resume(
&self,
callback: Box<dyn Fn() + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn() + Send + Sync + 'static>
) -> HandlerId
Callback is called when the RTP observer is resumed.
fn on_add_producer(
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
Callback is called when a new producer is added into the RTP observer.
fn on_remove_producer(
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
Callback is called when a producer is removed from the RTP observer.
fn on_router_close(
&self,
callback: Box<dyn FnOnce() + Send + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn FnOnce() + Send + 'static>
) -> HandlerId
Callback is called when the router this RTP observer belongs to is closed for whatever reason. The RTP observer itself is also closed.
fn on_close(&self, callback: Box<dyn FnOnce() + Send + 'static>) -> HandlerId
[src]
Callback is called when the RTP observer is closed for whatever reason.
NOTE: Callback will be called in place if observer is already closed.
Implementors
impl RtpObserver for AudioLevelObserver
[src]
fn id(&self) -> RtpObserverId
[src]
fn paused(&self) -> bool
[src]
fn app_data(&self) -> &AppData
[src]
fn closed(&self) -> bool
[src]
fn pause<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn resume<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn add_producer<'life0, 'async_trait>(
&'life0 self,
__arg1: RtpObserverAddProducerOptions
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
__arg1: RtpObserverAddProducerOptions
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn remove_producer<'life0, 'async_trait>(
&'life0 self,
producer_id: ProducerId
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
producer_id: ProducerId
) -> Pin<Box<dyn Future<Output = Result<(), RequestError>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn on_pause(&self, callback: Box<dyn Fn() + Send + Sync + 'static>) -> HandlerId
[src]
fn on_resume(
&self,
callback: Box<dyn Fn() + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn() + Send + Sync + 'static>
) -> HandlerId
fn on_add_producer(
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
fn on_remove_producer(
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn Fn(&Producer) + Send + Sync + 'static>
) -> HandlerId
fn on_router_close(
&self,
callback: Box<dyn FnOnce() + Send + 'static>
) -> HandlerId
[src]
&self,
callback: Box<dyn FnOnce() + Send + 'static>
) -> HandlerId