Struct gstreamer_video::VideoDecoder

source ·
pub struct VideoDecoder { /* private fields */ }
Expand description

This base class is for video decoders turning encoded data into raw video frames.

The GstVideoDecoder base class and derived subclasses should cooperate as follows:

§Configuration

  • Initially, GstVideoDecoder calls start when the decoder element is activated, which allows the subclass to perform any global setup.

  • GstVideoDecoder calls set_format to inform the subclass of caps describing input video data that it is about to receive, including possibly configuration data. While unlikely, it might be called more than once, if changing input parameters require reconfiguration.

  • Incoming data buffers are processed as needed, described in Data Processing below.

  • GstVideoDecoder calls stop at end of all processing.

§Data processing

  • The base class gathers input data, and optionally allows subclass to parse this into subsequently manageable chunks, typically corresponding to and referred to as ‘frames’.

  • Each input frame is provided in turn to the subclass’ handle_frame callback.

  • When the subclass enables the subframe mode with gst_video_decoder_set_subframe_mode, the base class will provide to the subclass the same input frame with different input buffers to the subclass handle_frame callback. During this call, the subclass needs to take ownership of the input_buffer as VideoCodecFrame will have been changed before the next subframe buffer is received. The subclass will call gst_video_decoder_have_last_subframe when a new input frame can be created by the base class. Every subframe will share the same VideoCodecFrame to write the decoding result. The subclass is responsible to protect its access.

  • If codec processing results in decoded data, the subclass should call VideoDecoderExt::finish_frame() to have decoded data pushed downstream. In subframe mode the subclass should call VideoDecoderExt::finish_subframe() until the last subframe where it should call VideoDecoderExt::finish_frame(). The subclass can detect the last subframe using GST_VIDEO_BUFFER_FLAG_MARKER on buffers or using its own logic to collect the subframes. In case of decoding failure, the subclass must call VideoDecoderExt::drop_frame() or VideoDecoderExt::drop_subframe(), to allow the base class to do timestamp and offset tracking, and possibly to requeue the frame for a later attempt in the case of reverse playback.

§Shutdown phase

  • The GstVideoDecoder class calls stop to inform the subclass that data parsing will be stopped.

§Additional Notes

  • Seeking/Flushing

  • When the pipeline is seeked or otherwise flushed, the subclass is informed via a call to its reset callback, with the hard parameter set to true. This indicates the subclass should drop any internal data queues and timestamps and prepare for a fresh set of buffers to arrive for parsing and decoding.

  • End Of Stream

  • At end-of-stream, the subclass parse function may be called some final times with the at_eos parameter set to true, indicating that the element should not expect any more data to be arriving, and it should parse and remaining frames and call VideoDecoderExt::have_frame() if possible.

The subclass is responsible for providing pad template caps for source and sink pads. The pads need to be named “sink” and “src”. It also needs to provide information about the output caps, when they are known. This may be when the base class calls the subclass’ set_format function, though it might be during decoding, before calling VideoDecoderExt::finish_frame(). This is done via VideoDecoderExtManual::set_output_state()

The subclass is also responsible for providing (presentation) timestamps (likely based on corresponding input ones). If that is not applicable or possible, the base class provides limited framerate based interpolation.

Similarly, the base class provides some limited (legacy) seeking support if specifically requested by the subclass, as full-fledged support should rather be left to upstream demuxer, parser or alike. This simple approach caters for seeking and duration reporting using estimated input bitrates. To enable it, a subclass should call VideoDecoderExt::set_estimate_rate() to enable handling of incoming byte-streams.

The base class provides some support for reverse playback, in particular in case incoming data is not packetized or upstream does not provide fragments on keyframe boundaries. However, the subclass should then be prepared for the parsing and frame processing stage to occur separately (in normal forward processing, the latter immediately follows the former), The subclass also needs to ensure the parsing stage properly marks keyframes, unless it knows the upstream elements will do so properly for incoming data.

The bare minimum that a functional subclass needs to implement is:

This is an Abstract Base Class, you cannot instantiate it.

§Properties

§automatic-request-sync-point-flags

GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points if automatic-request-sync-points is enabled.

Readable | Writeable

§automatic-request-sync-points

If set to true the decoder will automatically request sync points when it seems like a good idea, e.g. if the first frames are not key frames or if packet loss was reported by upstream.

Readable | Writeable

§discard-corrupted-frames

If set to true the decoder will discard frames that are marked as corrupted instead of outputting them.

Readable | Writeable

§max-errors

Maximum number of tolerated consecutive decode errors. See VideoDecoderExt::set_max_errors() for more details.

Readable | Writeable

§min-force-key-unit-interval

Minimum interval between force-key-unit events sent upstream by the decoder. Setting this to 0 will cause every event to be handled, setting this to GST_CLOCK_TIME_NONE will cause every event to be ignored.

See gst_video_event_new_upstream_force_key_unit() for more details about force-key-unit events.

Readable | Writeable

§qos

If set to true the decoder will handle QoS events received from downstream elements. This includes dropping output frames which are detected as late using the metrics reported by those events.

Readable | Writeable

Object

§name

Readable | Writeable | Construct

§parent

The parent of the object. Please note, that when changing the ‘parent’ property, we don’t emit notify and deep-notify signals due to locking issues. In some cases one can use GstBin::element-added or GstBin::element-removed signals on the parent to achieve a similar effect.

Readable | Writeable

§Implements

VideoDecoderExt, gst::prelude::ElementExt, gst::prelude::ObjectExt, [trait@glib::ObjectExt], VideoDecoderExtManual

GLib type: GObject with reference counted clone semantics.

Implementations§

source§

impl VideoDecoder

source

pub const NONE: Option<&'static VideoDecoder> = None

Trait Implementations§

source§

impl Clone for VideoDecoder

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VideoDecoder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HasParamSpec for VideoDecoder

§

type ParamSpec = ParamSpecObject

§

type SetValue = VideoDecoder

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, VideoDecoder>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for VideoDecoder

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Hashes the memory address of this object.

1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: VideoDecoderImpl> IsSubclassable<T> for VideoDecoder

source§

fn class_init(klass: &mut Class<Self>)

Override the virtual methods of this class for the given subclass and do other class initialization. Read more
source§

fn instance_init(instance: &mut InitializingObject<T>)

Instance specific initialization. Read more
source§

impl Ord for VideoDecoder

source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for VideoDecoder

source§

impl<OT: ObjectType> PartialEq<OT> for VideoDecoder

source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for VideoDecoder

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for VideoDecoder

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for VideoDecoder

source§

impl IsA<Element> for VideoDecoder

source§

impl IsA<Object> for VideoDecoder

source§

impl Send for VideoDecoder

source§

impl Sync for VideoDecoder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Cast for T
where T: ObjectType,

source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<O> ElementExt for O
where O: IsA<Element>,

source§

fn abort_state(&self)

Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong. Read more
source§

fn add_pad(&self, pad: &impl IsA<Pad>) -> Result<(), BoolError>

Adds a pad (link point) to self. pad’s parent will be set to self; see GstObjectExt::set_parent() for refcounting information. Read more
source§

fn change_state( &self, transition: StateChange, ) -> Result<StateChangeSuccess, StateChangeError>

Perform transition on self. Read more
source§

fn continue_state( &self, ret: impl Into<StateChangeReturn>, ) -> Result<StateChangeSuccess, StateChangeError>

Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned StateChangeReturn::Success from the state change function. Read more
source§

fn create_all_pads(&self)

Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of Element.
source§

fn decorate_stream_id(&self, stream_id: &str) -> GString

Creates a stream-id for self by combining the upstream information with the stream_id. Read more
source§

fn foreach_pad<P>(&self, func: P) -> bool
where P: FnMut(&Element, &Pad) -> bool,

Call func with user_data for each of self’s pads. func will be called exactly once for each pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new pads are added or pads are removed while pads are being iterated, this will not be taken into account until next time this function is used. Read more
source§

fn foreach_sink_pad<P>(&self, func: P) -> bool
where P: FnMut(&Element, &Pad) -> bool,

Call func with user_data for each of self’s sink pads. func will be called exactly once for each sink pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new sink pads are added or sink pads are removed while the sink pads are being iterated, this will not be taken into account until next time this function is used. Read more
source§

fn foreach_src_pad<P>(&self, func: P) -> bool
where P: FnMut(&Element, &Pad) -> bool,

Call func with user_data for each of self’s source pads. func will be called exactly once for each source pad that exists at the time of this call, unless one of the calls to func returns false in which case we will stop iterating pads and return early. If new source pads are added or source pads are removed while the source pads are being iterated, this will not be taken into account until next time this function is used. Read more
source§

fn base_time(&self) -> Option<ClockTime>

Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element. Read more
source§

fn bus(&self) -> Option<Bus>

Returns the bus of the element. Note that only a Pipeline will provide a bus for the application. Read more
source§

fn clock(&self) -> Option<Clock>

Gets the currently configured clock of the element. This is the clock as was last set with set_clock(). Read more
source§

fn compatible_pad( &self, pad: &impl IsA<Pad>, caps: Option<&Caps>, ) -> Option<Pad>

Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases. Read more
source§

fn compatible_pad_template( &self, compattempl: &PadTemplate, ) -> Option<PadTemplate>

Retrieves a pad template from self that is compatible with compattempl. Pads from compatible templates can be linked together. Read more
source§

fn context(&self, context_type: &str) -> Option<Context>

Gets the context with context_type set on the element or NULL. Read more
source§

fn contexts(&self) -> Vec<Context>

Gets the contexts set on the element. Read more
source§

fn factory(&self) -> Option<ElementFactory>

Retrieves the factory that was used to create this element. Read more
source§

fn start_time(&self) -> Option<ClockTime>

Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED. Read more
source§

fn state( &self, timeout: impl Into<Option<ClockTime>>, ) -> (Result<StateChangeSuccess, StateChangeError>, State, State)

Gets the state of the element. Read more
source§

fn static_pad(&self, name: &str) -> Option<Pad>

Retrieves a pad from self by name. This version only retrieves already-existing (i.e. ‘static’) pads. Read more
source§

fn is_locked_state(&self) -> bool

Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don’t affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from State::Null. Read more
source§

fn lost_state(&self)

Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to state() will return StateChangeReturn::Async. Read more
source§

fn no_more_pads(&self)

Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with PadPresence::Sometimes pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads. Read more
source§

fn post_message(&self, message: Message) -> Result<(), BoolError>

Post a message on the element’s Bus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling. Read more
source§

fn provide_clock(&self) -> Option<Clock>

Get the clock provided by the given element. Read more
source§

fn release_request_pad(&self, pad: &impl IsA<Pad>)

Makes the element free the previously requested pad as obtained with request_pad(). Read more
source§

fn remove_pad(&self, pad: &impl IsA<Pad>) -> Result<(), BoolError>

Removes pad from self. pad will be destroyed if it has not been referenced elsewhere using GstObjectExt::unparent(). Read more
source§

fn request_pad( &self, templ: &PadTemplate, name: Option<&str>, caps: Option<&Caps>, ) -> Option<Pad>

Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using ElementFactory::static_pad_templates(). Read more
source§

fn set_base_time(&self, time: ClockTime)

Set the base time of an element. See base_time(). Read more
source§

fn set_bus(&self, bus: Option<&Bus>)

Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you’re testing elements. Read more
source§

fn set_clock(&self, clock: Option<&impl IsA<Clock>>) -> Result<(), BoolError>

Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed. Read more
source§

fn set_context(&self, context: &Context)

Sets the context of the element. Increases the refcount of the context. Read more
source§

fn set_locked_state(&self, locked_state: bool) -> bool

Locks the state of an element, so state changes of the parent don’t affect this element anymore. Read more
source§

fn set_start_time(&self, time: impl Into<Option<ClockTime>>)

Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0. Read more
source§

fn set_state( &self, state: State, ) -> Result<StateChangeSuccess, StateChangeError>

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class’s state change function for each. Read more
source§

fn sync_state_with_parent(&self) -> Result<(), BoolError>

Tries to change the state of the element to the same as its parent. If this function returns false, the state of element is undefined. Read more
Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked. Read more
Unlinks the two named pads of the source and destination elements. Read more
source§

fn connect_no_more_pads<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self) + Send + Sync + 'static,

This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread.
source§

fn connect_pad_added<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &Pad) + Send + Sync + 'static,

a new Pad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with set_state() or sync_state_with_parent(). Read more
source§

fn connect_pad_removed<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &Pad) + Send + Sync + 'static,

a Pad has been removed from the element Read more
source§

impl<O> ElementExtManual for O
where O: IsA<Element>,

source§

fn element_class(&self) -> &Class<Element>

source§

fn current_state(&self) -> State

source§

fn pending_state(&self) -> State

source§

fn query(&self, query: &mut QueryRef) -> bool

Performs a query on the given element. Read more
source§

fn send_event(&self, event: impl Into<Event>) -> bool

Sends an event to an element. If the element doesn’t implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events. Read more
source§

fn metadata<'a>(&self, key: &str) -> Option<&'a str>

Get metadata with key in klass. Read more
source§

fn pad_template(&self, name: &str) -> Option<PadTemplate>

Retrieves a padtemplate from self with the given name. Read more
source§

fn pad_template_list(&self) -> List<PadTemplate>

Retrieves a list of the pad templates associated with self. The list must not be modified by the calling code. Read more
source§

fn message_full<T>( &self, type_: ElementMessageType, code: T, message: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: u32, )

Post an error, warning or info message on the bus from inside an element. Read more
source§

fn set_element_flags(&self, flags: ElementFlags)

source§

fn unset_element_flags(&self, flags: ElementFlags)

source§

fn element_flags(&self) -> ElementFlags

source§

fn message_full_with_details<T>( &self, type_: ElementMessageType, code: T, message: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: u32, structure: Structure, )

Post an error, warning or info message on the bus from inside an element. Read more
source§

fn post_error_message(&self, msg: ErrorMessage)

source§

fn iterate_pads(&self) -> Iterator<Pad>

Retrieves an iterator of self’s pads. The iterator should be freed after usage. Also more specialized iterators exists such as iterate_src_pads() or iterate_sink_pads(). Read more
source§

fn iterate_sink_pads(&self) -> Iterator<Pad>

Retrieves an iterator of self’s sink pads. Read more
source§

fn iterate_src_pads(&self) -> Iterator<Pad>

Retrieves an iterator of self’s source pads. Read more
source§

fn pads(&self) -> Vec<Pad>

source§

fn sink_pads(&self) -> Vec<Pad>

source§

fn src_pads(&self) -> Vec<Pad>

source§

fn num_pads(&self) -> u16

source§

fn num_sink_pads(&self) -> u16

source§

fn num_src_pads(&self) -> u16

source§

fn add_property_deep_notify_watch( &self, property_name: Option<&str>, include_value: bool, ) -> NotifyWatchId

property_name Read more
source§

fn add_property_notify_watch( &self, property_name: Option<&str>, include_value: bool, ) -> NotifyWatchId

property_name Read more
source§

fn remove_property_notify_watch(&self, watch_id: NotifyWatchId)

watch_id Read more
source§

fn query_convert<U>(&self, src_val: impl FormattedValue) -> Option<U>

Queries an element to convert src_val in src_format to dest_format. Read more
source§

fn query_convert_generic( &self, src_val: impl FormattedValue, dest_format: Format, ) -> Option<GenericFormattedValue>

source§

fn query_duration<T>(&self) -> Option<T>

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. Read more
source§

fn query_duration_generic( &self, format: Format, ) -> Option<GenericFormattedValue>

source§

fn query_position<T>(&self) -> Option<T>

Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. Read more
source§

fn query_position_generic( &self, format: Format, ) -> Option<GenericFormattedValue>

source§

fn seek<V>( &self, rate: f64, flags: SeekFlags, start_type: SeekType, start: V, stop_type: SeekType, stop: impl CompatibleFormattedValue<V>, ) -> Result<(), BoolError>
where V: FormattedValue,

Sends a seek event to an element. See gst_event_new_seek() for the details of the parameters. The seek event is sent to the element using send_event(). Read more
source§

fn seek_simple( &self, seek_flags: SeekFlags, seek_pos: impl FormattedValue, ) -> Result<(), BoolError>

Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use seek(). Read more
source§

fn call_async<F>(&self, func: F)
where F: FnOnce(&Self) + Send + 'static,

Calls func from another thread and passes user_data to it. This is to be used for cases when a state change has to be performed from a streaming thread, directly via ElementExt::set_state() or indirectly e.g. via SEEK events. Read more
source§

fn call_async_future<F, T>( &self, func: F, ) -> Pin<Box<dyn Future<Output = T> + Send>>
where F: FnOnce(&Self) -> T + Send + 'static, T: Send + 'static,

source§

fn current_running_time(&self) -> Option<ClockTime>

Returns the running time of the element. The running time is the element’s clock time minus its base time. Will return GST_CLOCK_TIME_NONE if the element has no clock, or if its base time has not been set. Read more
source§

fn current_clock_time(&self) -> Option<ClockTime>

Returns the current clock time of the element, as in, the time of the element’s clock, or GST_CLOCK_TIME_NONE if there is no clock. Read more
source§

fn request_pad_simple(&self, name: &str) -> Option<Pad>

The name of this function is confusing to people learning GStreamer. request_pad_simple() aims at making it more explicit it is a simplified ElementExt::request_pad(). Read more
Links self to dest. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren’t linked yet. It will request new pads if necessary. Such pads need to be released manually when unlinking. If multiple links are possible, only one is established. Read more
Links self to dest using the given caps as filtercaps. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren’t linked yet. It will request new pads if necessary. If multiple links are possible, only one is established. Read more
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. Read more
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. If caps is not None, makes sure that the caps of the link is a subset of caps. Read more
Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

source§

impl<O> GObjectExtManualGst for O
where O: IsA<Object>,

source§

fn set_property_from_str(&self, name: &str, value: &str)

source§

impl<O> GstObjectExt for O
where O: IsA<Object>,

source§

fn add_control_binding( &self, binding: &impl IsA<ControlBinding>, ) -> Result<(), BoolError>

Attach the ControlBinding to the object. If there already was a ControlBinding for this property it will be replaced. Read more
source§

fn default_error(&self, error: &Error, debug: Option<&str>)

A default error function that uses g_printerr() to display the error message and the optional debug string.. Read more
source§

fn control_binding(&self, property_name: &str) -> Option<ControlBinding>

Gets the corresponding ControlBinding for the property. This should be unreferenced again after use. Read more
source§

fn control_rate(&self) -> Option<ClockTime>

Obtain the control-rate for this self. Audio processing Element objects will use this rate to sub-divide their processing loop and call sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds. Read more
source§

fn name(&self) -> GString

Returns a copy of the name of self. Caller should g_free() the return value after usage. For a nameless object, this returns None, which you can safely g_free() as well. Read more
source§

fn parent(&self) -> Option<Object>

Returns the parent of self. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. Read more
source§

fn path_string(&self) -> GString

Generates a string describing the path of self in the object hierarchy. Only useful (or used) for debugging. Read more
source§

fn value( &self, property_name: &str, timestamp: impl Into<Option<ClockTime>>, ) -> Option<Value>

Gets the value for the given controlled property at the requested time. Read more
source§

fn has_active_control_bindings(&self) -> bool

Check if the self has active controlled properties. Read more
source§

fn has_ancestor(&self, ancestor: &impl IsA<Object>) -> bool

Check if self has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Element is inside a Pipeline. Read more
source§

fn has_as_ancestor(&self, ancestor: &impl IsA<Object>) -> bool

Check if self has an ancestor ancestor somewhere up in the hierarchy. One can e.g. check if a Element is inside a Pipeline. Read more
source§

fn has_as_parent(&self, parent: &impl IsA<Object>) -> bool

Check if parent is the parent of self. E.g. a Element can check if it owns a given Pad. Read more
source§

fn remove_control_binding(&self, binding: &impl IsA<ControlBinding>) -> bool

Removes the corresponding ControlBinding. If it was the last ref of the binding, it will be disposed. Read more
source§

fn set_control_binding_disabled(&self, property_name: &str, disabled: bool)

This function is used to disable the control bindings on a property for some time, i.e. sync_values() will do nothing for the property. Read more
source§

fn set_control_bindings_disabled(&self, disabled: bool)

This function is used to disable all controlled properties of the self for some time, i.e. sync_values() will do nothing. Read more
source§

fn set_control_rate(&self, control_rate: impl Into<Option<ClockTime>>)

Change the control-rate for this self. Audio processing Element objects will use this rate to sub-divide their processing loop and call sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds. Read more
source§

fn set_parent(&self, parent: &impl IsA<Object>) -> Result<(), BoolError>

Sets the parent of self to parent. The object’s reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()). Read more
source§

fn suggest_next_sync(&self) -> Option<ClockTime>

Returns a suggestion for timestamps where buffers should be split to get best controller results. Read more
source§

fn sync_values(&self, timestamp: ClockTime) -> Result<(), BoolError>

Sets the properties of the object, according to the GstControlSources that (maybe) handle them and for the given timestamp. Read more
source§

fn unparent(&self)

Clear the parent of self, removing the associated reference. This function decreases the refcount of self. Read more
source§

fn connect_parent_notify<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self) + Send + Sync + 'static,

source§

impl<O> GstObjectExtManual for O
where O: IsA<Object>,

source§

fn connect_deep_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&Self, &Object, &ParamSpec) + Send + Sync + 'static,

source§

fn set_object_flags(&self, flags: ObjectFlags)

source§

fn unset_object_flags(&self, flags: ObjectFlags)

source§

fn object_flags(&self) -> ObjectFlags

source§

fn g_value_array( &self, property_name: &str, timestamp: ClockTime, interval: ClockTime, values: &mut [Value], ) -> Result<(), BoolError>

source§

fn object_lock(&self) -> ObjectLockGuard<'_, Self>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<U> IsSubclassableExt for U

source§

impl<T> ObjectExt for T
where T: ObjectType,

source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
source§

fn type_(&self) -> Type

Returns the type of the object.
source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T> TransparentType for T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<O> VideoDecoderExt for O
where O: IsA<VideoDecoder>,

source§

fn add_to_frame(&self, n_bytes: i32)

Removes next n_bytes of input data and adds it to currently parsed frame. Read more
source§

fn allocate_output_buffer(&self) -> Result<Buffer, BoolError>

Helper function that allocates a buffer to hold a video frame for self’s current VideoCodecState. Read more
source§

fn drop_frame( &self, frame: VideoCodecFrame<'_>, ) -> Result<FlowSuccess, FlowError>

Similar to finish_frame(), but drops frame in any case and posts a QoS message with the frame’s details on the bus. In any case, the frame is considered finished and released. Read more
source§

fn drop_subframe( &self, frame: VideoCodecFrame<'_>, ) -> Result<FlowSuccess, FlowError>

Drops input data. The frame is not considered finished until the whole frame is finished or dropped by the subclass. Read more
source§

fn finish_frame( &self, frame: VideoCodecFrame<'_>, ) -> Result<FlowSuccess, FlowError>

frame should have a valid decoded data buffer, whose metadata fields are then appropriately set according to frame data and pushed downstream. If no output data is provided, frame is considered skipped. In any case, the frame is considered finished and released. Read more
source§

fn finish_subframe( &self, frame: VideoCodecFrame<'_>, ) -> Result<FlowSuccess, FlowError>

Indicate that a subframe has been finished to be decoded by the subclass. This method should be called for all subframes except the last subframe where finish_frame() should be called instead. Read more
source§

fn buffer_pool(&self) -> Option<BufferPool>

Returns Read more
source§

fn estimate_rate(&self) -> i32

Returns Read more
source§

fn 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. Read more
source§

fn max_errors(&self) -> i32

Returns Read more
source§

fn needs_format(&self) -> bool

Queries decoder required format handling. Read more
source§

fn needs_sync_point(&self) -> bool

Queries if the decoder requires a sync point before it starts outputting data in the beginning. Read more
source§

fn is_packetized(&self) -> bool

Queries whether input data is considered packetized or not by the base class. Read more
source§

fn pending_frame_size(&self) -> usize

Returns the number of bytes previously added to the current frame by calling add_to_frame(). Read more
source§

fn qos_proportion(&self) -> f64

Returns Read more
source§

fn is_subframe_mode(&self) -> bool

Queries whether input data is considered as subframes or not by the base class. If FALSE, each input buffer will be considered as a full frame. Read more
source§

fn have_frame(&self) -> Result<FlowSuccess, FlowError>

Gathers all data collected for currently parsed frame, gathers corresponding metadata and passes it along for further processing, i.e. handle_frame. Read more
source§

fn have_last_subframe( &self, frame: &VideoCodecFrame<'_>, ) -> Result<FlowSuccess, FlowError>

Indicates that the last subframe has been processed by the decoder in frame. This will release the current frame in video decoder allowing to receive new frames from upstream elements. This method must be called in the subclass handle_frame callback. Read more
source§

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(). Read more
source§

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. Read more
source§

fn release_frame(&self, frame: VideoCodecFrame<'_>)

Similar to drop_frame(), but simply releases frame without any processing other than removing it from list of pending frames, after which it is considered finished and released. Read more
source§

fn request_sync_point( &self, frame: &VideoCodecFrame<'_>, flags: VideoDecoderRequestSyncPointFlags, )

Allows the VideoDecoder subclass to request from the base class that a new sync should be requested from upstream, and that frame was the frame when the subclass noticed that a new sync point is required. A reason for the subclass to do this could be missing reference frames, for example. Read more
source§

fn set_estimate_rate(&self, enabled: bool)

Allows baseclass to perform byte to time estimated conversion. Read more
source§

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. Read more
source§

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. Read more
source§

fn set_needs_sync_point(&self, enabled: bool)

Configures whether the decoder requires a sync point before it starts outputting data in the beginning. If enabled, the base class will discard all non-sync point frames in the beginning and after a flush and does not pass it to the subclass. Read more
source§

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. Read more
source§

fn set_subframe_mode(&self, subframe_mode: bool)

If this is set to TRUE, it informs the base class that the subclass can receive the data at a granularity lower than one frame. Read more
source§

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. Read more
source§

fn automatic_request_sync_point_flags( &self, ) -> VideoDecoderRequestSyncPointFlags

GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points if automatic-request-sync-points is enabled.
source§

fn set_automatic_request_sync_point_flags( &self, automatic_request_sync_point_flags: VideoDecoderRequestSyncPointFlags, )

GstVideoDecoderRequestSyncPointFlags to use for the automatically requested sync points if automatic-request-sync-points is enabled.
source§

fn is_automatic_request_sync_points(&self) -> bool

If set to true the decoder will automatically request sync points when it seems like a good idea, e.g. if the first frames are not key frames or if packet loss was reported by upstream.
source§

fn set_automatic_request_sync_points(&self, automatic_request_sync_points: bool)

If set to true the decoder will automatically request sync points when it seems like a good idea, e.g. if the first frames are not key frames or if packet loss was reported by upstream.
source§

fn is_discard_corrupted_frames(&self) -> bool

If set to true the decoder will discard frames that are marked as corrupted instead of outputting them.
source§

fn set_discard_corrupted_frames(&self, discard_corrupted_frames: bool)

If set to true the decoder will discard frames that are marked as corrupted instead of outputting them.
source§

fn min_force_key_unit_interval(&self) -> u64

Minimum interval between force-key-unit events sent upstream by the decoder. Setting this to 0 will cause every event to be handled, setting this to GST_CLOCK_TIME_NONE will cause every event to be ignored. Read more
source§

fn set_min_force_key_unit_interval(&self, min_force_key_unit_interval: u64)

Minimum interval between force-key-unit events sent upstream by the decoder. Setting this to 0 will cause every event to be handled, setting this to GST_CLOCK_TIME_NONE will cause every event to be ignored. Read more
source§

fn is_qos(&self) -> bool

If set to true the decoder will handle QoS events received from downstream elements. This includes dropping output frames which are detected as late using the metrics reported by those events.
source§

fn set_qos(&self, qos: bool)

If set to true the decoder will handle QoS events received from downstream elements. This includes dropping output frames which are detected as late using the metrics reported by those events.
source§

fn connect_automatic_request_sync_point_flags_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_automatic_request_sync_points_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_discard_corrupted_frames_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

fn connect_qos_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source§

impl<O> VideoDecoderExtManual for O
where O: IsA<VideoDecoder>,

source§

fn allocate_output_frame( &self, frame: &mut VideoCodecFrame<'_>, params: Option<&BufferPoolAcquireParams>, ) -> Result<FlowSuccess, FlowError>

Helper function that allocates a buffer to hold a video frame for self’s current VideoCodecState. Subclass should already have configured video state and set src pad caps. Read more
source§

fn frame(&self, frame_number: i32) -> Option<VideoCodecFrame<'_>>

Get a pending unfinished VideoCodecFrame Read more
source§

fn frames(&self) -> Vec<VideoCodecFrame<'_>>

Get all pending unfinished VideoCodecFrame Read more
source§

fn oldest_frame(&self) -> Option<VideoCodecFrame<'_>>

Get the oldest pending unfinished VideoCodecFrame Read more
source§

fn allocator(&self) -> (Option<Allocator>, AllocationParams)

Lets VideoDecoder sub-classes to know the memory allocator used by the base class and its params. Read more
source§

fn latency(&self) -> (ClockTime, Option<ClockTime>)

Query the configured decoder latency. Results will be returned via min_latency and max_latency. Read more
source§

fn set_latency( &self, min_latency: ClockTime, max_latency: impl Into<Option<ClockTime>>, )

Lets VideoDecoder sub-classes tell the baseclass what the decoder latency is. If the provided values changed from previously provided ones, this will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency. Read more
source§

fn output_state(&self) -> Option<VideoCodecState<'static, Readable>>

Get the VideoCodecState currently describing the output stream. Read more
source§

fn set_output_state( &self, fmt: VideoFormat, width: u32, height: u32, reference: Option<&VideoCodecState<'_, Readable>>, ) -> Result<VideoCodecState<'_, InNegotiation<'_>>, FlowError>

Creates a new VideoCodecState with the specified fmt, width and height as the output state for the decoder. Any previously set output state on self will be replaced by the newly created one. Read more
source§

fn set_interlaced_output_state( &self, fmt: VideoFormat, mode: VideoInterlaceMode, width: u32, height: u32, reference: Option<&VideoCodecState<'_, Readable>>, ) -> Result<VideoCodecState<'_, InNegotiation<'_>>, FlowError>

Same as set_output_state() but also allows you to also set the interlacing mode. Read more
source§

fn negotiate<'a>( &'a self, output_state: VideoCodecState<'a, InNegotiation<'a>>, ) -> Result<(), FlowError>

Negotiate with downstream elements to currently configured VideoCodecState. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails. Read more
source§

fn error<T: MessageErrorDomain>( &self, weight: i32, code: T, message: Option<&str>, debug: Option<&str>, file: &str, function: &str, line: u32, ) -> Result<FlowSuccess, FlowError>

source§

fn sink_pad(&self) -> &Pad

source§

fn src_pad(&self) -> &Pad

source§

fn input_segment(&self) -> Segment

source§

fn output_segment(&self) -> Segment

source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,