pub trait RTPHeaderExtensionExt: IsA<RTPHeaderExtension> + '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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.