<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Using playbin to make a video playback will typically use this pipeline:</DIV>
<DIV>&lt;decoder&gt; ! queue ! &lt;sink&gt;</DIV>
<DIV>This&nbsp;make the&nbsp;decoding threading independent of the rendering threading, which is needed to let the rendering side synchronize on clock to display the frame of time N when the real time reach N, assuming that an amount of frames have been decoded by advance &amp; have been put in the queue.</DIV>
<DIV>Gstreamer assumes that if queue is full, the source is blocked till sink has consumed some frames, so when the queue is full, decoder thread is stopped till rendering side as consumed a frame.</DIV>
<DIV>The problem is that by default, queue has 200 frames, so if the decoder is fast enough to decode faster than framerate, the queue will goes up to 200 frames !(in fact not because another 2s value limit the queue size).</DIV>
<DIV>By evidence, on embedded device, such a consumption is not acceptable, so we must tune the size of the queue.</DIV>
<DIV>The problem is that this tuning is at least codec-dependent (stream-dependent also):</DIV>
<DIV>1) MPEG4/H263</DIV>
<DIV>Decoding time is quite always the same for&nbsp;a given&nbsp;stream, so it is assumed that for a given fixed rendering framerate, decoder will never or rarely decode slower than framerate =&gt; small bufferization needed (2-3 frames).</DIV>
<DIV>&nbsp;</DIV>
<DIV>2) H264</DIV>
<DIV>Decoding time has a big dispersion, some decoding "peaks" maybe there which makes a single decoding takes some framerate periods! =&gt; queue size must be larger (10-20 frames) to ensure bufferization. </DIV>
<DIV>This also depends on:</DIV>
<DIV>- video dimensions, complexity of video, because this will decrease the decoding duration,</DIV>
<DIV>- framerate, because if frame rate is low regarding decoding duration, no pbm</DIV>
<DIV>- DPB of SPS header ? size of bufferization needed inside decoder to output 1 frame. Not sure if this must be care of.</DIV>
<DIV>=&gt; so stream dependent</DIV>
<DIV>&nbsp;</DIV>
<DIV>So we must be able to tune queue max-size-buffers=x, x depending on codec type (@ first approach) or stream infos (@second hand).</DIV>
<DIV>&nbsp;</DIV>
<DIV>So the question are:</DIV>
<DIV>- Is anybody knows if someting is there in playbin allowing this ?</DIV>
<DIV>- If playbin modifications must be made, which type of gst mechanism can we use to get what is the video codec type &amp; infos on video in order to tune the queue size ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></div><br>



      <hr size="1"> 
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </a></body></html>