Trait Base Parse Ext
Source pub trait BaseParseExt: IsA<BaseParse> + 'static {
Show 19 methods
// Provided methods
fn add_index_entry(
&self,
offset: u64,
ts: ClockTime,
key: bool,
force: bool,
) -> bool { ... }
fn drain(&self) { ... }
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode) { ... }
fn set_allow_duplicated_pts(&self, allow_duplicated_pts: bool) { ... }
fn set_average_bitrate(&self, bitrate: u32) { ... }
fn set_has_timing_info(&self, has_timing: bool) { ... }
fn set_infer_ts(&self, infer_ts: bool) { ... }
fn set_latency(
&self,
min_latency: ClockTime,
max_latency: impl Into<Option<ClockTime>>,
) { ... }
fn set_min_frame_size(&self, min_size: u32) { ... }
fn set_passthrough(&self, passthrough: bool) { ... }
fn set_pts_interpolation(&self, pts_interpolate: bool) { ... }
fn set_syncable(&self, syncable: bool) { ... }
fn set_ts_at_offset(&self, offset: usize) { ... }
fn is_disable_clip(&self) -> bool { ... }
fn set_disable_clip(&self, disable_clip: bool) { ... }
fn is_disable_passthrough(&self) -> bool { ... }
fn set_disable_passthrough(&self, disable_passthrough: bool) { ... }
fn connect_disable_clip_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_disable_passthrough_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Provided Methods§
Sourcefn add_index_entry(
&self,
offset: u64,
ts: ClockTime,
key: bool,
force: bool,
) -> bool
fn add_index_entry( &self, offset: u64, ts: ClockTime, key: bool, force: bool, ) -> bool
Adds an entry to the index associating offset to ts. It is recommended
to only add keyframe entries. force allows to bypass checks, such as
whether the stream is (upstream) seekable, another entry is already “close”
to the new entry, etc.
§offset
offset of entry
§ts
timestamp associated with offset
§key
whether entry refers to keyframe
§force
add entry disregarding sanity checks
§Returns
gboolean indicating whether entry was added
Sourcefn drain(&self)
fn drain(&self)
Drains the adapter until it is empty. It decreases the min_frame_size to match the current adapter size and calls chain method until the adapter is emptied or chain returns with error.
Sourcefn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
Sets the parser subclass’s tags and how they should be merged with any
upstream stream tags. This will override any tags previously-set
with merge_tags().
Note that this is provided for convenience, and the subclass is not required to use this and can still do tag handling on its own.
§tags
a gst::TagList to merge, or NULL to unset
previously-set tags
§mode
the gst::TagMergeMode to use, usually gst::TagMergeMode::Replace
Sourcefn set_allow_duplicated_pts(&self, allow_duplicated_pts: bool)
fn set_allow_duplicated_pts(&self, allow_duplicated_pts: bool)
Sourcefn set_average_bitrate(&self, bitrate: u32)
fn set_average_bitrate(&self, bitrate: u32)
READY state changes. Subclasses must
call this function from GstBaseParseClass::start if they want to set a static value.
§bitrate
average bitrate in bits/second
Sourcefn set_has_timing_info(&self, has_timing: bool)
fn set_has_timing_info(&self, has_timing: bool)
READY state changes. Subclasses must
call this function from GstBaseParseClass::start if they want to set a static value.
§has_timing
whether frames carry timing information
Sourcefn set_infer_ts(&self, infer_ts: bool)
fn set_infer_ts(&self, infer_ts: bool)
Sourcefn set_min_frame_size(&self, min_size: u32)
fn set_min_frame_size(&self, min_size: u32)
READY state changes. Subclasses must
call this function from GstBaseParseClass::start if they want to set a static value.
§min_size
Minimum size in bytes of the data that this base class should give to subclass.
Sourcefn set_passthrough(&self, passthrough: bool)
fn set_passthrough(&self, passthrough: bool)
Sourcefn set_pts_interpolation(&self, pts_interpolate: bool)
fn set_pts_interpolation(&self, pts_interpolate: bool)
Sourcefn set_syncable(&self, syncable: bool)
fn set_syncable(&self, syncable: bool)
READY state changes. Subclasses must
call this function from GstBaseParseClass::start if they want to set a static value.
§syncable
set if frame starts can be identified
Sourcefn set_ts_at_offset(&self, offset: usize)
fn set_ts_at_offset(&self, offset: usize)
This function should only be called from a handle_frame implementation.
BaseParse creates initial timestamps for frames by using the last
timestamp seen in the stream before the frame starts. In certain
cases, the correct timestamps will occur in the stream after the
start of the frame, but before the start of the actual picture data.
This function can be used to set the timestamps based on the offset
into the frame data that the picture starts.
§offset
offset into current buffer
Sourcefn is_disable_clip(&self) -> bool
fn is_disable_clip(&self) -> bool
Disable dropping buffers that are out of segment
Sourcefn set_disable_clip(&self, disable_clip: bool)
fn set_disable_clip(&self, disable_clip: bool)
Disable dropping buffers that are out of segment
Sourcefn is_disable_passthrough(&self) -> bool
fn is_disable_passthrough(&self) -> bool
If set to true, baseparse will unconditionally force parsing of the
incoming data. This can be required in the rare cases where the incoming
side-data (caps, pts, dts, …) is not trusted by the user and wants to
force validation and parsing of the incoming data.
If set to false, decision of whether to parse the data or not is up to
the implementation (standard behaviour).
Sourcefn set_disable_passthrough(&self, disable_passthrough: bool)
fn set_disable_passthrough(&self, disable_passthrough: bool)
If set to true, baseparse will unconditionally force parsing of the
incoming data. This can be required in the rare cases where the incoming
side-data (caps, pts, dts, …) is not trusted by the user and wants to
force validation and parsing of the incoming data.
If set to false, decision of whether to parse the data or not is up to
the implementation (standard behaviour).
fn connect_disable_clip_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_disable_passthrough_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".