[ruby-gnome2-doc-cvs] [Hiki] update - tut-gst-helloworld-problem

Back to archive index

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


-------------------------
REMOTE_ADDR = 195.207.101.112
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/en/?tut-gst-helloworld-problem
-------------------------
  = The Problem with Hello World
+ {{link("tut-gst-helloworld-conclusion", nil, "tut-gst", "tut-gst-mime-types")}}
  
  The small application we created in the previous chapter used the concept of a factory to create the elements. In this chapter we will show you how to use the factory concepts to create elements based on what they do instead of what they are called.
  
  We will first explain the concepts involved before we move on to the reworked helloworld example using autoplugging. 
  
  If we take a look at how the elements were created in the previous example we used a rather crude mechanism:
  
    ...
    # now it's time to get the parser
    decoder = Gst::ElementFactory.make("mad")
    ...
  
  While this mechanism is quite effective it also has some big problems: The elements are created based on their name. Indeed, we create an element, mad, by explicitly stating the mad element's name. Our little program therefore always uses the mad decoder element to decode the MP3 audio stream, even if there are three other MP3 decoders in the system. We will see how we can use a more general way to create an MP3 decoder element.
  
  We have to introduce the concept of MIME types and capabilities added to the source and sink pads. 





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