You can just pass
NULL as the element name to
gst_element_factory_make. GStreamer will assign a unique name automatically in this case.
You need to call
gst_bus_add_signal_watch to enable emission of the
message signal. Also make sure that you have a main loop running (
g_main_loop_run or e.g.
playbin element with fakesinks, connect handlers for ERROR and TAG messages and set state to PAUSED. FIXME give full code example
You need to add queue elements after the demuxer (or tee element) that you use.
The problem is that the pipeline will deadlock without queues: When the demuxer/tee element is sending data to the first sink, the flow will block there while going from READY to PAUSED (this is called "prerolling"). Since the flow is blocked inside the first sink, the second sink will never receive any data which means that it can never reach the PAUSED state. A queue element decouples the flow by sending on data in another thread.
FIXME give example pipelines
Since (live) video and audio sources provide an endless stream of data until you stop them, some special steps are needed. These are outlined in the documentation of GstBaseSrc under the section "Controlled shutdown of live sources in applications".
videoparse elements can be used for this. FIXME Give examples/link to element docs. FIXME Since they are in -bad, maybe explain the old method of capsfilter + filesrc-blocksize.
This can be done with the
multifilesrc element. FIXME Give example/link to element docs.
I installed new LADSPA modules/libvisual plugins but the corresponding GStreamer elements do not show up, what's going on?
First make sure that the needed plugin is installed (ladspa from gst-plugins-bad, libvisual from gst-plugins-base). You can verify that by checking the output of
gst-inspect-0.10 ladspa (
If the GStreamer plugin is installed properly, you have to force a registry update:
rm -fv ~/.gstreamer-0.10/registry*
Unfortunately this step is needed everytime the set of LADSPA modules/libvisual plugins changes. Bug #350477 is keeping track of this issue.
Make sure that you initialize glib threading by using
gobject.threads_init() very early in your program. The full import stanza that every pygst program should have looks like this:
import pygtk pygtk.require ("2.0") import gobject gobject.threads_init () import pygst pygst.require ("0.10") import gst
get_feature_list method of the default registry:
>>> import pygst; pygst.require ("0.10") >>> import gst >>> registry = gst.registry_get_default () >>> registry.get_feature_list (gst.ElementFactory) [<gst.ElementFactory bin @ 0x87fb874>, <gst.ElementFactory pipeline @ 0x87fbc84>, <gst.ElementFactory dvdsrc @ 0x87fbc5c>, ...