Struct webrtc::rtp_transceiver::rtp_sender::RTCRtpSender

source ·
pub struct RTCRtpSender { /* private fields */ }
Expand description

RTPSender allows an application to control how a given Track is encoded and transmitted to a remote peer

Implementations§

source§

impl RTCRtpSender

source

pub async fn new( receive_mtu: usize, track: Option<Arc<dyn TrackLocal + Send + Sync>>, transport: Arc<RTCDtlsTransport>, media_engine: Arc<MediaEngine>, interceptor: Arc<dyn Interceptor + Send + Sync>, start_paused: bool ) -> Self

source

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

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

source

pub async fn get_parameters(&self) -> RTCRtpSendParameters

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

source

pub async fn track(&self) -> Option<Arc<dyn TrackLocal + Send + Sync>>

track returns the RTCRtpTransceiver track, or nil

source

pub async fn replace_track( &self, track: Option<Arc<dyn TrackLocal + Send + Sync>> ) -> Result<()>

replace_track replaces the track currently being used as the sender’s source with a new TrackLocal. The new track must be of the same media kind (audio, video, etc) and switching the track should not require negotiation.

source

pub async fn send(&self, parameters: &RTCRtpSendParameters) -> Result<()>

send Attempts to set the parameters controlling the sending of media.

source

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

stop irreversibly stops the RTPSender

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_rtcp( &self ) -> Result<(Vec<Box<dyn Packet + Send + Sync>>, Attributes)>

read_rtcp is a convenience method that wraps Read and unmarshals for you.

source

pub fn enable_seq_transformer(&self) -> Result<()>

Enables overriding outgoing RTP packets’ sequence numbers.

Must be called once before any data sent or never called at all.

§Errors

Errors if this RTCRtpSender has started to send data or sequence transforming has been already enabled.

Trait Implementations§

source§

impl Debug for RTCRtpSender

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