-
Notifications
You must be signed in to change notification settings - Fork 89
Home
Simple recipes for doing complicated things with libgstreamer-1.0.
For multimedia, gstreamer is the realization of something really, really important: a workbench where users can plug major computational components together to quickly build up complicated applications. The world would be 100 times better if we had a workbench like this for every problem domain. The pipeline metaphor is exceptionally powerful and in the case of gstreamer it's backed by an exceptional architecture. The user interface is simple and elegant: Identify the pipeline components you want (gst-inspect-1.0), write it down using a simple grammar (gst-launch-1.0), and watch magic happen!
But what happens when the pipeline components that you want don't exist? Well, then you to engage with a very carefully architected -- read "neccessarily complex" -- API to build them yourself. This collection of recipes represents some of my efforts to do just that.
We assume throughout that you're using a Debian-based Linux distribution.
sudo apt-add-repository ppa:gstreamer-developers/ppa;
sudo apt-get update;
sudo apt-get install \
gir1.2-gstreamer-1.0 \
gstreamer1.0-doc \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio \
gstreamer1.0-tools \
gstreamer1.0-x \
libgstreamer-plugins-bad1.0-0 \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-0 \
libgstreamer1.0-0-dbg \
libgstreamer1.0-dev;
Each subdirectory of this project (see next section) provides its own autotools-based build infrastructure. See the respective READMEs for precise details. The following details a basic non-superuser install-and-test scenario:
mkdir -p /home/$USER/install
export PREFIX=/home/$USER/install
cd gst-plugin-foo
./autogen.sh && ./configure --prefix=$PREFIX;
make && make install;
./bin/test-gst-plugin-foo --gst-plugin-path=$PREFIX/lib/gstreamer-1.0
This is a basic exploration of the CollectPads functionality. According to the docs, "[CollectPads] manages a set of (sinks) that operate in collect mode. This means that control is given to the manager of this object when all (sinks) have data." It is the prototype for multiplexors ("muxers") and is a useful in synchronization scenarios.
Code: gst-recipes/gst-plugin-collectpadsnoop
In depth: CollectPadsNoop Plugin
gst-recipes
is a fork-and-more of gst-templates
, the gstreamer boilerplate repository. gst-recipes/gst-plugin
and gst-recipes/gst-app
work exactly like they do in gst-templates
. See gst-recipes/gst-plugin/README
and gst-recipes/gst-app/README
.