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
impl RTCRtpReceiver
pub fn new( receive_mtu: usize, kind: RTPCodecType, transport: Arc<RTCDtlsTransport>, media_engine: Arc<MediaEngine>, interceptor: Arc<dyn Interceptor + Send + Sync> ) -> Self
pub fn kind(&self) -> RTPCodecType
sourcepub fn transport(&self) -> Arc<RTCDtlsTransport>
pub fn transport(&self) -> Arc<RTCDtlsTransport>
transport returns the currently-configured *DTLSTransport or nil if one has not yet been configured
sourcepub async fn get_parameters(&self) -> RTCRtpParameters
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.
sourcepub async fn set_rtp_parameters(&self, params: RTCRtpParameters)
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.
sourcepub async fn tracks(&self) -> Vec<Arc<TrackRemote>>
pub async fn tracks(&self) -> Vec<Arc<TrackRemote>>
tracks returns the RtpTransceiver traclockks A RTPReceiver to support Simulcast may now have multiple tracks
sourcepub async fn receive(&self, parameters: &RTCRtpReceiveParameters) -> Result<()>
pub async fn receive(&self, parameters: &RTCRtpReceiveParameters) -> Result<()>
receive initialize the track and starts all the transports
sourcepub async fn read(
&self,
b: &mut [u8]
) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>
pub async fn read( &self, b: &mut [u8] ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>
read reads incoming RTCP for this RTPReceiver
sourcepub async fn read_simulcast(
&self,
b: &mut [u8],
rid: &str
) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>
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
sourcepub async fn read_rtcp(
&self
) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>
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.
sourcepub async fn read_simulcast_rtcp(
&self,
rid: &str
) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>
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