[gst-devel] Queue Flow Control req'd by GstBaseSink or GST_BUFFER_TIMESTAMP problems?

HaroldJRoth dlafferty at gmail.com
Thu Nov 4 12:32:24 CET 2010



Marco Ballesio wrote:
> 
> Hi,
> 
> On Thu, Nov 4, 2010 at 11:35 AM, HaroldJRoth <dlafferty at gmail.com> wrote:
> 
>> I'm pretty sure that the "sync" is set to false.
>>
> 
> if you're using the default value, it's TRUE. You may try and set the
> max-lateness property but using GST_CLOCK_TIME_NONE for your timestamps
> makes the basesink log out a message (you can see it with
> GST_DEBUG=basesink:5) and not to drop anything.
> 

Definitely setting "sync" to FALSE, e.g.

g_object_set(G_OBJECT(mVideoSnoop), "sync", FALSE, NULL);

That said, I took your advice on the GST_DEBUG, and found my GstBaseSink
blocked in the preroll.  E.g.

basesink gstbasesink.c:1914:gst_base_sink_get_sync_times:<videoSnoop>
got times start: 0:00:00.000000000, stop: 0:00:00.040000000, do_sync 1
basesink gstbasesink.c:2197:gst_base_sink_do_preroll:<videoSnoop>
prerolling object 0x7ff498185c30
basesink gstbasesink.c:2984:gst_base_sink_preroll_object:<videoSnoop>
prerolling object 0x7ff498185c30
basesink gstbasesink.c:2148:gst_base_sink_wait_preroll:<videoSnoop>
waiting in preroll for flush or PLAYING


Since I set the overall pipeline to PLAYING, I'm confused why a PLAYING
message is not received.


BTW, do you know of any sample 'render' implementations.  Mine does not seem
to release the GstBuffer after it is called.  Nor does it do any internal
locking.  E.g 

static GstFlowReturn render (GstBaseSink *sink, GstBuffer* buf) {
  GstTaMediaSnoop *mediaSnoop;
  mediaSnoop = GST_TAMEDIASNOOP (sink);
    
  //Dump the frame on the heap
  gchar *bufferData = malloc(buf->size + 8);
  if(!bufferData) {
    GST_WARNING("Warning - taMediaSnoop element could not malloc data\n");
    return GST_FLOW_ERROR;
  }
  memcpy(bufferData, buf->data, buf->size);
  guint64 timestamp = GST_BUFFER_TIMESTAMP(buf);
  memcpy(bufferData + buf->size, &timestamp, 8);
  
  //And tell the application where it is
  g_signal_emit(G_OBJECT(mediaSnoop), signalIds[FRAME_READY_SIGNAL], 0,
buf->size, bufferData);
  //NOTE: It is left to the application to free the frame when it is done!
  //gst_buffer_unref(buf);

  /* just push out the incoming buffer without touching it */
  return GST_FLOW_OK;
}


-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Queue-Flow-Control-req-d-by-GstBaseSink-or-GST-BUFFER-TIMESTAMP-problems-tp3025912p3026862.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list