pub trait RTPHeaderExtensionExt: IsA<RTPHeaderExtension> + Sealed + 'static {
    // Provided methods
    fn direction(&self) -> RTPHeaderExtensionDirection { ... }
    fn id(&self) -> u32 { ... }
    fn max_size(&self, input_meta: &Buffer) -> usize { ... }
    fn sdp_caps_field_name(&self) -> GString { ... }
    fn supported_flags(&self) -> RTPHeaderExtensionFlags { ... }
    fn uri(&self) -> Option<GString> { ... }
    fn set_attributes_from_caps(&self, caps: &Caps) -> bool { ... }
    fn set_direction(&self, direction: RTPHeaderExtensionDirection) { ... }
    fn set_id(&self, ext_id: u32) { ... }
    fn set_non_rtp_sink_caps(&self, caps: &Caps) -> bool { ... }
    fn set_wants_update_non_rtp_src_caps(&self, state: bool) { ... }
    fn wants_update_non_rtp_src_caps(&self) -> bool { ... }
}
Expand description

Trait containing all RTPHeaderExtension methods.

§Implementors

RTPHeaderExtension

Provided Methods§

source

fn direction(&self) -> RTPHeaderExtensionDirection

Retrieve the direction

§Returns

The direction

source

fn id(&self) -> u32

§Returns

the RTP extension id configured on self

source

fn max_size(&self, input_meta: &Buffer) -> usize

This is used to know how much data a certain header extension will need for both allocating the resulting data, and deciding how much payload data can be generated.

Implementations should return as accurate a value as is possible using the information given in the input buffer.

§input_meta

a gst::Buffer

§Returns

the maximum size of the data written by this extension

source

fn sdp_caps_field_name(&self) -> GString

§Returns

the gst::Structure field name used in SDP-like gst::Caps for this self configuration

source

fn supported_flags(&self) -> RTPHeaderExtensionFlags

§Returns

the flags supported by this instance of self

source

fn uri(&self) -> Option<GString>

§Returns

the RTP extension URI for this object

source

fn set_attributes_from_caps(&self, caps: &Caps) -> bool

set_id() must have been called with a valid extension id that is contained in these caps.

The only current known caps format is based on the SDP standard as produced by gst_sdp_media_attributes_to_caps().

§caps

the gst::Caps to configure this extension with

§Returns

whether the caps could be successfully set on self.

source

fn set_direction(&self, direction: RTPHeaderExtensionDirection)

Set the direction that this header extension should be used in. If RTPHeaderExtensionDirection::INHERITED is included, the direction will not be included in the caps (as it shouldn’t be in the extmap line in the SDP).

§direction

The direction

source

fn set_id(&self, ext_id: u32)

sets the RTP extension id on self

§ext_id

The id of this extension

source

fn set_non_rtp_sink_caps(&self, caps: &Caps) -> bool

Passes RTP payloader’s sink (i.e. not payloaded) caps to the header extension.

§caps

sink gst::Caps

§Returns

Whether caps could be read successfully

source

fn set_wants_update_non_rtp_src_caps(&self, state: bool)

Call this function in a subclass from GstRTPHeaderExtensionClass::read to tell the depayloader whether the data just parsed from RTP packet require updating its src (non-RTP) caps. If state is TRUE, RTPBaseDepayload will eventually invoke RTPHeaderExtensionExtManual::update_non_rtp_src_caps() to have the caps update applied. Applying the update also flips the internal “wants update” flag back to FALSE.

§state

TRUE if caps update is needed

source

fn wants_update_non_rtp_src_caps(&self) -> bool

Call this function after RTPHeaderExtensionExtManual::read() to check if the depayloader’s src caps need updating with data received in the last RTP packet.

§Returns

Whether self wants to update depayloader’s src caps.

Object Safety§

This trait is not object safe.

Implementors§