[ruby-gnome2-doc-cvs] [Hiki] create - tut-gst-mime-types

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 3月 2日 (火) 19:33:02 JST


-------------------------
REMOTE_ADDR = 195.207.101.112
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?tut-gst-mime-types
-------------------------
= More on MIME Types

GStreamer uses MIME types to identify the different types of data that can be handled by the elements. They are the high level mechanisms to make sure that everyone is talking about the right kind of data.

A MIME (Multipurpose Internet Mail Extension) type is a pair of strings that denote a certain type of data. 

Examples include:

* (({audio/raw})) : raw audio samples
* (({audio/mpeg})) : MPEG audio
* (({video/mpeg})) : MPEG video 

A Gst::Element must associate a MIME type to its source and sink pads when it is loaded into the system. GStreamer knows about the different elements and what type of data they expect and emit. This allows for very dynamic and extensible element creation as we will see.

As we have seen in the previous chapter, MIME types are added to the Capability structure (Gst::Caps) of a Gst::Pad.

In our helloworld example the elements we constructed would have the following MIME types associated with their source and sink pads: 

{{image_left("mime-world.png")}}
{{br}}

We will see how you can create an element based on the MIME types of its source and sink pads. This way the end-user will have the ability to choose his/her favorite audio/mpeg decoder without you even having to care about it.

The typing of the source and sink pads also makes it possible to 'autoplug' a Gst::Pipeline. We will have the ability to say: "construct me a pipeline that does an audio/mpeg to audio/raw conversion".

((*Note*)) The basic GStreamer library does not try to solve all of your autoplug problems. It leaves the hard decisions to the application programmer, where they belong. 





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