pub struct WhepEndpoint { /* private fields */ }Available on crate features
ingest and webrtc only.Expand description
A WHEP (egress) signaling endpoint — the playback counterpart to
WhipEndpoint.
A viewer POSTs an SDP offer; accept_offer returns a
sendonly answer and a WhepResource. The host then runs
WhepResource::pump, which subscribes to the requested live stream,
packetizes each H.264 access unit into RTP, and sends it over the peer’s
DtlsSrtpTransport — sub-second WebRTC playback.
Implementations§
Source§impl WhepEndpoint
impl WhepEndpoint
Sourcepub fn new(playback: Arc<dyn PlaybackRegistry>) -> Self
pub fn new(playback: Arc<dyn PlaybackRegistry>) -> Self
Build an endpoint that serves media from playback (e.g. an Arc<Engine>).
Sourcepub fn accept_offer(
&self,
offer_sdp: &str,
key: StreamKey,
transport: Arc<dyn DtlsSrtpTransport>,
) -> Result<(WhepResource, String)>
pub fn accept_offer( &self, offer_sdp: &str, key: StreamKey, transport: Arc<dyn DtlsSrtpTransport>, ) -> Result<(WhepResource, String)>
Handle a WHEP POST: validate the offer and mint a sendonly answer.
Returns the resource handle (to pump) and the answer SDP.
Trait Implementations§
Source§impl Clone for WhepEndpoint
impl Clone for WhepEndpoint
Source§fn clone(&self) -> WhepEndpoint
fn clone(&self) -> WhepEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WhepEndpoint
impl !UnwindSafe for WhepEndpoint
impl Freeze for WhepEndpoint
impl Send for WhepEndpoint
impl Sync for WhepEndpoint
impl Unpin for WhepEndpoint
impl UnsafeUnpin for WhepEndpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more