[gst-devel] How can I wait for the pipeline destruction?

wl2776 wl2776 at gmail.com
Wed Apr 21 14:37:51 CEST 2010



Tim-Philipp Müller-2 wrote:
> 
> Downwards state changes should be synchronous, so when
> gst_object_unref() finishes, the pipeline and all resources used should
> be closed/freed, assuming nothing else holds a ref. If that's not the
> case for you, that may be a problem in some proprietary element, if you
> have one of those in your pipeline, or some refcount issue somewhere.
> 

Is message->src ref included in the refcount? I've noticed that something
tries to send the videosink to the NULL state right after the
gst_message_unref() in my bus-watch.

My bus-watch has the following structure

gboolean gst_player::bus_watch(... )
{
  switch (GST_MESSAGE_TYPE (msg)) {
    case GST_MESSAGE_...: 
      ...
    break;
    case GST_MESSAGE_...: 
      ...
    break;
    case GST_MESSAGE_...: 
      ...
    break;
  }
  gst_message_unref(msg);
  return TRUE;
}

I also do the ref of the videosink in the open() function, which creates a
playbin2, and unref it in the close() function:

void gst_player::open()
{
 ...... 
  m_videosink=gst_element_factory_make("directdrawsink","videosink")
  gst_object_ref(m_videosink);

  m_player=gst_element_factory_make("playbin2","player");
  g_object_set(G_OBJECT(m_player),"video-sink",m_videosink,NULL);
}


-- 
View this message in context: http://n4.nabble.com/How-can-I-wait-for-the-pipeline-destruction-tp2018772p2018849.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list