Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 19:30, 8 May 2008.

GStreamer

From Forum Nokia Wiki

Most of Maemo multimedia applications are based on GStreamer, an open source library that allows the construction of multimedia applications, ranging from simple mp3 player to complex audio-video processing. Its architecture is based on plug-ins, that provide a large number of codecs and functionalities. GStreamer was designed to provide a solution to some current Linux media problems, for example:

Multitude of duplicated code 
Most of these players basically re-implement the same code again. For example, both Xine and MPlayer play mp3 multimedia files; however, each one has its own implementation. Such feature - mp3 file decoding - is commonly used and could be implemented by a central and unique element.
Non-unified plug-in mechanisms 
A typical media player has a plug-in for different media types. Two media players will generally implement their own plug-in mechanism; however, these components cannot be easily exchanged. The plug-in system of a typical media player is very restrict to player features.
One goal media players/libraries 
A player was designed to play a specific type of video and audio format. Most of these players have implemented a complete infrastructure focused on achieving their only goal: playback. There are no design facilities to add filters or special effects to the video or audio data.

Architecture

Essentially, GStreamer architecture consists of elements, bins, pipelines and pads. In the GStreamer nomenclature every component, except the stream itself, is called element: it must have at least one source, one sink, or both, or many of each one. We usually create a chain of elements linked together and let data flow through this chain of elements. An element has one specific function, for example, reading of data from a file and decoding of this data. Elements can be in four states:

  • Null: standard state
  • Ready: buffers are allocated and files are opened, but the stream is waiting
  • Pause: the stream is open, but its "movement" is frozen
  • Playing: same as Paused, but the data is flowing

A media streaming from source_element to sink_element

A bin is simply a container of elements which contains other elements linked together. Remember that a bin is also an element. A pipeline is a special kind of bin that allows the execution of the elements inside it.

A pipeline with 3 elements

Pads are like "doors" that the stream passes through. Normally, they have very specific data manipulation capabilities, for example, they can restrict the data types that can pass through.

An element with 3 pads: sink, audio and video

We can also develop plug-ins. Basically, a plug-in is a loadable block of code. A single plug-in may contain the implementation of several elements, or just a single one. GStreamer's base functionality contains functions for registering and loading plug-ins and for providing the fundamentals of all classes in the form of base classes.

Related Discussions
Thread Thread Starter Forum Replies Last Post
Streaming Video from the Webcam (n810) cruse Graphics & Video & Streaming 1 2008-06-18 08:11
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZmaemoQ
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX