[gst-devel] why MPEG fails

Andy Wingo wingo at pobox.com
Fri Mar 19 04:02:04 CET 2004


On Thu, 2004-03-18 at 22:40, Ronald S. Bultje wrote:
> On Wed, 2004-03-17 at 13:39, Andy Wingo wrote:
> > Or why you must use wait_async if you only use one thread.
> 
> Does that work in opt? Last time I checked, it didn't, IIRC.

Yup, it works. Of course, you have to iterate the pipeline for the clock
to advance... and the clock has to implement the wait_async method
(which is the case for GstAudioClock instances).

I use it like this, after setting up the pipeline. And yes the time
looks hacky right now :)

  ;; just a demo of how to do things at certain times in the stream
  (wait-async
   (new-single-shot-id (get-clock osssink) 5000000000)
   (lambda (time)
     (format #t "OSS clock has passed five seconds -- current time ~A\n"
             time)
     #t))

  (set-state pipeline 'playing)

  (attach-iterator pipeline)

  (g-main-loop-run main-loop)

Regards,
-- 
Andy Wingo <wingo at pobox.com>




More information about the gstreamer-devel mailing list