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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 2月 28日 (土) 03:12:30 JST


-------------------------
REMOTE_ADDR = 217.117.55.140
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?tut-gst-elements-state
-------------------------
  = Element States
  
  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
   
  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.play?      # checks if bin.state == Gst::Element::STATE_PLAYING
-  bin.pause?     # checks if bin.state == Gst::Element::STATE_PAUSED
-  bin.stop?      # checks if bin.state == Gst::Element::STATE_NULL
+  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 メーリングリストの案内
Back to archive index