[clutter-gst] sink: Ensure clutter is initialized



commit d0ce3f2d1e08b003d73b68e88feeed141836d949
Author: Nicolas Dufresne <nicolas dufresne collabora co uk>
Date:   Sun Nov 6 23:50:06 2011 -0500

    sink: Ensure clutter is initialized

 clutter-gst/Makefile.am              |    1 +
 clutter-gst/clutter-gst-video-sink.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am
index 4201e4f..6380048 100644
--- a/clutter-gst/Makefile.am
+++ b/clutter-gst/Makefile.am
@@ -109,6 +109,7 @@ plugin_LTLIBRARIES = libgstclutter.la
 libgstclutter_la_LIBADD  = $(PLUGIN_LIBS) $(HW_LIBS)
 libgstclutter_la_LDFLAGS =	\
 	$(GL_LDFLAGS)		\
+	libclutter-gst-1.0.la \
 	-module -avoid-version	\
 	-no-undefined		\
 	$(NULL)
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 5a3af7f..c1ea914 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -43,6 +43,7 @@
 #endif
 
 #include "clutter-gst-video-sink.h"
+#include "clutter-gst-util.h"
 #include "clutter-gst-private.h"
 #include "clutter-gst-shaders.h"
 
@@ -1560,6 +1561,10 @@ clutter_gst_navigation_interface_init (GstNavigationInterface *iface)
 static gboolean
 plugin_init (GstPlugin *plugin)
 {
+  /* We must enshure that clutter is initialized */
+  if (clutter_gst_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
+    return FALSE;
+
   return gst_element_register (plugin,
 			       "cluttersink",
 			       GST_RANK_NONE,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]