Struct gst::Element [] [src]

pub struct Element {
    // some fields omitted
}

Methods

impl Element
[src]

fn new(element_name: &str, name: &str) -> Option<Element>

fn factory_make(element: &str, name: &str) -> Option<Element>

unsafe fn new_from_gst_element(element: *mut GstElement) -> Option<Element>

Trait Implementations

impl Sync for Element
[src]

impl Send for Element
[src]

impl Drop for Element
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more

impl ElementT for Element
[src]

fn as_element(&self) -> &Element

fn as_element_mut(&mut self) -> &mut 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. Read more

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

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

fn name(&self) -> String

Returns the name of the element

fn set_name(&mut self, name: &str)

Sets the name of the element

fn set_state(&mut self, state: GstState) -> GstStateChangeReturn

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

fn get_state(&self, timeout: GstClockTime) -> (GstState, GstState, GstStateChangeReturn)

Gets the state of the element. Read more

unsafe fn send_event(&mut self, event: *mut GstEvent) -> 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

fn seek_simple(&mut self, format: GstFormat, flags: GstSeekFlags, pos: i64) -> bool

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

fn seek(&mut self, rate: f64, format: GstFormat, flags: GstSeekFlags, start_type: GstSeekType, start: i64, stop_type: GstSeekType, stop: i64) -> bool

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

fn query_duration(&self, format: GstFormat) -> Option<i64>

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

fn query_position(&self, format: GstFormat) -> Option<i64>

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

fn duration_ns(&self) -> Option<i64>

Shortcut for query_duration with format == TIME

fn duration_s(&self) -> Option<f64>

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

fn position_ns(&self) -> Option<i64>

Shortcut for query_position with format == TIME

fn position_pct(&self) -> Option<f64>

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

fn position_s(&self) -> Option<f64>

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

fn set_position_ns(&mut self, ns: i64) -> bool

Shortcut for seek to a ceratin position in ns

fn set_position_s(&mut self, s: f64) -> bool

Shortcut for seek to a ceratin position in secs

fn set_position_pct(&mut self, pct: f64) -> bool

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

fn set_speed(&mut self, speed: f64) -> bool

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

unsafe fn gst_element(&self) -> *const GstElement

Returns a const raw pointer to the internal GstElement

unsafe fn gst_element_mut(&mut self) -> *mut GstElement

Returns a mutable raw pointer to the internal GstElement

fn set_null_state(&mut self)

shortcut to set_state with state == NULL

fn set_ready_state(&mut self)

shortcut to set_state with state == READY

fn pause(&mut self)

shortcut to set_state with state == PAUSED

fn play(&mut self)

shortcut to set_state with state == PLAYING

fn is_paused(&self) -> bool

shortcut to query the state and returns state == PAUSED

fn is_playing(&self) -> bool

shortcut to query the state and returns state == PLAYING

fn is_null_state(&self) -> bool

shortcut to query the state and returns state == NULL

fn is_ready_state(&self) -> bool

shortcut to query the state and returns state == READY

fn to_element(&self) -> Element

fn set<T>(&self, name: &str, value: T) where Self: Sized

impl Transfer for Element
[src]

unsafe fn transfer(self) -> *mut GstElement

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