[gst-devel] Is it necessary to unref separately created videosink?
wl2776
wl2776 at gmail.com
Fri Feb 19 15:59:48 CET 2010
I am using the following code to make gstreamer draw a video in area, which
my application has created.
m_player = gst_element_factory_make("playbin2","playbin0");
m_videosink = gst_element_factory_make("directdrawsink","videosink");
if(m_videosink){
g_object_set(m_videosink,"sync",TRUE,NULL);
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (m_videosink),m_hwnd);
g_object_set(G_OBJECT(m_player),"video-sink",m_videosink,NULL);
}
m_loop = g_main_loop_new(NULL,FALSE);
Is my following destruction code correct?
g_main_loop_quit(m_loop);
gst_element_set_state(GST_ELEMENT(m_player),GST_STATE_NULL);
gst_object_unref(m_player);
gst_object_unref(m_loop);
m_player=NULL;
m_videosink=NULL;
m_loop=NULL;
In other words, does playbin2 unref the videosink?
I tried also to unref it, before m_player, but seen the error message.
--
View this message in context: http://n4.nabble.com/Is-it-necessary-to-unref-separately-created-videosink-tp1561744p1561744.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list