[gst-devel] AV SYNC Problem of gstreamer when using customized dsp decoder

Volter Yen volter619 at 163.com
Wed Oct 24 10:29:03 CEST 2007


 Hi Sameer,
 now the problem is that the dsp decoder is blackbox(put encoded datum in,
and get decoded datum out)for me ,It is obvious that it would no set the
outbuffer's TIMESTAMP, so how should I set the correct timestamp of video
outbuffer in my application? how to decide the  timestamp value of the video
outbuffer from my dsp decoder?   I have an idea, set the timestamp of audio
out buffer from the alsasink to the videooutbuffer and update it dynamicly
with the bus-message mechanism of that the sink element, is that fesible and
resonable?there is a new question :
  say that datum from the audio and video buffers with same timestamp(the demuxer set the timestamp and duration on the buffer
before it is pushed out to the decoder),if the timestamp of audio and video decoder outbuffer putted to the sink element, must be the same?thanks!volter  
在2007-10-24,"Sameer Naik" <sameer at damagehead.com> 写道:
first of, the demuxer would set the timestamp and duration on the buffer before it is pushed out to the decoder. these timestamps have to be applied to the decoded buffer before you push them further, unless you decide to change the framerate and stuff. next, if your using a your own videosink plugin, make sure you subclass the basevideosink, at it implements av synchronization mechanisms. if you dont subclass the the basevideosink, then you will have to write your own av sychronization code in the videosink plugin. lastly, if your already doing the above and still don't get synchronization, then set the "max-lateness" property (inherited from the basevideosink) to some reasonable amount. xvimagesink for example sets the default value of this property to 20000000, which is half the duration of a frame at 25 fps. and yes, also make sure you push a valid play segment (GstSegment) before you push any buffers out of the decoder..this is very important. or else gstreamer will flash a message saying buffer received without new segment, assuming timestamps start from 0. and this will effect your av sync if the timestamps do nor start from 0. ~sameer On Mon, 2007-10-22 at 23:50 -0400, pritesh wrote: > hi, > if timestamp from decoder plugins are proper , > then av sync is done in video/audio sink plugins > > if u have custom videosink plugin , is it subclassed from videosink > base class, which derives from basesink. > > > > > > --- On Mon 10/22, Volter Yen < volter619 at 163.com > wrote: > From: Volter Yen [mailto: volter619 at 163.com] > To: gstreamer-devel at lists.sourceforge.net > Date: Tue, 23 Oct 2007 10:55:56 +0800 (CST) > Subject: [gst-devel] AV SYNC Problem of gstreamer when using > customized dsp decoder > > Hi all, > > > > Recently, I want to implement a simple mpeg2-ts palyer using > gstreamer framework,and the decodec element are customized > with dsp, and my demuxer is flutsdemux, Gaurav have told me > that the demux will push the two on seperate pads in buffers > after applying the same timestamp ,and the the sinks (audio > and video ) will play the buffers depending on the stream time > and timestamps... > > and I have read the source code of mpeg2dec which used > libmpeg2, it will adjust the outbuffer's timestamps with the > related pts if necessarybut when I use a dsp decoder,It seem > that I can get only the decoded data from it's outbuffer,how > to adjust the videooutbuffer's timpstamps in order to avoid > meeting av sync problem? > > I could not find the av sync sample demo ,can anyone guide me > and/or give me some sample codes on the related subject?thanks > a lot! > > > > Best Regards > > Volter > > > > > > > > > ===================================================== > > > > Happy everyday $ Best Regards! > > > > msn:volter619 at 163.com > > > > Focus on embed linux software! > > > > ______________________________________________________________ > > > > > > > LOGO > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/_______________________________________________ > gstreamer-devel mailing list > gstreamer-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > > ______________________________________________________________________ > Join Excite! - http://www.excite.com > The most personalized portal on the Web! > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20071024/19f6c415/attachment.htm>


More information about the gstreamer-devel mailing list