<div dir="ltr">I recommend you reply to Arun in the bug thread.<div><br></div><div>Thanks,</div><div>Luis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 January 2015 at 13:00, Bing Song <span dir="ltr"><<a href="mailto:Kevin.Song@freescale.com" target="_blank">Kevin.Song@freescale.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Our use case is very complex. But the root cause is the writable size will increase to very large if no audio data feed to pulse. Do I need fix the writable
 size increase or feed audio data at any time to avoid the writable size increase?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">One side effect of the writable size increase is buffer will very large for some demux, such as tsdemux. Ts stream should read sequencely. Can read by track.
 If pulse buffered too many audio data, video pipeline will buffer more data, which will cause consume large memory.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Song Bing.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> gstreamer-devel [mailto:<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank">gstreamer-devel-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Luis de Bethencourt<br>
<b>Sent:</b> Friday, January 09, 2015 7:36 PM<br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Subject:</b> Re: pulsesink: writeable size will increase bigger than total buffer size if no data feed to pulse<u></u><u></u></span></p>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Arun replied there.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<pre style="white-space:pre-wrap"><span style="font-size:13.5pt;color:#65379c">> In a simple word, the writable size will increase to large value after some<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> time if no data feed to pulse. Pulse will consume all audio data as soon as<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> send to pulsesink and then audio pipeline will always no data.</span><span style="font-size:13.5pt;color:black"><u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">Yes, libpulse will continue to ask for more data (until at some point a h/w<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">underrun occurs). However, if you write out the data when it becomes available,<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">this should not be a problem.<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> Our use case is one AVI clip has large audio PCM sample (one sample has one<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> second PCM data). If pulse client buffered all audio data, pulsesink change<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> state from PLAYING to PAUSE will fail as no audio data send from demux as demux<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> blocked by video pipeline as pulse client buffered too many audio data.<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> <u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> Can we change the behave of pulse client or pulse sink? Or need feed data at<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:#65379c">> any time when PLAYING state?</span><span style="font-size:13.5pt;color:black"><u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">I'm really sorry but I'm having trouble understanding the problem you are<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">seeing. The audio and video outputs of the demuxer should ideally have a queue<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">after them so that each of those get their own thread. In that case, one side<u></u><u></u></span></pre>
<pre><span style="font-size:13.5pt;color:black">having large buffers and the other having small buffers should not matter.<u></u><u></u></span></pre>
<pre style="white-space:pre-wrap"><span style="font-size:13.5pt;color:black"><u></u> <u></u></span></pre>
<pre style="white-space:pre-wrap"><span style="font-size:13.5pt;color:black">Thanks Arun!<u></u><u></u></span></pre>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 9 January 2015 at 10:03, Bing Song <<a href="mailto:Kevin.Song@freescale.com" target="_blank">Kevin.Song@freescale.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I report one bug:
<a href="https://bugzilla.gnome.org/show_bug.cgi?id=742141" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=742141</a><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">But it isn’t a bug, just want ask question.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Is it reasonable below writeable size will increase bigger than total buffer</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">size if no data feed to pulse?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">        pbuf->m_writable = pa_stream_writable_size (pbuf->stream);</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Do I need fix writable size increase issue or I need feed data at anytime (send GAP event when no audio data)? Our implement will sent EOS to audio pipeline when backward playback
 and no audio data feed to pulse.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal">Song Bing.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>