[ruby-gnome2-doc-cvs] [Hiki] create - Gst::Element

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 24日 (日) 02:04:16 JST


-------------------------
REMOTE_ADDR = 81.51.53.223
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gst%3A%3AElement
-------------------------
= class Gst::Element
Base class for all pipeline elements.

== Object Hierarchy
* Gst::Object


== Instance Methods
--- >>(anElement) 
    Synonym for Gst::Element#link.

--- add_ghost_pad(aPad, aPadNameString=nil) 
    Creates a ghost pad from the given pad, and adds it to the list of
    pads of the element.
    
    The second parameter defines the ghost pad name.  
    When ommited (or nil),  the ghost pad will receive the same name as
    the given pad.
    
    Returns the ghost pad which was created, or nil.

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

--- complex? 
    Checks if the Gst::Element::FLAG_COMPLEX flag is set on the object.

--- decoupled? 
    Checks if the Gst::Element::FLAG_DECOUPLED flag is set on the object.

--- each_pad { |aGstPad| block } 
    Calls the block for each pad associated with the element, passing a 
    reference to the Gst::Pad as parameter.
    
    Always returns nil.

--- each_property { |aStringName, aStringDescr, anObject| block } 
    Calls the block for each property of the element, passing
    name (aString), description (aStringDescr) and value (anObject) of the property 
    as parameters.
    
    Always returns nil.

--- eos 
    Perform the actions needed to bring the element in the EOS 
    (end of stream) state.

--- event_aware? 
    Checks if the Gst::Element::FLAG_EVENT_AWARE flag is set on the object.

--- get_pad(aNameString) 
    Retrieves a Gst::Pad object from the element by name.
    Returns nil if the pad cannot be found.

--- get_property(aString) 
    Returns the value associated with the property named 
    aString, or nil if the property has no value.
    
    Note that properties may be read through accessors methods, 
    which are generated on-the-fly according to the Gst::Element type.
    
    Example:
    
        e = Gst::ElementFactory.make("filesrc")
        # ...
        puts "Location is " + e.get_property("location")
        # This does exactly the same
        puts "Location is " + e.location

--- has_infinite_loop? 
    Checks if the Gst::Element::FLAG_INFINITE_LOOP flag is set on the object.

--- has_new_loopfunc? 
    Checks if the Gst::Element::FLAG_NEW_LOOPFUNC flag is set on the object.

--- indexable? 
    Checks if the element can be indexed.

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

--- link_pads(other_element) 
    Links the "src" named pad of the current element to the
    "sink" named pad of the destination element, returning
    true on success.
    
    If you want to link specific named pads, you should use
    the Gst::Pad#link method directly.
    
    Example:
    
        element1.link_pads(element2)
        # This does the same
        element1.get_pad("src").link(element2.get_pad("sink"))

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

--- pause 
    Synonym for Gst::Element#set_state with Gst::Element::STATE_PAUSED.

--- paused? 
    Checks if the current state equals Gst::Element::STATE_PAUSED.

--- play 
    Synonym for Gst::Element#set_state with Gst::Element::STATE_PLAYING.

--- playing? 
    Checks if the current state equals Gst::Element::STATE_PLAYING.

--- provides_clock? 
    Checks if the element provides a clock.

--- query(aQueryType, aFormat = Gst::Format::DEFAULT) 
    Performs a query on the element.
    
    Meaningful query types are:
        - Gst::QueryType::TOTAL;
        - Gst::QueryType::POSITION;
        - Gst::QueryType::LATENCY;
        - Gst::QueryType::JITTER;
        - Gst::QueryType::START;
        - Gst::QueryType::SEGMENT_END;
        - Gst::QueryType::RATE.
    
    Meaningful formats are:
        - Gst::Format::DEFAULT;
        - Gst::Format::BYTES;
        - Gst::Format::TIME;
        - Gst::Format::BUFFERS;
        - Gst::Format::PERCENT;
        - Gst::Format::UNITS.
    
    Returns a Fixnum value, or nil if the query could not be performed.

--- ready 
    Synonym for Gst::Element#set_state with Gst::Element::STATE_READY.

--- ready? 
    Checks if the current state equals Gst::Element::STATE_READY.

--- requires_clock? 
    Checks if the element requires a clock.

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

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

--- send_event(anEvent) 
    Sends an event to an element, through a Gst::Event object. 
    If the element doesn't implement an event handler, the event will be 
    forwarded to a random sink pad.
    
    Returns true if the request event was successfully handled, false
    otherwise.

--- set_property(aString, anObject) 
    Sets the value anObject for the property named aString.
    
    If the element uses threadsafe properties, the property will 
    be put on the async queue.
    
    Note that properties may be set through accessors methods, 
    which are generated on-the-fly according to the Gst::Element type.
    
    Example:
    
        e = Gst::ElementFactory.make("filesrc")
        e.set_property("location", "a_file.ogg")
        # This does exactly the same
        e.location = "a_file.ogg"

--- set_state(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 a Fixnum code, according to the result of the operation:
    
      - Gst::Element::STATE_FAILURE;
      - Gst::Element::STATE_SUCCESS;
      - Gst::Element::STATE_ASYNC.

--- state 
    Gets the state of the element:
    
      - Gst::Element::STATE_NULL;
      - Gst::Element::STATE_READY;
      - Gst::Element::STATE_PAUSED;
      - Gst::Element::STATE_PLAYING.

--- state=(aFixnum) 
    Synonym for Gst::Element#set_state.

--- stop 
    Synonym for Gst::Element#set_state with Gst::Element::STATE_NULL.

--- stopped? 
    Checks if the current state equals Gst::Element::STATE_NULL.

--- thread_suggested? 
    Checks if the Gst::Element::FLAG_THREAD_SUGGESTED flag is set on the 
    object.

--- unlink_pads(other_element) 
    Unlinks the "src" named pad of the current element from the
    "sink" named pad of the destination element.
    
    If you want to unlink specific named pads, you should use
    the Gst::Pad#unlink method directly.
    
    Example:
    
        element1.unlink_pads(element2)
        # This does the same
        element1.get_pad("src").unlink(element2.get_pad("sink"))

--- use_threadsafe_properties? 
    Checks if the Gst::Element::FLAG_USE_THREADSAFE_PROPERTIES flag 
    is set on the object.

--- wait_state_change 
    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 Gst::Element#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.


== Signals
--- eos
--- error
--- new-pad
--- pad-removed
--- state-change

- ((<lrz>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index