Trait gstreamer_video::prelude::VideoEncoderExt [−][src]
pub trait VideoEncoderExt: 'static {
Show methods
fn allocate_output_buffer(&self, size: usize) -> Result<Buffer, BoolError>;
fn max_encode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff;
fn min_force_key_unit_interval(&self) -> Option<ClockTime>;
fn is_qos_enabled(&self) -> bool;
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode);
fn proxy_getcaps(&self, caps: Option<&Caps>, filter: Option<&Caps>) -> Caps;
fn set_headers(&self, headers: &[&Buffer]);
fn set_min_force_key_unit_interval(
&self,
interval: impl Into<Option<ClockTime>>
);
fn set_min_pts(&self, min_pts: impl Into<Option<ClockTime>>);
fn set_qos_enabled(&self, enabled: bool);
fn is_qos(&self) -> bool;
fn set_qos(&self, qos: bool);
fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Expand description
Required methods
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 max_encode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff[src]
fn max_encode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff[src]v1_14 only.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
property::VideoEncoder::qos is disabled this function returns G_MAXINT64.
frame
Returns
max decoding time.
fn min_force_key_unit_interval(&self) -> Option<ClockTime>[src]
fn min_force_key_unit_interval(&self) -> Option<ClockTime>[src]v1_18 only.Returns the minimum force-keyunit interval, see set_min_force_key_unit_interval()
for more details.
Returns
the minimum force-keyunit interval
fn is_qos_enabled(&self) -> bool[src]
fn is_qos_enabled(&self) -> bool[src]v1_14 only.Sets the video encoder 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.
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 set_headers(&self, headers: &[&Buffer])[src]
fn set_headers(&self, headers: &[&Buffer])[src]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: impl Into<Option<ClockTime>>
)[src]
fn set_min_force_key_unit_interval(
&self,
interval: impl Into<Option<ClockTime>>
)[src]v1_18 only.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.
interval
minimum interval
fn set_min_pts(&self, min_pts: impl Into<Option<ClockTime>>)[src]fn set_qos_enabled(&self, enabled: bool)[src]
fn set_qos_enabled(&self, enabled: bool)[src]v1_14 only.fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]v1_18 only.fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]Implementors
v1_14 only.v1_18 only.v1_14 only.v1_18 only.v1_14 only.fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]v1_18 only.