Skip to main content

MediaPacketSink

Trait MediaPacketSink 

Source
pub trait MediaPacketSink: Send + Sync {
    // Required method
    fn record_packet(
        &self,
        session_key: &TransportSessionKey,
        transport_media_id: TransportMediaId,
        received_at: Instant,
        payload: &[u8],
    );
}
Expand description

Observes origin-side RTP payloads routed to a room packet sink.

Packet gates do not filter this source-side stream. Relayed packets are not observed again.

Required Methods§

Source

fn record_packet( &self, session_key: &TransportSessionKey, transport_media_id: TransportMediaId, received_at: Instant, payload: &[u8], )

Records one source RTP payload.

session_key and transport_media_id identify the source transport media. The RTC engine invokes this synchronously on a packet worker. Different workers may invoke the same sink concurrently, so implementations must return promptly and must not perform blocking I/O.

Implementors§