[gst-devel] Timing and truncating sinkfiles
amos at latteier.com
Sun Jul 3 15:06:19 CEST 2005
I'm getting started with gstreamer using the Python bindings. It's seems
pretty powerful, but I'm a bit confused and want some advice.
I want to mix together many audio files starting and stopping them at
different times and controlling their volumes with volenv. I understand
how to arrange them in bins and how to link the bins with an adder and
how to link that to an encoder and filesink.
I have two questions:
* I'm not sure of the right way to start and stop the source files. My
guess is that I should change their states between paused and playing. I
don't know how to schedule these changes. Right now I just call iterate
manually on pipe and then try to figure out how much time has passed. It
seems like clocks will only tell me how much actual time has passed,
rather than how many seconds of audio I've processed. Also I can query
the file sinks and sources to see where they are, but this is measured
in bytes, not seconds.
* I'm not sure how to cleanly stop the pipe and make sure that my
filesink ends up writing a correctly terminated audio file. Right now
I'm just unlinking the sources to the encoder and then calling iterate a
few more times, but this doesn't seem right and the resulting wav file
gives some players problems. I've tried setting eos on various elements,
but I haven't found anything that works.
Thanks for any help!
More information about the gstreamer-devel