[ruby-gnome2-doc-cvs] [Hiki] update - tut-gst-elements-state

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2004年 4月 1日 (木) 21:01:41 JST


-------------------------
REMOTE_ADDR = 195.207.101.112
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/en/?tut-gst-elements-state
-------------------------
  = Element States
+ {{link("tut-gst-bins-ghost-pads", nil, "tut-gst", "tut-gst-helloworld")}}
  
  Here are the most important states of a Gst::Element:
  
  :Gst::Element::STATE_NULL	
   Reset the state of an element.
  :Gst::Element::STATE_READY	
   Will make the element ready to start processing data.
  :Gst::Element::STATE_PAUSED	
   Temporary stops the data flow.
  :Gst::Element::STATE_PLAYING	
   Means there really is data flowing through the graph.
  
  The state of an element can be changed and retrieved with the following code:
  
   # Start playback
   bin.state = Gst::Element::STATE_PLAYING
  
   ...
  
   # Playing?
   if bin.state == Gst::Element::STATE_PLAYING
      # do some stuff here
    end
   
  == Shortcuts
  
  For your convenience, the following shortcuts are available:
  
   bin.ready      # same as bin.state = Gst::Element::STATE_READY
   bin.play       # same as bin.state = Gst::Element::STATE_PLAYING
   bin.pause      # same as bin.state = Gst::Element::STATE_PAUSED
   bin.stop       # same as bin.state = Gst::Element::STATE_NULL
  
   bin.ready?     # checks if bin.state == Gst::Element::STATE_READY
   bin.playing?   # checks if bin.state == Gst::Element::STATE_PLAYING
   bin.paused?    # checks if bin.state == Gst::Element::STATE_PAUSED
   bin.stopped?   # checks if bin.state == Gst::Element::STATE_NULL





ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index