<div>Hello, Pankaj</div> <div> </div> <div>Thanks so much for your valuable information.</div> <div><BR>I find the test application cause the phenonmen.</div> <div> </div> <div>if I use following two functions, it will block, and need resyncing, still, </div> <div>pluging receive newsegment event twice, first update=1, second update=0.<BR>gst_element_seek_simple(pipe,fmt,GST_SEEK_TYPE_SET,time)<BR>gst_element_seek (pipe,<BR> 1.0, GST_FORMAT_TIME,<BR> 0, //GST_SEEK_FLAG_FLUSH,<BR> GST_SEEK_TYPE_SET, time,<BR> GST_SEEK_TYPE_NONE, -1)</div> <div> </div>
<div>but if I open flush flag, it will play continuously,<BR>gst_element_seek (pipe,<BR> 1.0, GST_FORMAT_TIME,<BR> GST_SEEK_FLAG_FLUSH,<BR> GST_SEEK_TYPE_SET, time,<BR> GST_SEEK_TYPE_NONE, -1)<BR>now it will receive three events, first is flush-start, second is flush-stop, </div> <div>last is newsegment, and the problem disappears, no resyncing is needed.</div> <div> </div> <div>Still I have two confusion.<BR>1, since we should find sync code after seeking, there will an offset, do we need resend newsegment in the chain once offset occur.</div> <div> </div>
<div>2, sometimes we do not know whether file support seek or not, for example, h264 files should have IDR frame to support seek, so we have to parse stream, while srcpad_event do not have income streams, which will occur in chain function. then is there any method to parse stream first then tell application whether support seek or not.</div> <div> </div> <div>Thanks <BR><BR><B><I>Pankaj Sen <pankaj.sen77@gmail.com></I></B> дµÀ£º</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <DIV>Hi gao,</DIV> <DIV>Can you tell me is the mp3dec is written by you using some library or you are just using it. It seems to me that there is some time stamp problem. You need to pass new segment event before sending the first output buffer, also set the caps and calculate proper time stamp. It you have written this plugin then if you can show me the chain function. I have written my own mp3dec plugin and also alsasink
plugin. So, I may try to help you. </DIV> <DIV> </DIV> <DIV>Regards,</DIV> <DIV>Pankaj<BR><BR> </DIV> <DIV><SPAN class=gmail_quote>On 3/1/07, <B class=gmail_sendername>zhangfei gao</B> <<A href="mailto:gaozhangfei@yahoo.com.cn">gaozhangfei@yahoo.com.cn</A>> wrote:</SPAN> <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"> <DIV>hi, </DIV> <DIV> </DIV> <DIV>I want to support seek in mp3dec, testing like this<BR>gst-launch filesrc location=xx.mp3 ! mp3dec ! alsasink</DIV> <DIV> </DIV> <DIV>But frequently after seeking, audio will blocking about 1~5 seconds, at the same time, print following message</DIV> <DIV>WARNING: Element "alsasink0" warns: gstbaseaudiosink.c(696): gst_base_audio_sink_render (): /pipeline0/alsasink0:<BR>Unexpected discontinuity in audio timestamps of more than half a second (0:00:11.394603174 ), resyncing</DIV> <DIV> </DIV> <DIV>In sinkpad_event, I
use "gst_event_new_new_segment" with new timestamp, which is calculated by new seek offset. <BR>In chain function I use new timestamp as new start point.</DIV> <DIV> </DIV> <DIV>Still I find alsasink seems omit the timestamp. <BR>In gstbaseaudiosink.c gst_base_audio_sink_event function,</DIV> <DIV> /* we only need the rate */<BR> gst_event_parse_new_segment_full (event, NULL, &rate, NULL, NULL,<BR> NULL, NULL, NULL);</DIV> <DIV> </DIV> <DIV>how to solve the blocking issue, is there any tricky?</DIV> <DIV> </DIV> <DIV>Thanks in advance!</DIV> <div> <HR SIZE=1> <A onclick="return top.js.OpenExtLink(window,event,this)" href="http://cn.mail.yahoo.com/" target=_blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡</A> <div></div><BR>-------------------------------------------------------------------------<BR>Take Surveys. Earn Cash.
Influence the Future of IT<BR>Join SourceForge.net's Techsay panel and you'll get the chance to share your <BR>opinions on IT & business topics through brief surveys-and earn cash<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV" target=_blank>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</A><BR>_______________________________________________<BR>gstreamer-devel mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target=_blank>https://lists.sourceforge.net/lists/listinfo/gstreamer-devel </A><BR><BR> <div></div></BLOCKQUOTE></DIV><BR></BLOCKQUOTE><BR><p> 
                <hr size=1><a href="http://cn.mail.yahoo.com" target=blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a>