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
sourceimpl RTCRtpSender
impl RTCRtpSender
pub async fn new(
receive_mtu: usize,
track: Arc<dyn TrackLocal + Send + Sync>,
transport: Arc<RTCDtlsTransport>,
media_engine: Arc<MediaEngine>,
interceptor: Arc<dyn Interceptor + Send + Sync>,
start_paused: bool
) -> RTCRtpSender
sourcepub fn transport(&self) -> Arc<RTCDtlsTransport>
pub fn transport(&self) -> Arc<RTCDtlsTransport>
transport returns the currently-configured DTLSTransport if one has not yet been configured
sourcepub async fn get_parameters(&self) -> RTCRtpSendParameters
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.
sourcepub async fn track(&self) -> Option<Arc<dyn TrackLocal + Send + Sync>>
pub async fn track(&self) -> Option<Arc<dyn TrackLocal + Send + Sync>>
track returns the RTCRtpTransceiver track, or nil
sourcepub async fn replace_track(
&self,
track: Option<Arc<dyn TrackLocal + Send + Sync>>
) -> Result<()>
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.
sourcepub async fn send(&self, parameters: &RTCRtpSendParameters) -> Result<()>
pub async fn send(&self, parameters: &RTCRtpSendParameters) -> Result<()>
send Attempts to set the parameters controlling the sending of media.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RTCRtpSender
impl Send for RTCRtpSender
impl Sync for RTCRtpSender
impl Unpin for RTCRtpSender
impl !UnwindSafe for RTCRtpSender
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more