gst-launch error handling

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Dec 14 06:00:21 PST 2011


On Wed, 2011-12-14 at 14:49 +0100, Florian Lindner wrote:

> Ok, based on your code I created:
> 
> 
> import gst
> 
> pipe_desc = "filesrc location=accept.flac ! decodebin ! audioconvert !
> lamemp3enc ! xingmux ! id3v2mux ! filesink location=out.mp3"
> 
> pipeline = gst.parse_launch(pipe_desc)
> print pipeline
> bus = pipeline.get_bus()
> print bus
> msg = bus.poll(gst.MESSAGE_EOS | gst.MESSAGE_ERROR, -1)
> print msg
> 
> timed_pop seems to be existing somewhere, but I was unable to find
> documentation on it.
> The code blocks forever at bus.poll and creates no output file:

You'll also have to set the pipeline to playing state before doing the
poll(), with pipeline.set_state(gst.STATE_PLAYING) or so.

Cheers
 -Tim



More information about the gstreamer-devel mailing list