[gst-devel] Getting started with gnonlin

Dominique Würtz housirer at gmx.de
Fri Jan 6 03:07:11 CET 2006


Dominique Würtz wrote:

> I tried out the latest gnonlin (0.10.0.3) since I plan to use it for 
> my project. I created a little Python script to to test its 
> functionality. Unfortunately it wouldn't work. I think the pipeline 
> gets stuck in the PREROLL state. The timeline source pad however is 
> created.
> Here is the code:
>
> import gst
> import gobject
>
> def _timeline_new_pad_cb(self, pad):
>        timeline.link(sink)
>
> sink = gst.element_factory_make("alsasink")
> timeline = gst.element_factory_make("gnltimeline")
> audiocomp = gst.element_factory_make("gnlcomposition")
>
> gnlsource = gst.element_factory_make("gnlfilesource")
> gnlsource.set_property("location", "foo.wav")
> gnlsource.set_property("media-start", 0L)
> gnlsource.set_property("media-duration", 100000L)
> gnlsource.set_property("start", 0L)
> gnlsource.set_property("duration", 100000L)
> audiocomp.add(gnlsource)
>
> audiocomp.set_property("media-start", 0L)
> audiocomp.set_property("media-duration", 100000L)
> audiocomp.set_property("start", 0L)
> audiocomp.set_property("duration", 100000L)
>
> timeline.set_property("media-start", 0L)
> timeline.set_property("media-duration", 100000L)
> timeline.set_property("start", 0L)
> timeline.set_property("duration", 100000L)
> timeline.add(audiocomp)
>
> timeline.connect("pad-added", _timeline_new_pad_cb)
>
> pipeline = gst.Pipeline()
> pipeline.add(timeline, sink)
>
> pipeline.set_state(gst.STATE_PLAYING)
> gobject.MainLoop().run()
> pipeline.set_state(gst.STATE_NULL)
>
> Just a side note:
>
> This works: gst-launch filesrc location="foo.wav" ! decodebin ! alsasink
> While this won't: gst-launch gnlfilesrc location="foo.wav" ! decodebin 
> ! alsasink
>
I mean gst-launch gnlfilesrc location="foo.wav" ! alsasink

> Any ideas why the pipeline won't play?
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>





More information about the gstreamer-devel mailing list