<DIV>
<DIV>&nbsp;</DIV>
<DIV>Hi Sameer,<BR>&nbsp;now the problem is that the dsp decoder is blackbox(put encoded datum in, <BR>and get decoded datum out)for me ,It is obvious that it would no set the <BR>outbuffer's TIMESTAMP, so how should I set the correct timestamp of video <BR>outbuffer in my application? how to decide the&nbsp; timestamp value of the video <BR>outbuffer from my dsp decoder?&nbsp;&nbsp; I have an idea, set the timestamp of audio <BR>out buffer from the alsasink to the videooutbuffer and update it dynamicly <BR>with the bus-message mechanism of that the sink element, is that fesible and <BR>resonable? </DIV>
<DIV>there is a new question :<BR>&nbsp; say that datum from the audio and video buffers with same timestamp(the demuxer set the timestamp and duration on the buffer<BR>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? </DIV>
<DIV>thanks!</DIV>
<DIV>volter</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><BR>在2007-10-24,"Sameer Naik" &lt;sameer@damagehead.com&gt; 写道:<BR>
<BLOCKQUOTE id=isReplyContent style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><PRE>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:
&gt; hi,
&gt; if timestamp from decoder plugins are proper , 
&gt; then av sync is done in video/audio sink plugins
&gt; 
&gt; if u have custom videosink plugin , is it subclassed from videosink
&gt; base class, which derives from basesink.
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; --- On Mon 10/22, Volter Yen &lt; volter619@163.com &gt; wrote:
&gt;         From: Volter Yen [mailto: volter619@163.com]
&gt;         To: gstreamer-devel@lists.sourceforge.net
&gt;         Date: Tue, 23 Oct 2007 10:55:56 +0800 (CST)
&gt;         Subject: [gst-devel] AV SYNC Problem of gstreamer when using
&gt;         customized dsp decoder
&gt;         
&gt;         Hi all,
&gt;         
&gt;         
&gt;         
&gt;         Recently, I want to implement a simple mpeg2-ts palyer using
&gt;         gstreamer framework,and the decodec element are customized
&gt;         with dsp, and my demuxer is flutsdemux, Gaurav have told me
&gt;         that the demux will push the two on seperate pads in buffers
&gt;         after applying the same timestamp ,and the the sinks (audio
&gt;         and video ) will play the buffers depending on the stream time
&gt;         and timestamps...
&gt;         
&gt;         and I have read the source code of mpeg2dec which used
&gt;         libmpeg2, it will adjust the outbuffer's timestamps with the
&gt;         related pts if necessarybut when I use a dsp decoder,It seem
&gt;         that I can get only the decoded data from it's outbuffer,how
&gt;         to adjust the videooutbuffer's timpstamps in order to avoid
&gt;         meeting av sync problem?
&gt;         
&gt;         I could not find the av sync sample demo ,can anyone guide me
&gt;         and/or give me some sample codes on the related subject?thanks
&gt;         a lot!
&gt;         
&gt;         
&gt;         
&gt;         Best Regards
&gt;         
&gt;         Volter
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         =====================================================
&gt;         
&gt;         
&gt;         
&gt;         Happy everyday $ Best Regards!
&gt;         
&gt;         
&gt;         
&gt;         msn:volter619@163.com
&gt;         
&gt;         
&gt;         
&gt;         Focus on embed linux software!
&gt;         
&gt;         
&gt;         
&gt;         ______________________________________________________________
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         LOGO
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         
&gt;         -------------------------------------------------------------------------
&gt;         This SF.net email is sponsored by: Splunk Inc.
&gt;         Still grepping through log files to find problems? Stop.
&gt;         Now Search log events and configuration files using AJAX and a
&gt;         browser.
&gt;         Download your FREE copy of Splunk now &gt;&gt;
&gt;         http://get.splunk.com/_______________________________________________
&gt;         gstreamer-devel mailing list
&gt;         gstreamer-devel@lists.sourceforge.net
&gt;         https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
&gt;         
&gt;         
&gt; 
&gt; 
&gt; ______________________________________________________________________
&gt; Join Excite! - http://www.excite.com
&gt; The most personalized portal on the Web! 
&gt; -------------------------------------------------------------------------
&gt; This SF.net email is sponsored by: Splunk Inc.
&gt; Still grepping through log files to find problems?  Stop.
&gt; Now Search log events and configuration files using AJAX and a browser.
&gt; Download your FREE copy of Splunk now &gt;&gt; http://get.splunk.com/
&gt; _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

</PRE></BLOCKQUOTE><br><!-- footer --><br>
<hr>
<table width="100%%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50" height="50"><img src="http://mimg.163.com/hd/163/163footer/163footer_50.jpg" alt="LOGO" width="50" height="50"></td>
    <td style="padding:5px;"><a style="font-size:12px;color:black; line-height:20px;text-decoration:none;" href="http://popme.163.com/link/003515_0929_938.html">把爱心注入牛奶,共同凝聚这份力量</a><br /><a style="font-size:12px;line-height:20px; color:black; text-decoration:none;" href="http://popme.163.com/link/003515_0929_938.html">快来参加蒙牛免费赠奶爱心行动 </a></td>
  </tr>
</table>