Sink elements hangs for a while

iron_guitarist1987 jtrinidadperez at gmail.com
Mon Oct 15 07:24:56 PDT 2012


I tried adding the following function to my element:

static gboolean
gst_customsink_sink_event (GstPad *pad, GstEvent *event)
{
  gboolean ret;
  gboolean update;
  gdouble rate;
  GstFormat format;
  gint64 start, stop, time;
  GstCustomsink *customsink;
  
  customsink = GST_CUSTOMSINK (pad);
  
  switch (GST_EVENT_TYPE (event)) {
    case GST_EVENT_NEWSEGMENT:
      
      gst_event_parse_new_segment (event, &update, &rate, &format, &start,
&stop, &time);
      
      g_print("Start time = %llu\n", start);
      g_print("Stop time = %llu\n", stop);
      event = gst_event_new_new_segment (update, rate, GST_FORMAT_TIME,
start, start+1, time);
	
      ret = gst_pad_push_event (customsink->sinkpad, event);
      break;
      
  }
  
  gst_object_unref (customsink);
  return TRUE;
}

I get the following output and it still hangs. Any suggestions?

  Setting pipeline to PAUSED ...
  Pipeline is PREROLLING ...
  Pipeline is PREROLLED ...
  Setting pipeline to PLAYING ...
  Start time = 7347441722222
  Stop time = 7407127180074
  Start time = 7347441722222
  Stop time = 7407127180074

  (gst-launch-0.10:5702): GStreamer-CRITICAL **:
  Trying to dispose element vpefobjsink0, but it is in PAUSED instead of the
NULL state.
  You need to explicitly set elements to the NULL state before
  dropping the final reference, to allow them to clean up.
  This problem may also be caused by a refcounting bug in the
  application or some element.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Sink-elements-hangs-for-a-while-tp4656475p4656595.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list