From 13067b104c65761c5c706dd2b3f6572c0d429091 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 13 Jun 2013 14:36:41 +1000 Subject: [PATCH] [704/906] Use gst_object_[un]ref so we can get refcounts in the log --- ext/libvisual/visual-gl.c | 6 +++--- gst-libs/gst/gl/gstglbufferpool.c | 15 +++++++++++++++ gst-libs/gst/gl/gstgldownload.c | 10 ++++++---- gst-libs/gst/gl/gstglfilter.c | 9 ++++++--- gst-libs/gst/gl/gstglmixer.c | 12 ++++++------ gst-libs/gst/gl/gstglshader.c | 18 +++++++++++++++++- gst-libs/gst/gl/gstglupload.c | 10 ++++++---- gst-libs/gst/gl/gstglutils.c | 23 +++++++++++++++++------ gst-libs/gst/gl/gstglwindow.c | 8 ++------ gst/gl/gstgldifferencematte.c | 2 +- gst/gl/gstglimagesink.c | 18 +++++++----------- gst/gl/gstgltestsrc.c | 8 ++++---- tests/check/libs/gstglmemory.c | 2 +- tests/examples/clutter/clutteractor.c | 2 +- tests/examples/clutter/clutteractortee.c | 2 +- tests/examples/clutter/cluttershare.c | 6 +++--- tests/examples/sdl/sdlshare.c | 6 +++--- 17 files changed, 99 insertions(+), 58 deletions(-) diff --git a/ext/libvisual/visual-gl.c b/ext/libvisual/visual-gl.c index 5411e1af84..b808ec9096 100644 --- a/ext/libvisual/visual-gl.c +++ b/ext/libvisual/visual-gl.c @@ -286,7 +286,7 @@ gst_visual_gl_dispose (GObject * object) GstVisualGL *visual = GST_VISUAL_GL (object); if (visual->adapter) { - g_object_unref (visual->adapter); + gst_object_unref (visual->adapter); visual->adapter = NULL; } @@ -1037,7 +1037,7 @@ gst_visual_gl_change_state (GstElement * element, GstStateChange transition) if (G_VALUE_HOLDS_POINTER (id_value)) /* at least one gl element is after in our gl chain */ visual->display = - g_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); + gst_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); else { /* this gl filter is a sink in terms of the gl chain */ visual->display = gst_gl_display_new (); @@ -1097,7 +1097,7 @@ gst_visual_gl_change_state (GstElement * element, GstStateChange transition) visual->midtexture = 0; } if (visual->display) { - g_object_unref (visual->display); + gst_object_unref (visual->display); visual->display = NULL; } diff --git a/gst-libs/gst/gl/gstglbufferpool.c b/gst-libs/gst/gl/gstglbufferpool.c index 252a8ea938..7409dd502c 100644 --- a/gst-libs/gst/gl/gstglbufferpool.c +++ b/gst-libs/gst/gl/gstglbufferpool.c @@ -51,6 +51,7 @@ struct _GstGLBufferPoolPrivate }; static void gst_gl_buffer_pool_finalize (GObject * object); +static void gst_gl_buffer_pool_dispose (GObject * object); GST_DEBUG_CATEGORY_STATIC (GST_CAT_GL_BUFFER_POOL); #define GST_CAT_DEFAULT GST_CAT_GL_BUFFER_POOL @@ -225,6 +226,7 @@ gst_gl_buffer_pool_class_init (GstGLBufferPoolClass * klass) g_type_class_add_private (klass, sizeof (GstGLBufferPoolPrivate)); gobject_class->finalize = gst_gl_buffer_pool_finalize; + gobject_class->dispose = gst_gl_buffer_pool_dispose; gstbufferpool_class->get_options = gst_gl_buffer_pool_get_options; gstbufferpool_class->set_config = gst_gl_buffer_pool_set_config; @@ -237,6 +239,19 @@ gst_gl_buffer_pool_init (GstGLBufferPool * pool) pool->priv = GST_GL_BUFFER_POOL_GET_PRIVATE (pool); } +static void +gst_gl_buffer_pool_dispose (GObject * object) +{ + GstGLBufferPool *pool = GST_GL_BUFFER_POOL_CAST (object); + + if (pool->display) { + gst_object_unref (pool->display); + pool->display = NULL; + } + + G_OBJECT_CLASS (gst_gl_buffer_pool_parent_class)->dispose (object); +} + static void gst_gl_buffer_pool_finalize (GObject * object) { diff --git a/gst-libs/gst/gl/gstgldownload.c b/gst-libs/gst/gl/gstgldownload.c index cce9ee3151..fa1a3813e3 100644 --- a/gst-libs/gst/gl/gstgldownload.c +++ b/gst-libs/gst/gl/gstgldownload.c @@ -285,7 +285,7 @@ gst_gl_download_new (GstGLDisplay * display) download = g_object_new (GST_TYPE_GL_DOWNLOAD, NULL); - download->display = g_object_ref (display); + download->display = gst_object_ref (display); priv = download->priv; #if GST_GL_HAVE_OPENGL @@ -337,16 +337,18 @@ gst_gl_download_finalize (GObject * object) download->depth_buffer = 0; } if (download->shader) { - g_object_unref (G_OBJECT (download->shader)); + gst_object_unref (download->shader); download->shader = NULL; } if (download->display) { - g_object_unref (G_OBJECT (download->display)); + gst_object_unref (download->display); download->display = NULL; } g_mutex_clear (&download->lock); + + G_OBJECT_CLASS (gst_gl_download_parent_class)->finalize (object); } static inline gboolean @@ -832,7 +834,7 @@ _create_shader (GstGLDisplay * display, const gchar * vertex_src, gst_gl_display_set_error (display, "%s", error->message); g_error_free (error); gst_gl_display_clear_shader (display); - g_object_unref (G_OBJECT (shader)); + gst_object_unref (shader); return FALSE; } diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 099be089c8..102795fa03 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -220,7 +220,7 @@ gst_gl_filter_reset (GstGLFilter * filter) } //blocking call, delete the FBO gst_gl_display_del_fbo (filter->display, filter->fbo, filter->depthbuffer); - g_object_unref (filter->display); + gst_object_unref (filter->display); filter->display = NULL; } @@ -251,7 +251,7 @@ gst_gl_filter_start (GstBaseTransform * bt) if (G_VALUE_HOLDS_POINTER (id_value)) /* at least one gl element is after in our gl chain */ filter->display = - g_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); + gst_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); else { GstGLWindow *window; GError *error = NULL; @@ -260,7 +260,7 @@ gst_gl_filter_start (GstBaseTransform * bt) filter->display = gst_gl_display_new (); window = gst_gl_window_new (filter->display); gst_gl_display_set_window (filter->display, window); - g_object_unref (window); + gst_object_unref (window); if (!gst_gl_window_create_context (window, 0, &error)) { GST_ELEMENT_ERROR (filter, RESOURCE, NOT_FOUND, @@ -1001,6 +1001,9 @@ gst_gl_filter_filter_texture (GstGLFilter * filter, GstBuffer * inbuf, gst_gl_upload_perform_with_data (filter->upload, in_tex, in_frame.data); } + GST_DEBUG ("calling filter_texture with textures in:%i out:%i", in_tex, + out_tex); + g_assert (filter_class->filter_texture); ret = filter_class->filter_texture (filter, in_tex, out_tex); diff --git a/gst-libs/gst/gl/gstglmixer.c b/gst-libs/gst/gl/gstglmixer.c index 4104d582b5..bebb941154 100644 --- a/gst-libs/gst/gl/gstglmixer.c +++ b/gst-libs/gst/gl/gstglmixer.c @@ -460,7 +460,7 @@ gst_gl_mixer_child_proxy_get_child_by_index (GstChildProxy * child_proxy, GST_GL_MIXER_LOCK (mix); if ((obj = g_slist_nth_data (mix->sinkpads, index))) - g_object_ref (obj); + gst_object_ref (obj); GST_GL_MIXER_UNLOCK (mix); return obj; } @@ -933,7 +933,7 @@ gst_gl_mixer_activate (GstGLMixer * mix, gboolean activate) id_value = gst_structure_get_value (structure, "gstgldisplay"); if (G_VALUE_HOLDS_POINTER (id_value)) mix->display = - g_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); + gst_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); else { GstGLWindow *window; GError *error = NULL; @@ -942,7 +942,7 @@ gst_gl_mixer_activate (GstGLMixer * mix, gboolean activate) mix->display = gst_gl_display_new (); window = gst_gl_window_new (mix->display); gst_gl_display_set_window (mix->display, window); - g_object_unref (window); + gst_object_unref (window); if (!gst_gl_window_create_context (window, 0, &error)) { GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, @@ -2140,7 +2140,7 @@ gst_gl_mixer_change_state (GstElement * element, GstStateChange transition) mix->depthbuffer = 0; } if (mix->download) { - g_object_unref (mix->download); + gst_object_unref (mix->download); mix->download = NULL; } @@ -2148,7 +2148,7 @@ gst_gl_mixer_change_state (GstElement * element, GstStateChange transition) GstGLMixerPad *pad = (GstGLMixerPad *) (walk->data); if (pad->upload) { - g_object_unref (pad->upload); + gst_object_unref (pad->upload); pad->upload = NULL; } @@ -2156,7 +2156,7 @@ gst_gl_mixer_change_state (GstElement * element, GstStateChange transition) } if (mix->display) { - g_object_unref (mix->display); + gst_object_unref (mix->display); mix->display = NULL; } break; diff --git a/gst-libs/gst/gl/gstglshader.c b/gst-libs/gst/gl/gstglshader.c index 44c954a5c7..ed7624b25b 100644 --- a/gst-libs/gst/gl/gstglshader.c +++ b/gst-libs/gst/gl/gstglshader.c @@ -92,6 +92,21 @@ GST_DEBUG_CATEGORY_STATIC (gst_gl_shader_debug); GST_DEBUG_CATEGORY_INIT (gst_gl_shader_debug, "glshader", 0, "shader"); G_DEFINE_TYPE_WITH_CODE (GstGLShader, gst_gl_shader, G_TYPE_OBJECT, DEBUG_INIT); +static void +gst_gl_shader_dispose (GObject * object) +{ + GstGLShader *shader; + + shader = GST_GL_SHADER (object); + + if (shader->display) { + gst_object_unref (shader->display); + shader->display = NULL; + } + + G_OBJECT_CLASS (gst_gl_shader_parent_class)->dispose (object); +} + static void gst_gl_shader_finalize (GObject * object) { @@ -181,6 +196,7 @@ gst_gl_shader_class_init (GstGLShaderClass * klass) g_type_class_add_private (klass, sizeof (GstGLShaderPrivate)); obj_class->finalize = gst_gl_shader_finalize; + obj_class->dispose = gst_gl_shader_dispose; obj_class->set_property = gst_gl_shader_set_property; obj_class->get_property = gst_gl_shader_get_property; @@ -332,7 +348,7 @@ gst_gl_shader_new (GstGLDisplay * display) g_return_val_if_fail (GST_IS_GL_DISPLAY (display), NULL); shader = g_object_new (GST_GL_TYPE_SHADER, NULL); - shader->display = display; + shader->display = gst_object_ref (display); if (!_fill_vtable (shader, display)) return NULL; diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 00d5a99232..30de512a5a 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -271,7 +271,7 @@ gst_gl_upload_new (GstGLDisplay * display) upload = g_object_new (GST_TYPE_GL_UPLOAD, NULL); - upload->display = g_object_ref (display); + upload->display = gst_object_ref (display); priv = upload->priv; g_mutex_init (&upload->lock); @@ -322,14 +322,16 @@ gst_gl_upload_finalize (GObject * object) upload->depth_buffer = 0; } if (upload->shader) { - g_object_unref (G_OBJECT (upload->shader)); + gst_object_unref (upload->shader); upload->shader = NULL; } if (upload->display) { - g_object_unref (G_OBJECT (upload->display)); + gst_object_unref (upload->display); upload->display = NULL; } + + G_OBJECT_CLASS (gst_gl_upload_parent_class)->finalize (object); } /** @@ -637,7 +639,7 @@ _create_shader (GstGLDisplay * display, const gchar * vertex_src, gst_gl_display_set_error (display, "%s", error->message); g_error_free (error); gst_gl_display_clear_shader (display); - g_object_unref (G_OBJECT (shader)); + gst_object_unref (shader); return FALSE; } diff --git a/gst-libs/gst/gl/gstglutils.c b/gst-libs/gst/gl/gstglutils.c index 9a92fa84ea..03cfec20a1 100644 --- a/gst-libs/gst/gl/gstglutils.c +++ b/gst-libs/gst/gl/gstglutils.c @@ -52,6 +52,8 @@ static GLuint gen_texture_width; static GLuint gen_texture_height; static GstVideoFormat gen_texture_video_format; +static GLuint *del_texture; + /* filter gen fbo */ static GLuint gen_fbo_width; static GLuint gen_fbo_height; @@ -187,9 +189,9 @@ gst_gl_display_gen_texture_thread (GstGLDisplay * display, GLuint * pTexture, } void -gst_gl_display_del_texture_thread (GstGLDisplay * display, GLuint * pTexture) +gst_gl_display_del_texture_window_cb (GstGLDisplay * display) { - //glDeleteTextures (1, pTexture); + glDeleteTextures (1, del_texture); } /* called in the gl thread */ @@ -258,10 +260,19 @@ gst_gl_display_gen_texture (GstGLDisplay * display, GLuint * pTexture, void gst_gl_display_del_texture (GstGLDisplay * display, GLuint * pTexture) { + GstGLWindow *window; + gst_gl_display_lock (display); - if (*pTexture) { - gst_gl_display_del_texture_thread (display, pTexture); + + window = gst_gl_display_get_window_unlocked (display); + if (gst_gl_window_is_running (window) && *pTexture) { + del_texture = pTexture; + gst_gl_window_send_message (window, + GST_GL_WINDOW_CB (gst_gl_display_del_texture_window_cb), display); } + + gst_object_unref (window); + gst_gl_display_unlock (display); } @@ -689,7 +700,7 @@ _gen_shader (GstGLDisplay * display) g_error_free (error); error = NULL; gst_gl_display_clear_shader (display); - g_object_unref (G_OBJECT (gen_shader)); + gst_object_unref (gen_shader); gen_shader = NULL; } } @@ -707,7 +718,7 @@ _del_shader (GstGLDisplay * display) GST_TRACE ("Deleting shader %" GST_PTR_FORMAT, del_shader); if (del_shader) { - g_object_unref (G_OBJECT (del_shader)); + gst_object_unref (del_shader); del_shader = NULL; } } diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c index 40355fec79..858c2f18cc 100644 --- a/gst-libs/gst/gl/gstglwindow.c +++ b/gst-libs/gst/gl/gstglwindow.c @@ -296,10 +296,10 @@ gst_gl_window_quit (GstGLWindow * window, GstGLWindowCB callback, gpointer data) GST_INFO ("quit sent to gl window loop"); + GST_GL_WINDOW_UNLOCK (window); + g_cond_wait (&window->priv->cond_destroy_context, &window->priv->render_lock); GST_INFO ("quit received from gl window"); - - GST_GL_WINDOW_UNLOCK (window); } void @@ -743,10 +743,6 @@ _gst_gl_window_thread_create_context (GstGLWindow * window) window->priv->alive = FALSE; -// g_object_unref (G_OBJECT (display->gl_window)); - -// display->gl_window = NULL; - g_cond_signal (&window->priv->cond_destroy_context); g_mutex_unlock (&window->priv->render_lock); diff --git a/gst/gl/gstgldifferencematte.c b/gst/gl/gstgldifferencematte.c index 7569e88178..e7a5444ba2 100644 --- a/gst/gl/gstgldifferencematte.c +++ b/gst/gl/gstgldifferencematte.c @@ -154,7 +154,7 @@ gst_gl_differencematte_reset_gl_resources (GstGLFilter * filter) gl->DeleteTextures (1, &differencematte->newbgtexture); for (i = 0; i < 4; i++) { if (differencematte->shader[i]) { - g_object_unref (differencematte->shader[i]); + gst_object_unref (differencematte->shader[i]); differencematte->shader[i] = NULL; } if (differencematte->midtexture[i]) { diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c index 77db45d6d6..22f72ff14d 100644 --- a/gst/gl/gstglimagesink.c +++ b/gst/gl/gstglimagesink.c @@ -427,7 +427,7 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) ("%s", error->message), (NULL)); if (glimage_sink->display) { - g_object_unref (glimage_sink->display); + gst_object_unref (glimage_sink->display); glimage_sink->display = NULL; } gst_object_unref (window); @@ -466,7 +466,7 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) glimage_sink->stored_buffer = NULL; } if (glimage_sink->upload) { - g_object_unref (glimage_sink->upload); + gst_object_unref (glimage_sink->upload); glimage_sink->upload = NULL; } @@ -482,8 +482,8 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition) gst_gl_window_set_draw_callback (window, NULL, NULL); gst_gl_window_set_close_callback (window, NULL, NULL); - g_object_unref (window); - g_object_unref (glimage_sink->display); + gst_object_unref (window); + gst_object_unref (glimage_sink->display); glimage_sink->display = NULL; } break; @@ -653,12 +653,8 @@ gst_glimage_sink_render (GstBaseSink * bsink, GstBuffer * buf) gst_object_unref (window); } - //the buffer is cleared when an other comes in - if (glimage_sink->stored_buffer) { - gst_buffer_unref (glimage_sink->stored_buffer); - } - //store current buffer - glimage_sink->stored_buffer = gst_buffer_ref (buf); + + gst_buffer_replace (&glimage_sink->stored_buffer, buf); GST_TRACE ("redisplay texture:%u of size:%ux%u, window size:%ux%u", tex_id, GST_VIDEO_INFO_WIDTH (&glimage_sink->info), @@ -1056,7 +1052,7 @@ temp (GstGLImageSink * gl_sink) { #if GST_GL_HAVE_GLES2 if (gl_sink->redisplay_shader) { - g_object_unref (G_OBJECT (gl_sink->redisplay_shader)); + gst_object_unref (gl_sink->redisplay_shader); gl_sink->redisplay_shader = NULL; } #endif diff --git a/gst/gl/gstgltestsrc.c b/gst/gl/gstgltestsrc.c index afaa70daff..ee93a4934b 100644 --- a/gst/gl/gstgltestsrc.c +++ b/gst/gl/gstgltestsrc.c @@ -552,7 +552,7 @@ gst_gl_test_src_start (GstBaseSrc * basesrc) if (G_VALUE_HOLDS_POINTER (id_value)) /* at least one gl element is after in our gl chain */ src->display = - g_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); + gst_object_ref (GST_GL_DISPLAY (g_value_get_pointer (id_value))); else { GstGLWindow *window; GError *error = NULL; @@ -561,7 +561,7 @@ gst_gl_test_src_start (GstBaseSrc * basesrc) src->display = gst_gl_display_new (); window = gst_gl_window_new (src->display); gst_gl_display_set_window (src->display, window); - g_object_unref (window); + gst_object_unref (window); if (!gst_gl_window_create_context (window, 0, &error)) { GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, @@ -588,12 +588,12 @@ gst_gl_test_src_stop (GstBaseSrc * basesrc) } if (src->download) { - g_object_unref (src->download); + gst_object_unref (src->download); src->download = NULL; } //blocking call, delete the FBO gst_gl_display_del_fbo (src->display, src->fbo, src->depthbuffer); - g_object_unref (src->display); + gst_object_unref (src->display); src->display = NULL; } diff --git a/tests/check/libs/gstglmemory.c b/tests/check/libs/gstglmemory.c index 86927dccac..720a953f91 100644 --- a/tests/check/libs/gstglmemory.c +++ b/tests/check/libs/gstglmemory.c @@ -43,7 +43,7 @@ setup (void) void teardown (void) { - g_object_unref (display); + gst_object_unref (display); } GST_START_TEST (test_basic) diff --git a/tests/examples/clutter/clutteractor.c b/tests/examples/clutter/clutteractor.c index 41f73f7cce..69e4d87ae5 100644 --- a/tests/examples/clutter/clutteractor.c +++ b/tests/examples/clutter/clutteractor.c @@ -170,7 +170,7 @@ main (int argc, char *argv[]) clutter_main (); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); - g_object_unref (pipeline); + gst_object_unref (pipeline); return 0; } diff --git a/tests/examples/clutter/clutteractortee.c b/tests/examples/clutter/clutteractortee.c index f9349cda40..97b1fcc9b8 100644 --- a/tests/examples/clutter/clutteractortee.c +++ b/tests/examples/clutter/clutteractortee.c @@ -225,7 +225,7 @@ main (int argc, char *argv[]) clutter_main (); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); - g_object_unref (pipeline); + gst_object_unref (pipeline); return 0; } diff --git a/tests/examples/clutter/cluttershare.c b/tests/examples/clutter/cluttershare.c index 0257515f68..b06b27bac2 100644 --- a/tests/examples/clutter/cluttershare.c +++ b/tests/examples/clutter/cluttershare.c @@ -298,7 +298,7 @@ main (int argc, char *argv[]) glfilter = gst_bin_get_by_name (GST_BIN (pipeline), "glfiltercube0"); g_object_set (G_OBJECT (glfilter), "external-opengl-context", clutter_gl_context, NULL); - g_object_unref (glfilter); + gst_object_unref (glfilter); /* NULL to PAUSED state pipeline to make sure the gst opengl context is created and * shared with the clutter one */ @@ -336,7 +336,7 @@ main (int argc, char *argv[]) g_object_set (G_OBJECT (fakesink), "signal-handoffs", TRUE, NULL); g_signal_connect (fakesink, "handoff", G_CALLBACK (on_gst_buffer), clutter_texture); - g_object_unref (fakesink); + gst_object_unref (fakesink); /* play gst */ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); @@ -357,7 +357,7 @@ main (int argc, char *argv[]) /* stop and clean up the pipeline */ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); - g_object_unref (pipeline); + gst_object_unref (pipeline); /* make sure there is no pending gst gl buffer in the communication queues * between clutter and gst-gl diff --git a/tests/examples/sdl/sdlshare.c b/tests/examples/sdl/sdlshare.c index ee40c92112..62c20992fa 100644 --- a/tests/examples/sdl/sdlshare.c +++ b/tests/examples/sdl/sdlshare.c @@ -307,7 +307,7 @@ main (int argc, char **argv) glfilter = gst_bin_get_by_name (GST_BIN (pipeline), "gleffects0"); g_object_set (G_OBJECT (glfilter), "external-opengl-context", sdl_gl_context, NULL); - g_object_unref (glfilter); + gst_object_unref (glfilter); /* NULL to PAUSED state pipeline to make sure the gst opengl context is created and * shared with the sdl one */ @@ -335,7 +335,7 @@ main (int argc, char **argv) g_object_set_data (G_OBJECT (fakesink), "queue_input_buf", queue_input_buf); g_object_set_data (G_OBJECT (fakesink), "queue_output_buf", queue_output_buf); g_object_set_data (G_OBJECT (fakesink), "loop", loop); - g_object_unref (fakesink); + gst_object_unref (fakesink); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); @@ -351,7 +351,7 @@ main (int argc, char **argv) #endif gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL); - g_object_unref (pipeline); + gst_object_unref (pipeline); /* turn on back sdl opengl context */ #ifdef WIN32