[gstreamer-bugs] [Bug 613827] New: Queue is not waiting to fill buffer until it's reaches to min-threshold-buffers value

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Mar 24 10:23:41 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=613827
  GStreamer | gstreamer (core) | unspecified

           Summary: Queue is not waiting to fill buffer until it's reaches
                    to min-threshold-buffers value
    Classification: Desktop
           Product: GStreamer
           Version: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: vinjam5678 at gmail.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


When I use max-size-buffers and min-threshold-buffers values as parameters to
QUEUE in gstreamer pipe line, Its not waiting it is not waiting until it reach 
min-threshold-buffers. Currently queue fills the buffer as the buffer empty. It
is not able to perform the requirement of waiting until it all buffers empty.

The changes needed found in gstqueue.c at gstreamer/plugins/elements/
function:gst_queue_chain (GstPad * pad, GstBuffer * buffer)

        /* don't leak. Instead, wait for space to be available */
        do {
          /* for as long as the queue is filled, ait until
min-threshold-buffers reaches. */
          GST_QUEUE_WAIT_DEL_CHECK (queue, out_flushing);
        } while (!gst_queue_is_empty(queue));

and 

Need changes in gst_queue_is_empty function to satisfy all the conditions. I am
not sure all the conditions (need some evaluation in this) 
static gboolean gst_queue_is_empty (GstQueue * queue)
{
  if (queue->queue->length == 0)
    return TRUE;

  if ((queue->cur_level.buffers == 0) || (queue->cur_level.bytes == 0) ||
(queue->cur_level.time == 0) )
   return TRUE;
  if (( queue->min_threshold.buffers == 0 && 
        queue->cur_level.buffers < queue->max_size.buffers) ||
     (queue->min_threshold.bytes == 0 && 
        queue->cur_level.bytes < queue->max_size.bytes) ||
     (queue->min_threshold.time  == 0 && 
        queue->cur_level.time < queue->max_size.time)) &&
     !gst_queue_is_filled (queue)
   return TRUE;

  /* It is possible that a max size is reached before all min thresholds are.
   * Therefore, only consider it empty if it is not filled. */
  return ((queue->min_threshold.buffers > 0 &&
          queue->cur_level.buffers < queue->min_threshold.buffers) ||
      (queue->min_threshold.bytes > 0 &&
          queue->cur_level.bytes < queue->min_threshold.bytes) ||
      (queue->min_threshold.time > 0 &&
          queue->cur_level.time < queue->min_threshold.time)) &&
      !gst_queue_is_filled (queue);
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list