gstplayer how to let all of the plugins are not cached and processing data as soon as possible?

lucky chou shakin at outlook.com
Mon Oct 24 10:50:42 UTC 2016


Thank you for your comment.

>The problem won't be so much buffering or caching anywhere, but the
>timestamps and latency introduced by RTMP and rtmpsrc probably.

But the RTMP source is the same source, so I think it should not  caused by
the RTMP itself?
>You
>would have to debug where exactly the latency is introduced and then
>try to lower it by tuning whatever is available at that point. 

with playbin, I did the following 2  attempts:
(1)Make basesink->sync= false 
       =>Latency is reduced  6S(13s->7s)
 (2)  Comment queue2-0's property settings code,
       =>Latency is reduced  6S(7s->1s)

----------------------------------------------------------------------playbin0---------------------------------------
|                                                                                       
----------------------uridecodebin0-------------------
|                                                                                       
|
|rtmpsrc -> typefindelement -> queue2-0 ->|  -> typefind -> flvdemux ->
multiqueue   ...
|                                                                                       
|
|                                                                                        
--------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------     

gsturidecodebin.c type_found ()
/* signaled when we have a stream and we need to configure the download
 * buffering or regular buffering */
static void
type_found (GstElement * typefind, guint probability,
    GstCaps * caps, GstURIDecodeBin * decoder)
{
  ......
    if (do_download) {
      gchar *temp_template, *filename;
      const gchar *tmp_dir, *prgname;

      tmp_dir = g_get_user_cache_dir ();
      prgname = g_get_prgname ();
      if (prgname == NULL)
        prgname = "GStreamer";

      filename = g_strdup_printf ("%s-XXXXXX", prgname);

      /* build our filename */
      temp_template = g_build_filename (tmp_dir, filename, NULL);

      GST_DEBUG_OBJECT (decoder, "enable download buffering in %s (%s, %s,
%s)",
          temp_template, tmp_dir, prgname, filename);

      /* configure progressive download for selected media types */
      g_object_set (queue, "temp-template", temp_template, NULL);

      g_free (filename);
      g_free (temp_template);
    } else {
//      g_object_set (queue, "use-buffering", TRUE, NULL);
//      g_object_set (queue, "ring-buffer-max-size",
//          decoder->ring_buffer_max_size, NULL);
//      /* Disable max-size-buffers */
//      g_object_set (queue, "max-size-buffers", 0, NULL);
    }
 .....
}

Through the above 2 step tuning, the latency is roughly 1~2s.However, why 
queue2-0 can be introduced into  6S delay, the reason I still don't  know
... 








--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/gstplayer-how-to-let-all-of-the-plugins-are-not-cached-and-processing-data-as-soon-as-possible-tp4679724p4680193.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list