Commit 4a24e19c authored by Johan Dahlin's avatar Johan Dahlin

Put it in a thread and run it in a mainloop

Original commit message from CVS:
Put it in a thread and run it in a mainloop
parent 5811dfc3
......@@ -4,14 +4,13 @@ import gst
def decode(filename):
output = filename + '.wav'
pipeline = ('filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! '
'filesink location="%s"') % (filename, output)
pipeline = ('{ filesrc location="%s" ! spider ! audio/x-raw-int,rate=44100,stereo=2 ! wavenc ! '
'filesink location="%s" }') % (filename, output)
bin = gst.parse_launch(pipeline)
bin.set_state(gst.STATE_PLAYING)
while bin.iterate():
pass
bin.set_state(gst.STATE_NULL)
bin.connect('eos', lambda bin: gst.main_quit())
gst.main()
def main(args):
for arg in args[1:]:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment