Trait gstreamer_rtp::prelude::RTPHeaderExtensionExt
source · 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
Provided Methods§
sourcefn direction(&self) -> RTPHeaderExtensionDirection
fn direction(&self) -> RTPHeaderExtensionDirection
sourcefn max_size(&self, input_meta: &Buffer) -> usize
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
§Returns
the maximum size of the data written by this extension
sourcefn sdp_caps_field_name(&self) -> GString
fn sdp_caps_field_name(&self) -> GString
§Returns
the gst::Structure
field name used in SDP-like gst::Caps
for this self
configuration
sourcefn supported_flags(&self) -> RTPHeaderExtensionFlags
fn supported_flags(&self) -> RTPHeaderExtensionFlags
§Returns
the flags supported by this instance of self
sourcefn set_attributes_from_caps(&self, caps: &Caps) -> bool
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
.
sourcefn set_direction(&self, direction: RTPHeaderExtensionDirection)
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
sourcefn set_non_rtp_sink_caps(&self, caps: &Caps) -> bool
fn set_non_rtp_sink_caps(&self, caps: &Caps) -> bool
sourcefn set_wants_update_non_rtp_src_caps(&self, state: bool)
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
sourcefn wants_update_non_rtp_src_caps(&self) -> bool
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.