<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>It is possible that downstream consumes the entire buffered data
      in one go. Try this:</p>
    <p><br>
    </p>
    <p>gst-launch-1.0 -v uridecodebin
      uri=<a class="moz-txt-link-rfc2396E" href="http://10.0.1.120:50002/m/NDLNA/396487.flac">"http://10.0.1.120:50002/m/NDLNA/396487.flac"</a> ! identity
      silent=false ! audioconvert ! audioresample ! autoaudiosink<br>
    </p>
    <p><br>
    </p>
    <p>Then you'll get lines from the identity element which tell you
      about the size of the passing buffers. Paste a few of those lines
      here.<br>
    </p>
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 2016-09-02 16:39, Jonathan Miles
      wrote:<br>
    </div>
    <blockquote
cite="mid:VI1PR0501MB2350A64C9A6A1AF017BB68BFFAE50@VI1PR0501MB2350.eurprd05.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
        <p>Tweaking the logging, I'm seeing the following dance between
          queue2 and souphttpsrc:</p>
        <p><br>
        </p>
        <div>Done buffering, setting pipeline to PLAYING ...</div>
        <div>0:00:20.721441002  3095   0x286150 INFO                
           queue2
          gstqueue2.c:2447:gst_queue2_locked_dequeue:<queue2-0>
          cur_level.bytes=0</div>
        <div>0:00:20.721910210  3095   0x286150 INFO                
           queue2
          gstqueue2.c:1070:gst_queue2_get_buffering_message:<queue2-0>
          Going to post buffering: 0%</div>
        <div>0:00:20.723109877  3095   0x3f6ac0 INFO                
           queue2
          gstqueue2.c:2328:gst_queue2_locked_enqueue:<queue2-0>
          cur_level.bytes=886192</div>
        <div>buffering... 0%</div>
        <div>Buffering, setting pipeline to PAUSED ...</div>
        <div>0:00:20.731298335  3095   0x3f6ac0 INFO                
           queue2
          gstqueue2.c:1070:gst_queue2_get_buffering_message:<queue2-0>
          Going to post buffering: 100%</div>
        <div>0:00:20.795157794  3095   0x3f6ac0 DEBUG          
           souphttpsrc
          gstsouphttpsrc.c:1640:gst_soup_http_src_read_buffer:<source>
          Read 947616 bytes from http input</div>
        <div>0:00:20.797286460  3095   0x3f6ac0 DEBUG          
           souphttpsrc
          gstsouphttpsrc.c:1744:gst_soup_http_src_create:<source>
          Returning 0 ok</div>
        <div>buffering... 100%</div>
        <div>Done buffering, setting pipeline to PLAYING ...</div>
        <div>0:00:26.157894003  3095   0x286150 INFO                
           queue2
          gstqueue2.c:2447:gst_queue2_locked_dequeue:<queue2-0>
          cur_level.bytes=0</div>
        <div>0:00:26.158368253  3095   0x286150 INFO                
           queue2
          gstqueue2.c:1070:gst_queue2_get_buffering_message:<queue2-0>
          Going to post buffering: 0%</div>
        <div>0:00:26.159438128  3095   0x3f6ac0 INFO                
           queue2
          gstqueue2.c:2328:gst_queue2_locked_enqueue:<queue2-0>
          cur_level.bytes=947616</div>
        <div>buffering... 0%</div>
        <div>Buffering, setting pipeline to PAUSED ...</div>
        <div>0:00:26.165946669  3095   0x3f6ac0 INFO                
           queue2
          gstqueue2.c:1070:gst_queue2_get_buffering_message:<queue2-0>
          Going to post buffering: 100%</div>
        <div>0:00:26.230684461  3095   0x3f6ac0 DEBUG          
           souphttpsrc
          gstsouphttpsrc.c:1640:gst_soup_http_src_read_buffer:<source>
          Read 947896 bytes from http input</div>
        <div>0:00:26.232809503  3095   0x3f6ac0 DEBUG          
           souphttpsrc
          gstsouphttpsrc.c:1744:gst_soup_http_src_create:<source>
          Returning 0 ok</div>
        <div>buffering... 100%</div>
        <div>Done buffering, setting pipeline to PLAYING ...</div>
        <p><br>
        </p>
        <p>It looks like queue2 is sending the "buffering 0%" message
          before souphttpsrc has had a chance to re-fill the queue.</p>
        <p><br>
        </p>
        <p>Some more info on my set-up</p>
        <p><br>
        </p>
        <p> - Building from git master</p>
        <p> - Crossed compiled for ARM</p>
        <p> - Running on an ARM AM335x (like a Beagle Bone)</p>
        <p> - Linux 3.8.11 - no kernel pre-emption enabled</p>
      </div>
      <hr style="display:inline-block;width:98%" tabindex="-1">
      <div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
          color="#000000" face="Calibri, sans-serif"><b>From:</b>
          gstreamer-devel
          <a class="moz-txt-link-rfc2396E" href="mailto:gstreamer-devel-bounces@lists.freedesktop.org"><gstreamer-devel-bounces@lists.freedesktop.org></a> on
          behalf of Jonathan Miles
          <a class="moz-txt-link-rfc2396E" href="mailto:jonathan.miles@cambridgeaudio.com"><jonathan.miles@cambridgeaudio.com></a><br>
          <b>Sent:</b> 02 September 2016 11:57:55<br>
          <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
          <b>Subject:</b> Audio dropouts that disappear when queue2
          logging is enabled</font>
        <div> </div>
      </div>
      <div>
        <div id="divtagdefaultwrapper" style="font-size:12pt;
          color:#000000; background-color:#FFFFFF;
          font-family:Calibri,Arial,Helvetica,sans-serif">
          <div>While playing a FLAC file from a Synology NAS, I'm
            getting audio dropouts as a result of re-buffering:</div>
          <div><br>
          </div>
          <div>
            <div>~ # gst-launch-1.0 playbin
              uri=<a class="moz-txt-link-rfc2396E" href="http://10.0.1.120:50002/m/NDLNA/396487.flac">"http://10.0.1.120:50002/m/NDLNA/396487.flac"</a></div>
            <div>Setting pipeline to PAUSED ...</div>
            <div>Pipeline is PREROLLING ...</div>
            <div>WARNING: from element
              /GstPlayBin:playbin0/GstPlaySink:playsink: No volume
              control found</div>
            <div>Additional debug info:</div>
            <div>/home/jonathanm/build/v010-a/build-glibc-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/gstreamer1.0-plugins-base/git-r0/git/gst/playback/gstplaysink.c(2857):
              gen_audio_chain ():
              /GstPlayBin:playbin0/GstPlaySink:playsink:</div>
            <div>Volume/mute is not available</div>
            <div>Redistribute latency...</div>
            <div>Pipeline is PREROLLED ...</div>
            <div>Setting pipeline to PLAYING ...</div>
            <div>New clock: GstAudioSinkClock</div>
            <div>Buffering, setting pipeline to PAUSED ...</div>
            <div>Done buffering, setting pipeline to PLAYING ...</div>
            <div>Buffering, setting pipeline to PAUSED ...</div>
            <div>Done buffering, setting pipeline to PLAYING ...</div>
            <div><br>
            </div>
            If I enable queue2 debugging (GST_DEBUG="queue2:5"), the
            audio drop-outs disappear, as the pipeline doesn't get set
            to PAUSED, although it looks like the rebuffering is still
            happening:</div>
          <div><br>
          </div>
          <div>
            <div>0:00:32.967181462  1648   0x2cfb50 DEBUG              
                queue2 gstqueue2.c:842:apply_buffer:<queue2-0>
              position updated to 0:00:00.000000000</div>
            <div>0:00:32.967705879  1648   0x2cfb50 DEBUG              
                queue2
              gstqueue2.c:740:update_time_level:<queue2-0> sink
              0:00:00.000000000, src 0:00:00.000000000</div>
            <div>0:00:32.968154921  1648   0x2cfb50 DEBUG              
                queue2
              gstqueue2.c:1221:update_out_rates:<queue2-0> rates:
              period 5.950074, out 1048576</div>
            <div>0:00:32.968559296  1648   0x2cfb50 DEBUG              
                queue2
              gstqueue2.c:1239:update_out_rates:<queue2-0> rates:
              out 266973.567011, time 0:00:00.000000000</div>
            <div>0:00:32.969009754  1648   0x2cfb50 DEBUG              
                queue2 gstqueue2.c:1199:update_in_rates:<queue2-0>
              rates: in 1361330.412743, time 0:00:00.000000000</div>
            <div>0:00:32.969451212  1648   0x2cfb50 DEBUG              
                queue2
              gstqueue2.c:1004:get_buffering_level:<queue2-0>
              buffering 0, level 0</div>
            <div>0:00:32.969777004  1648   0x2cfb50 DEBUG              
                queue2
              gstqueue2.c:1122:update_buffering:<queue2-0>
              buffering 0 percent</div>
            <div>0:00:32.972558504  1648   0x4408c0 DEBUG              
                queue2 gstqueue2.c:842:apply_buffer:<queue2-0>
              position updated to 0:00:00.000000000</div>
            <div>0:00:32.973054296  1648   0x4408c0 DEBUG              
                queue2
              gstqueue2.c:740:update_time_level:<queue2-0> sink
              0:00:00.000000000, src 0:00:00.000000000</div>
            <div>0:00:32.973499504  1648   0x4408c0 DEBUG              
                queue2 gstqueue2.c:1199:update_in_rates:<queue2-0>
              rates: in 1361330.412743, time 0:00:00.779502162</div>
            <div>0:00:32.973981379  1648   0x4408c0 DEBUG              
                queue2 gstqueue2.c:1199:update_in_rates:<queue2-0>
              rates: in 1361330.412743, time 0:00:00.779502162</div>
            <div>0:00:32.974428254  1648   0x4408c0 DEBUG              
                queue2
              gstqueue2.c:1004:get_buffering_level:<queue2-0>
              buffering 1, level 1000000</div>
            <div>0:00:32.974764921  1648   0x4408c0 DEBUG              
                queue2
              gstqueue2.c:1116:update_buffering:<queue2-0>
              buffering 100 percent</div>
            <div>0:00:32.975315546  1648   0x4408c0 DEBUG              
                queue2
              gstqueue2.c:1070:gst_queue2_get_buffering_message:<queue2-0>
              Going to post buffering: 100%</div>
            <div>Done buffering, setting pipeline to PLAYING ...</div>
            <br>
          </div>
          <div>Anyone got any ideas as to what might be going here?</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div><br>
          </div>
          <div>Jonathan</div>
        </div>
        <br>
        <br>
        Audio Partnership PLC, Gallery Court, Hankey Place, London SE1
        4BB, UK Reg No. 2953313 This e-mail is confidential and for the
        addressee only. Please refer to
        <a moz-do-not-send="true"
          href="https://www.cambridgeaudio.com/disclaimer"
          target="_blank">Disclaimer</a> for important notices.
      </div>
      <br>
      <br>
      Audio Partnership PLC, Gallery Court, Hankey Place, London SE1
      4BB, UK Reg No. 2953313
      This e-mail is confidential and for the addressee only. Please
      refer to <a moz-do-not-send="true"
        href="https://www.cambridgeaudio.com/disclaimer" target="_blank">Disclaimer</a>
      for important notices. <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>