Struct webrtc::rtp_transceiver::rtp_receiver::RTCRtpReceiver

source ·
pub struct RTCRtpReceiver {
    pub internal: Arc<RTPReceiverInternal>,
    /* private fields */
}
Expand description

RTPReceiver allows an application to inspect the receipt of a TrackRemote

Fields§

§internal: Arc<RTPReceiverInternal>

Implementations§

source§

impl RTCRtpReceiver

source

pub fn new( receive_mtu: usize, kind: RTPCodecType, transport: Arc<RTCDtlsTransport>, media_engine: Arc<MediaEngine>, interceptor: Arc<dyn Interceptor + Send + Sync> ) -> Self

source

pub fn kind(&self) -> RTPCodecType

source

pub fn transport(&self) -> Arc<RTCDtlsTransport>

transport returns the currently-configured *DTLSTransport or nil if one has not yet been configured

source

pub async fn get_parameters(&self) -> RTCRtpParameters

get_parameters describes the current configuration for the encoding and transmission of media on the receiver’s track.

source

pub async fn set_rtp_parameters(&self, params: RTCRtpParameters)

SetRTPParameters applies provided RTPParameters the RTPReceiver’s tracks. This method is part of the ORTC API. It is not meant to be used together with the basic WebRTC API. The amount of provided codecs must match the number of tracks on the receiver.

source

pub async fn tracks(&self) -> Vec<Arc<TrackRemote>>

tracks returns the RtpTransceiver traclockks A RTPReceiver to support Simulcast may now have multiple tracks

source

pub async fn receive(&self, parameters: &RTCRtpReceiveParameters) -> Result<()>

receive initialize the track and starts all the transports

source

pub async fn read( &self, b: &mut [u8] ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>

read reads incoming RTCP for this RTPReceiver

source

pub async fn read_simulcast( &self, b: &mut [u8], rid: &str ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>

read_simulcast reads incoming RTCP for this RTPReceiver for given rid

source

pub async fn read_rtcp( &self ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>

read_rtcp is a convenience method that wraps Read and unmarshal for you. It also runs any configured interceptors.

source

pub async fn read_simulcast_rtcp( &self, rid: &str ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>

read_simulcast_rtcp is a convenience method that wraps ReadSimulcast and unmarshal for you

source

pub async fn stop(&self) -> Result<()>

Stop irreversibly stops the RTPReceiver

Trait Implementations§

source§

impl Debug for RTCRtpReceiver

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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, 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> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V