[−][src]Trait gstreamer_video::prelude::VideoDecoderExt
Required methods
fn add_to_frame(&self, n_bytes: i32)
Removes next n_bytes
of input data and adds it to currently parsed frame.
n_bytes
the number of bytes to add
fn allocate_output_buffer(&self) -> Result<Buffer, BoolError>
Helper function that allocates a buffer to hold a video frame for self
's
current VideoCodecState
.
You should use VideoDecoder::allocate_output_frame
instead of this
function, if possible at all.
Returns
allocated buffer, or NULL if no buffer could be allocated (e.g. when downstream is flushing or shutting down)
fn get_buffer_pool(&self) -> Option<BufferPool>
Returns
the instance of the gst::BufferPool
used
by the decoder; free it after use it
fn get_estimate_rate(&self) -> i32
Returns
currently configured byte to time conversion setting
fn get_max_decode_time(&self, frame: &VideoCodecFrame) -> ClockTimeDiff
Determines maximum possible decoding time for frame
that will
allow it to decode and arrive in time (as determined by QoS events).
In particular, a negative result means decoding in time is no longer possible
and should therefore occur as soon/skippy as possible.
frame
a VideoCodecFrame
Returns
max decoding time.
fn get_max_errors(&self) -> i32
Returns
currently configured decoder tolerated error count.
fn get_needs_format(&self) -> bool
fn get_packetized(&self) -> bool
Queries whether input data is considered packetized or not by the base class.
Returns
TRUE if input data is considered packetized.
fn get_pending_frame_size(&self) -> usize
Returns the number of bytes previously added to the current frame
by calling VideoDecoderExt::add_to_frame
.
Returns
The number of bytes pending for the current frame
fn get_qos_proportion(&self) -> f64
Returns
The current QoS proportion.
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
Sets the audio decoder tags and how they should be merged with any
upstream stream tags. This will override any tags previously-set
with gst_audio_decoder_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.
caps
initial caps
filter
filter caps
Returns
a gst::Caps
owned by caller
fn set_estimate_rate(&self, enabled: bool)
Allows baseclass to perform byte to time estimated conversion.
enabled
whether to enable byte to time conversion
fn set_max_errors(&self, num: i32)
Sets numbers of tolerated decoder errors, where a tolerated one is then only warned about, but more than tolerated will lead to fatal error. You can set -1 for never returning fatal errors. Default is set to GST_VIDEO_DECODER_MAX_ERRORS.
The '-1' option was added in 1.4
num
max tolerated errors
fn set_needs_format(&self, enabled: bool)
Configures decoder format needs. If enabled, subclass needs to be negotiated with format caps before it can process any data. It will then never be handed any data before it has been configured. Otherwise, it might be handed data without having been configured and is then expected being able to do so either by default or based on the input data.
enabled
new state
fn set_packetized(&self, packetized: bool)
Allows baseclass to consider input data as packetized or not. If the
input is packetized, then the parse
method will not be called.
packetized
whether the input data should be considered as packetized.
fn set_use_default_pad_acceptcaps(&self, use_: bool)
Lets VideoDecoder
sub-classes decide if they want the sink pad
to use the default pad query handler to reply to accept-caps queries.
By setting this to true it is possible to further customize the default
handler with GST_PAD_SET_ACCEPT_INTERSECT
and
GST_PAD_SET_ACCEPT_TEMPLATE
use_
if the default pad accept-caps query handling should be used