Class Gst::Element

Abstract

Base class for all pipeline elements.

Inherits from: Gst::Object .

Inherited by: Gst::Bin .

Included in: Gst .

Index: >> FLAG_COMPLEX FLAG_DECOUPLED FLAG_EVENT_AWARE FLAG_INFINITE_LOOP FLAG_NEW_LOOPFUNC FLAG_THREAD_SUGGESTED FLAG_USE_THREADSAFE_PROPERTIES STATE_ASYNC STATE_FAILURE STATE_NULL STATE_PAUSED STATE_PLAYING STATE_READY STATE_SUCCESS [] [] = clock complex? decoupled? each_pad each_property event_aware? get_property has_infinite_loop? has_new_loopfunc? indexable? link pads pause paused? play playing? provides_clock? ready ready? requires_clock? sched_interrupt sched_yield set_property set_state state state= stop stopped? thread_suggested? use_threadsafe_properties? wait_state_change

Instance methods
>>>>(anElement) -> anElement
 

Synonym for link.

[][aString] -> anObject
 

Synonym for get_property.

[] =[aString] = anObject -> anObject
 

Same as set_property, but returns the provided value instead of a reference to the element.

clockclock -> aClockObject
 

Gets the clock of the element, as a Gst::Clock object. Returns nil if this element does not provide a clock.

complex?complex? -> aBoolean
 

Checks if the FLAG_COMPLEX flag is set on the object.

decoupled?decoupled? -> aBoolean
 

Checks if the FLAG_DECOUPLED flag is set on the object.

each_padeach_pad { |aGstPad| block } -> nil
 

Calls the block for each pad associated with the element, passing a reference to the Gst::Pad as parameter.

each_propertyeach_property { |aStringName, aStringDescr, anObject| block } -> nil
 

Calls the block for each property of the element, passing name (aString), description (aStringDescr) and value (anObject) of the property as parameters.

event_aware?event_aware? -> aBoolean
 

Checks if the FLAG_EVENT_AWARE flag is set on the object.

get_propertyget_property(aString) -> anObject
 

Returns the value associated with the property named aString, or nil if the property has no value.

has_infinite_loop?has_infinite_loop? -> aBoolean
 

Checks if the FLAG_INFINITE_LOOP flag is set on the object.

has_new_loopfunc?has_new_loopfunc? -> aBoolean
 

Checks if the FLAG_NEW_LOOPFUNC flag is set on the object.

indexable?indexable? -> aBoolean
 

Checks if the element can be indexed.

linklink(anElement) -> anElement
 

Links this element (source) to anElement (destination).

The functions looks for existing pads and request pads that aren't linked yet. If multiple links are possible, only one is established.

Returns the destination element (anElement).

padspads -> anArray
 

Gets a list of the pads associated with the element, in an array of Gst::Pad objects.

pausepause -> aFixnum
 

Calls set_state with STATE_PAUSED.

paused?paused? -> aBoolean
 

Checks if the current state equals STATE_PAUSED.

playplay -> aFixnum
 

Calls set_state with STATE_PLAYING.

playing?playing? -> aBoolean
 

Checks if the current state equals STATE_PLAYING.

provides_clock?provides_clock? -> aBoolean
 

Checks if the element provides a clock.

readyready -> aFixnum
 

Calls set_state with STATE_READY.

ready?ready? -> aBoolean
 

Checks if the current state equals STATE_READY.

requires_clock?requires_clock? -> aBoolean
 

Checks if the element requires a clock.

sched_interruptsched_interrupt -> self
 

Requests the scheduler of this element to interrupt the execution of this element and scheduler another one.

sched_yieldsched_yield -> self
 

Requests a yield operation for the element. The scheduler will typically give control to another element.

set_propertyset_property(aString, anObject) -> self
 

Sets the value anObject for the property named aString.

If the element uses threadsafe properties, the property will be put on the async queue.

set_stateset_state(aFixnum) -> aFixnum
 

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.

Returns an integer code, according to the result of the operation:

statestate -> aFixnum
 

Gets the state of the element:

state=state=(aFixnum) -> aFixnum
 

Synonym for set_state.

stopstop -> aFixnum
 

Calls set_state with STATE_NULL.

stopped?stopped? -> aBoolean
 

Checks if the current state equals STATE_NULL.

thread_suggested?thread_suggested? -> aBoolean
 

Checks if the FLAG_THREAD_SUGGESTED flag is set on the object.

use_threadsafe_properties?use_threadsafe_properties? -> aBoolean
 

Checks if the FLAG_USE_THREADSAFE_PROPERTIES flag is set on the object.

wait_state_changewait_state_change -> self
 

Waits and blocks until the element changed its state.

Constants
FLAG_COMPLEX

This element is complex (for some def.) and generally requires a cothread.

FLAG_DECOUPLED

Input and output pads aren't directly coupled to each other (examples: queues, multi-output async readers, etc...).

FLAG_EVENT_AWARE

The element can handle events.

FLAG_INFINITE_LOOP

This element, for some reason, has a loop function that performs an infinite loop without calls to sched_yield.

FLAG_NEW_LOOPFUNC

There is a new lookfunction ready for placement.

FLAG_THREAD_SUGGESTED

This element should be placed in a thread if at all possible.

FLAG_USE_THREADSAFE_PROPERTIES

Uses threadsafe property acessors (get/set).

STATE_ASYNC

The element will asynchronously change its state as soon as possible.

STATE_FAILURE

The element could not perform the state change.

STATE_NULL

The state of the element is reseted.

STATE_PAUSED

Means there really is data flowing temporary stops the data flow.

STATE_PLAYING

Means there really is data flowing through the graph.

STATE_READY

The element is ready to start processing data. Some elements might have a non trivial way to initialize themselves.

STATE_SUCCESS

The element successfully changed its state.