Trait gstreamer_rtp::prelude::RTPBaseDepayloadExt
source · pub trait RTPBaseDepayloadExt:
IsA<RTPBaseDepayload>
+ Sealed
+ 'static {
Show 25 methods
// Provided methods
fn delayed(&self) { ... }
fn dropped(&self) { ... }
fn flush(&self, keep_current: bool) { ... }
fn is_aggregate_hdrext_enabled(&self) -> bool { ... }
fn is_source_info_enabled(&self) -> bool { ... }
fn push(&self, out_buf: Buffer) -> Result<FlowSuccess, FlowError> { ... }
fn push_list(&self, out_list: BufferList) -> Result<FlowSuccess, FlowError> { ... }
fn set_aggregate_hdrext_enabled(&self, enable: bool) { ... }
fn set_source_info_enabled(&self, enable: bool) { ... }
fn is_auto_header_extension(&self) -> bool { ... }
fn set_auto_header_extension(&self, auto_header_extension: bool) { ... }
fn max_reorder(&self) -> i32 { ... }
fn set_max_reorder(&self, max_reorder: i32) { ... }
fn is_source_info(&self) -> bool { ... }
fn set_source_info(&self, source_info: bool) { ... }
fn stats(&self) -> Option<Structure> { ... }
fn connect_add_extension<F: Fn(&Self, &RTPHeaderExtension) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn emit_add_extension(&self, ext: &RTPHeaderExtension) { ... }
fn connect_clear_extensions<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn emit_clear_extensions(&self) { ... }
fn connect_request_extension<F: Fn(&Self, u32, Option<&str>) -> Option<RTPHeaderExtension> + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_auto_header_extension_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_max_reorder_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_source_info_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_stats_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn delayed(&self)
fn delayed(&self)
Called from RTPBaseDepayload
or
RTPBaseDepayload
when the depayloader needs
to keep the current input RTP header for use with the next output
buffer.
The delayed buffer will remain until the end of processing the current output buffer and then enqueued for processing with the next output buffer.
A typical use-case is when the depayloader implementation will start a new output buffer for the current input RTP buffer but push the current output buffer first.
Must be called with the stream lock held.
sourcefn dropped(&self)
fn dropped(&self)
Called from RTPBaseDepayload
or
RTPBaseDepayload
if the depayloader does not
use the current buffer for the output buffer. This will either drop
the delayed buffer or the last buffer from the header extension
cache.
A typical use-case is when the depayloader implementation is dropping an input RTP buffer while waiting for the first keyframe.
Must be called with the stream lock held.
sourcefn flush(&self, keep_current: bool)
fn flush(&self, keep_current: bool)
If RTPBaseDepayload
or
RTPBaseDepayload
drop an output buffer this
function tells the base class to flush header extension cache as
well.
This will not drop an input RTP header marked as delayed from
delayed()
.
If keep_current
is true
the current input RTP header will be kept
and enqueued after flushing the previous input RTP headers.
A typical use-case for keep_current
is when the depayloader
implementation invalidates the current output buffer and starts a
new one with the current RTP input buffer.
Must be called with the stream lock held.
§keep_current
if the current RTP buffer shall be kept
sourcefn is_aggregate_hdrext_enabled(&self) -> bool
fn is_aggregate_hdrext_enabled(&self) -> bool
sourcefn is_source_info_enabled(&self) -> bool
fn is_source_info_enabled(&self) -> bool
sourcefn push(&self, out_buf: Buffer) -> Result<FlowSuccess, FlowError>
fn push(&self, out_buf: Buffer) -> Result<FlowSuccess, FlowError>
sourcefn push_list(&self, out_list: BufferList) -> Result<FlowSuccess, FlowError>
fn push_list(&self, out_list: BufferList) -> Result<FlowSuccess, FlowError>
sourcefn set_aggregate_hdrext_enabled(&self, enable: bool)
fn set_aggregate_hdrext_enabled(&self, enable: bool)
Enable or disable aggregating header extensions.
§enable
whether to aggregate header extensions per output buffer
sourcefn set_source_info_enabled(&self, enable: bool)
fn set_source_info_enabled(&self, enable: bool)
Enable or disable adding GstRTPSourceMeta
to depayloaded buffers.
§enable
whether to add meta about RTP sources to buffer
sourcefn is_auto_header_extension(&self) -> bool
fn is_auto_header_extension(&self) -> bool
If enabled, the depayloader will automatically try to enable all the RTP header extensions provided in the sink caps, saving the application the need to handle these extensions manually using the GstRTPBaseDepayload::request-extension: signal.
sourcefn set_auto_header_extension(&self, auto_header_extension: bool)
fn set_auto_header_extension(&self, auto_header_extension: bool)
If enabled, the depayloader will automatically try to enable all the RTP header extensions provided in the sink caps, saving the application the need to handle these extensions manually using the GstRTPBaseDepayload::request-extension: signal.
sourcefn max_reorder(&self) -> i32
fn max_reorder(&self) -> i32
Max seqnum reorder before the sender is assumed to have restarted.
When max-reorder is set to 0 all reordered/duplicate packets are considered coming from a restarted sender.
sourcefn set_max_reorder(&self, max_reorder: i32)
fn set_max_reorder(&self, max_reorder: i32)
Max seqnum reorder before the sender is assumed to have restarted.
When max-reorder is set to 0 all reordered/duplicate packets are considered coming from a restarted sender.
sourcefn is_source_info(&self) -> bool
fn is_source_info(&self) -> bool
Add RTP source information found in RTP header as meta to output buffer.
sourcefn set_source_info(&self, source_info: bool)
fn set_source_info(&self, source_info: bool)
Add RTP source information found in RTP header as meta to output buffer.
sourcefn stats(&self) -> Option<Structure>
fn stats(&self) -> Option<Structure>
Various depayloader statistics retrieved atomically (and are therefore synchroized with each other). This property return a GstStructure named application/x-rtp-depayload-stats containing the following fields relating to the last processed buffer and current state of the stream being depayloaded:
clock-rate
:G_TYPE_UINT
, clock-rate of the streamnpt-start
:G_TYPE_UINT64
, time of playback startnpt-stop
:G_TYPE_UINT64
, time of playback stopplay-speed
:G_TYPE_DOUBLE
, the playback speedplay-scale
:G_TYPE_DOUBLE
, the playback scalerunning-time-dts
:G_TYPE_UINT64
, the last running-time of the last DTSrunning-time-pts
:G_TYPE_UINT64
, the last running-time of the last PTSseqnum
:G_TYPE_UINT
, the last seen seqnumtimestamp
:G_TYPE_UINT
, the last seen RTP timestamp
sourcefn connect_add_extension<F: Fn(&Self, &RTPHeaderExtension) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_add_extension<F: Fn(&Self, &RTPHeaderExtension) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Add ext
as an extension for reading part of an RTP header extension from
incoming RTP packets.
§ext
fn emit_add_extension(&self, ext: &RTPHeaderExtension)
sourcefn connect_clear_extensions<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_clear_extensions<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Clear all RTP header extensions used by this depayloader.
fn emit_clear_extensions(&self)
sourcefn connect_request_extension<F: Fn(&Self, u32, Option<&str>) -> Option<RTPHeaderExtension> + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_request_extension<F: Fn(&Self, u32, Option<&str>) -> Option<RTPHeaderExtension> + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
The returned ext
must be configured with the correct ext_id
and with the
necessary attributes as required by the extension implementation.
§ext_id
the extension id being requested
§ext_uri
the extension URI being requested
§Returns
the RTPHeaderExtension
for ext_id
, or None