[−][src]Trait gstreamer_video::prelude::VideoEncoderExt
Required methods
fn allocate_output_buffer(&self, size: usize) -> Result<Buffer, BoolError>
Helper function that allocates a buffer to hold an encoded video frame
for self
's current VideoCodecState
.
size
size of the buffer
Returns
allocated buffer
fn get_max_encode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff
Determines maximum possible encoding time for frame
that will
allow it to encode and arrive in time (as determined by QoS events).
In particular, a negative result means encoding in time is no longer possible
and should therefore occur as soon/skippy as possible.
If no QoS events have been received from downstream, or if
VideoEncoder:qos
is disabled this function returns G_MAXINT64
.
Feature: v1_14
frame
a VideoCodecFrame
Returns
max decoding time.
fn get_min_force_key_unit_interval(&self) -> ClockTime
Returns the minimum force-keyunit interval, see VideoEncoderExt::set_min_force_key_unit_interval
for more details.
Feature: v1_18
Returns
the minimum force-keyunit interval
fn is_qos_enabled(&self) -> bool
Checks if self
is currently configured to handle Quality-of-Service
events from downstream.
Feature: v1_14
Returns
true
if the encoder is configured to perform Quality-of-Service.
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
Sets the video encoder tags and how they should be merged with any
upstream stream tags. This will override any tags previously-set
with VideoEncoderExt::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.
MT safe.
tags
a gst::TagList
to merge, or NULL to unset
previously-set tags
mode
the gst::TagMergeMode
to use, usually gst::TagMergeMode::Replace
fn proxy_getcaps(&self, caps: Option<&Caps>, filter: Option<&Caps>) -> Caps
Returns caps that express caps
(or sink template caps if caps
== NULL)
restricted to resolution/format/... combinations supported by downstream
elements (e.g. muxers).
caps
initial caps
filter
filter caps
Returns
a gst::Caps
owned by caller
fn set_headers(&self, headers: &[&Buffer])
Set the codec headers to be sent downstream whenever requested.
headers
a list of gst::Buffer
containing the codec header
fn set_min_force_key_unit_interval(&self, interval: ClockTime)
Sets the minimum interval for requesting keyframes based on force-keyunit
events. Setting this to 0 will allow to handle every event, setting this to
GST_CLOCK_TIME_NONE
causes force-keyunit events to be ignored.
Feature: v1_18
interval
minimum interval
fn set_min_pts(&self, min_pts: ClockTime)
Request minimal value for PTS passed to handle_frame.
For streams with reordered frames this can be used to ensure that there is enough time to accommodate first DTS, which may be less than first PTS
min_pts
minimal PTS that will be passed to handle_frame
fn set_qos_enabled(&self, enabled: bool)
Configures self
to handle Quality-of-Service events from downstream.
Feature: v1_14
enabled
the new qos value.
fn get_property_qos(&self) -> bool
fn set_property_qos(&self, qos: bool)
fn connect_property_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<VideoEncoder>> VideoEncoderExt for O
[src]
fn allocate_output_buffer(&self, size: usize) -> Result<Buffer, BoolError>
[src]
fn get_max_encode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff
[src]
fn get_min_force_key_unit_interval(&self) -> ClockTime
[src]
fn is_qos_enabled(&self) -> bool
[src]
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
[src]
fn proxy_getcaps(&self, caps: Option<&Caps>, filter: Option<&Caps>) -> Caps
[src]
fn set_headers(&self, headers: &[&Buffer])
[src]
fn set_min_force_key_unit_interval(&self, interval: ClockTime)
[src]
fn set_min_pts(&self, min_pts: ClockTime)
[src]
fn set_qos_enabled(&self, enabled: bool)
[src]
fn get_property_qos(&self) -> bool
[src]
fn set_property_qos(&self, qos: bool)
[src]
fn connect_property_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId