[gst-devel] Re: Syncronising multiple pipelines

izak marais izakmarais at yahoo.com
Tue Nov 8 01:16:14 CET 2005


Nobody has replied to my mail yet. I'm sorry if the
explanation was too long or the questions were stupid
or not
technical enough.  I've only been using gstreamer for
about a month now, so, although I have worked though
the documentation,
I'm still a bit new.  

To summerise my questions:  if you have two different
data streams (i.e. from different sources), how do you
synchronize them?
Some guesses (but I don't know if it's possible of how
to do it): 
	Should it be two pipelines sharing a clock? or,
	Could the two different streams be placed in the same
I also have a problem with getting the following
simple pipeline to run smoothely (it stutters):

	gst-launch filesrc name=source
!  wavparse ! alsasink

I've tried to use treads to alleviate the stuttering,
but to no avail:

	gst-launch filesrc name=source
! {queue ! wavparse ! alsasink}
The wave file is a: RIFF (little-endian) data, WAVE
audio, Microsoft PCM, 16 bit, mono 44100 Hz.


> Message: 3
> Date: Thu, 3 Nov 2005 03:32:12 -0800 (PST)
> From: izak marais <izakmarais at yahoo.com>
> To: gstreamer-devel at lists.sourceforge.net
> Subject: [gst-devel] Syncronising multiple pipelines
> Hi
> I'm using python gstreamer 0.8.9 in an interactive
> (pitch-tracking) kareoke app I'm writing. At the
> moment I have two pipelines: one for playing the
> .wav
> file in the background (basically: filesrc !
> alsasink)
> and one for tracking the pitch from the mic (alsasrc
> !
> my_pitch_tracking_sink).
> My sink plugin determines the pitch of the voice
> singing into the mic and sets the most recent pitch
> as
> a property for the app to get. The plugin currently
> has no clocking capablities. How time sync currently
> "works" (it doens't) is that I iterate the two
> pipelines alternatly in a single python thread.
> After
> each set of iterations, I call get_time() on the
> alsasink in the filesrc pipeline, get the pitch
> property from the other pipeline and send the
> resulting (time, pitch) pair on to my app for
> displaying in the wxPython GUI.
> What I want to do is syncronise these pipelines (or
> combine them into a single pipeline, if such a thing
> is possible) so that when the wav file starts
> playing,
> the mic starts delivering data and everything has
> the
> same clock and is syncronised. I would also like to
> do
> away with "manual" iteration and use a gst thread,
> but
> then I would need some mecanism to post the (time,
> pitch) events from inside the thread to my GUI.
> How do I share a single clock between two pipelines?
> How do I post events from inside a gstreamer plugin
> that python can catch? Is there a better way of
> setting this up?
> Thanks
> Izak Marais

Yahoo! FareChase: Search multiple travel sites in one click.

More information about the gstreamer-devel mailing list