Struct gst::appsink::AppSink[][src]

pub struct AppSink { /* fields omitted */ }

Methods

impl AppSink
[src]

Methods from Deref<Target = Element>

Links this element 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.

Make sure you have added your elements to a bin or pipeline with Bin::add() before trying to link them.

returns true if the elements could be linked, false otherwise.

Links src 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.

Make sure you have added your elements to a bin or pipeline with Bin::add() before trying to link them.

Unlinks all source pads of the this element with all sink pads of the sink element to which they are linked.

If the link has been made using Element::link(), it could have created a requestpad, which has to be released using gst_element_release_request_pad().

Returns the bus of the element. Note that only a Pipeline will provide a bus for the application.

Sets the name of the element

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.

This function can return GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use get_state() to wait for the completion of the state change or it can wait for a GST_MESSAGE_ASYNC_DONE or GST_MESSAGE_STATE_CHANGED on the bus.

State changes to GST_STATE_READY or GST_STATE_NULL never return GST_STATE_CHANGE_ASYNC.

Gets the state of the element.

For elements that performed an ASYNC state change, as reported by set_state(), this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of GST_STATE_CHANGE_SUCCESS or GST_STATE_CHANGE_FAILURE respectively.

For elements that did not return GST_STATE_CHANGE_ASYNC, this function returns the current and pending state immediately.

This function returns GST_STATE_CHANGE_NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in GST_STATE_PLAYING. While the state change return is equivalent to GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start. Returns

GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, GST_STATE_CHANGE_ASYNC if the element is still performing a state change or GST_STATE_CHANGE_FAILURE if the last state change failed.

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.

This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call.

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 gst_element_seek().

In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return TRUE on a seekable media type or FALSE when the media type is certainly not seekable (such as a live stream).

Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return true when it receives the event in the READY state.

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().

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.

If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.

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.

Shortcut for query_duration with format == TIME

Shortcut for query_duration with format == TIME and conversion to seconds

Shortcut for query_position with format == TIME

Shortcut for query_position with format == TIME and conversion to pct as 0..1

Shortcut for query_position with format == TIME and conversion to seconds

Shortcut for seek to a ceratin position in ns

Shortcut for seek to a ceratin position in secs

Shortcut for seek to a ceratin position in pcs as 0..1

Shortcut for seek to the current position but change in playback rate

shortcut to set_state with state == NULL

shortcut to set_state with state == READY

shortcut to set_state with state == PAUSED

shortcut to set_state with state == PLAYING

shortcut to query the state and returns state == PAUSED

shortcut to query the state and returns state == PLAYING

shortcut to query the state and returns state == NULL

shortcut to query the state and returns state == READY

Returns a const raw pointer to the internal GstElement

Returns a mutable raw pointer to the internal GstElement

Trait Implementations

impl Sync for AppSink
[src]

impl Send for AppSink
[src]

impl AsRef<Element> for AppSink
[src]

Performs the conversion.

impl AsMut<Element> for AppSink
[src]

Performs the conversion.

impl From<AppSink> for Element
[src]

Performs the conversion.

impl Deref for AppSink
[src]

The resulting type after dereferencing.

Dereferences the value.

impl DerefMut for AppSink
[src]

Mutably dereferences the value.

impl Transfer for AppSink
[src]

Consumes the current object and transfers ownership of the raw pointer Used to transfer ownership to ffi functions, should be used when an ffi function expects full transfer of an object to avoid the original object to be unreferenced in the process Read more