[ruby-gnome2-doc-cvs] [Hiki] update - tut-gst-bins-custom

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 4月 1日 (木) 20:59:51 JST


-------------------------
REMOTE_ADDR = 195.207.101.112
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/en/?tut-gst-bins-custom
-------------------------
  = Custom Bins
+ {{link("tut-gst-bins-add", nil, "tut-gst", "tut-gst-bins-ghost-pads")}}
  
  The application programmer can create custom bins packed with elements to perform a specific task. 
  
  This allows you to write an MPEG audio decoder with just the following lines of code:
  
    # create the mp3player element
    player = Gst::ElementFactory.make("mp3player")
  
    # set the source mp3 file
    player.location = "helloworld.mp3"
  
    # start playback
    player.play
  
    ...
  
    # pause playback
    player.pause
  
    ...
  
    # stop
    player.stop
  
  Note that the above code assumes that the mp3player bin derives itself from a Gst::Thread, which begins to play as soon as its state is set to Gst::Element::STATE_PLAYING. Other bin types may need explicit iteration.  For more information, see the chapter called Threads.





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