| 1 |
This paper will present the GStreamer Media framework. We |
| 2 |
explain briefly what a media framework is and what its advantages |
| 3 |
are. This introduction presents the basic design of GStreamer |
| 4 |
and how the modularity can provide many benefits when building |
| 5 |
multimedia applications ranging from simple audio/video players |
| 6 |
to complex audio/video mixing and non linear editing. |
| 7 |
|
| 8 |
We then go into more detail about the different components of |
| 9 |
the framework and how specific problems were solved. |
| 10 |
State changes are covered first as they bring the pipeline with |
| 11 |
all its components from a sleeping to a running state. The most |
| 12 |
interesting problem here is error recovery and thread interlocking. |
| 13 |
|
| 14 |
We expand on the scheduler that is responsible for making sure all |
| 15 |
of the components don't step on eachothers toes as they pass along |
| 16 |
data. We explain one of the possible scheduling methods using |
| 17 |
cothreads and expand on how the number of cothread switches can |
| 18 |
be reduced in order to make the data flow as fast as possible. |
| 19 |
|
| 20 |
Since GStreamer is a very open system that can basically handle |
| 21 |
any media type, a mechanism is provided to negotiate the media |
| 22 |
types between plugins. We continue with an explanation of how |
| 23 |
this type negotiation is done. |
| 24 |
|
| 25 |
Events are the mechanism to indicate changes in the data that is |
| 26 |
flowing through the pipeline, such as End Of Stream notification |
| 27 |
or seek and flush events. We explain how these events work and |
| 28 |
how they interact with the scheduler. |
| 29 |
|
| 30 |
We finally cover some of the interesting libraries that are |
| 31 |
provided with GStreamer, such as the bytestream library. We |
| 32 |
explain how all the pieces fit together and how we combine different |
| 33 |
techniques to create a very fast read API. |