Trait gstreamer_rtp::prelude::RTPHeaderExtensionExt[][src]

pub trait RTPHeaderExtensionExt: 'static {
Show methods 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_attributes_from_caps_simple_sdp(&self, caps: &Caps) -> bool;
fn set_caps_from_attributes(&self, caps: &mut Caps) -> bool;
fn set_caps_from_attributes_simple_sdp(&self, caps: &mut Caps) -> bool;
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 update_non_rtp_src_caps(&self, caps: &mut Caps) -> bool;
fn wants_update_non_rtp_src_caps(&self) -> bool;
}
Expand description

Trait containing all RTPHeaderExtension methods.

Implementors

RTPHeaderExtension

Required methods

Returns

the RTP extension id configured on self

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

Returns

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

Returns

the flags supported by this instance of self

Returns

the RTP extension URI for this object

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.

Helper implementation for GstRTPExtensionClass::set_attributes_from_caps that retrieves the configured extension id and checks that the corresponding field in the sdp caps is configured for this extension uri. Requires that the extension does not have any attributes or direction advertised in the caps.

caps

gst::Caps to read attributes from

Returns

whether the attributes in the caps could be set on self successfully

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

writable gst::Caps to modify

Returns

whether the configured attributes on self can successfully be set on caps

Helper implementation for GstRTPExtensionClass::set_caps_from_attributes that sets the self uri on caps with the specified extension id as required for sdp gst::Caps.

Requires that the extension does not have any attributes or direction advertised in caps.

caps

gst::Caps to write fields into

Returns

whether the self attributes could be set on caps.

sets the RTP extension id on self

ext_id

The id of this extension

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

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, GstRTPBaseDepayload will eventually invoke 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

Updates depayloader src caps based on the information received in RTP header. caps must be writable as this function may modify them.

caps

src gst::Caps to modify

Returns

whether caps were modified successfully

Call this function after gst_rtp_header_extension_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.

Implementors

This is supported on crate feature v1_20 only.