Trait gstreamer_video::prelude::VideoDecoderExt [−][src]
pub trait VideoDecoderExt: 'static {}Show methods
fn add_to_frame(&self, n_bytes: i32); fn allocate_output_buffer(&self) -> Result<Buffer, BoolError>; fn buffer_pool(&self) -> Option<BufferPool>; fn estimate_rate(&self) -> i32; fn max_decode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff; fn max_errors(&self) -> i32; fn needs_format(&self) -> bool; fn is_packetized(&self) -> bool; fn pending_frame_size(&self) -> usize; fn qos_proportion(&self) -> f64; fn have_frame(&self) -> FlowReturn; fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode); fn proxy_getcaps(&self, caps: Option<&Caps>, filter: Option<&Caps>) -> Caps; fn set_estimate_rate(&self, enabled: bool); fn set_max_errors(&self, num: i32); fn set_needs_format(&self, enabled: bool); fn set_packetized(&self, packetized: bool); fn set_use_default_pad_acceptcaps(&self, use_: bool); fn is_qos(&self) -> bool; fn set_qos(&self, qos: bool); fn connect_max_errors_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;
Required methods
fn add_to_frame(&self, n_bytes: i32)
[src]
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>
[src]
Helper function that allocates a buffer to hold a video frame for self
’s
current crate::VideoCodecState
.
You should use [crate::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 buffer_pool(&self) -> Option<BufferPool>
[src]
Returns
the instance of the crate::gst::BufferPool
used
by the decoder; free it after use it
fn estimate_rate(&self) -> i32
[src]
Returns
currently configured byte to time conversion setting
fn max_decode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff
[src]
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
Returns
max decoding time.
fn max_errors(&self) -> i32
[src]
Returns
currently configured decoder tolerated error count.
fn needs_format(&self) -> bool
[src]
fn is_packetized(&self) -> bool
[src]
Queries whether input data is considered packetized or not by the base class.
Returns
TRUE if input data is considered packetized.
fn pending_frame_size(&self) -> usize
[src]
Returns the number of bytes previously added to the current frame
by calling Self::add_to_frame()
.
Returns
The number of bytes pending for the current frame
fn qos_proportion(&self) -> f64
[src]
Returns
The current QoS proportion.
fn have_frame(&self) -> FlowReturn
[src]
Gathers all data collected for currently parsed frame, gathers corresponding
metadata and passes it along for further processing, i.e. handle_frame
.
Returns
fn merge_tags(&self, tags: Option<&TagList>, mode: TagMergeMode)
[src]
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 crate::gst::TagList
to merge, or NULL to unset
previously-set tags
mode
the crate::gst::TagMergeMode
to use, usually crate::gst::TagMergeMode::Replace
fn proxy_getcaps(&self, caps: Option<&Caps>, filter: Option<&Caps>) -> Caps
[src]
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 crate::gst::Caps
owned by caller
fn set_estimate_rate(&self, enabled: bool)
[src]
Allows baseclass to perform byte to time estimated conversion.
enabled
whether to enable byte to time conversion
fn set_max_errors(&self, num: i32)
[src]
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)
[src]
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)
[src]
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)
[src]
Lets crate::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
fn is_qos(&self) -> bool
[src]
v1_18
only.fn set_qos(&self, qos: bool)
[src]
v1_18
only.fn connect_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
v1_18
only.fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
v1_18
only.Implementors
impl<O: IsA<VideoDecoder>> VideoDecoderExt for O
[src]
impl<O: IsA<VideoDecoder>> VideoDecoderExt for O
[src]fn add_to_frame(&self, n_bytes: i32)
[src]
fn allocate_output_buffer(&self) -> Result<Buffer, BoolError>
[src]
fn buffer_pool(&self) -> Option<BufferPool>
[src]
fn estimate_rate(&self) -> i32
[src]
fn max_decode_time(&self, frame: &VideoCodecFrame<'_>) -> ClockTimeDiff
[src]
fn max_errors(&self) -> i32
[src]
fn needs_format(&self) -> bool
[src]
fn is_packetized(&self) -> bool
[src]
fn pending_frame_size(&self) -> usize
[src]
fn qos_proportion(&self) -> f64
[src]
fn have_frame(&self) -> FlowReturn
[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_estimate_rate(&self, enabled: bool)
[src]
fn set_max_errors(&self, num: i32)
[src]
fn set_needs_format(&self, enabled: bool)
[src]
fn set_packetized(&self, packetized: bool)
[src]
fn set_use_default_pad_acceptcaps(&self, use_: bool)
[src]
fn connect_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
fn connect_max_errors_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]
fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]v1_18
only.