how to do a/v sync base on async model

hcpwll hcpwll at 163.com
Tue Dec 27 01:27:09 PST 2011


Dear  expert,
          I have meet a puzzle. Could you please tell me how to handle this case?
          I have develop  audiosink & videosink element. This two element inherit from gstbasesink.
          If I invoke gst_base_sink_set_async_enabled(self, TRUE) at init function.
          When the pipeline change state to PAUSE, The audiosink element will wait preroll.
          But, If user seek to a position without audio, Then the state change will wait a long time, Because there is no audio data to preroll.
          The QA fire a bug to me, "seek take too long time".
          So, I have set gst_base_sink_set_async_enabled(self, FALSE) at init function.
          But we meet another problem.
          When the user do the seek operate, The audiosink do not lost state.
          The audiosink element always at the PLAYING state, So after resume play, The audio out put a little faster than video.
          The root-cause of this is audio have not sync the clock with pipeline. This will cause A/V sync issue.
          So, I have write ugly code at audio render function.
          "Check the piepline state, If the pipelien at PLAYING state, I will call render"
          Could you tell me how to handle this case?
          Thank You very very much!

Yours Hcp
         
         
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111227/e6eb8718/attachment.html>


More information about the gstreamer-devel mailing list