[empathy] Properly register video source gstreamer element too



commit 1c989a207a5ef27f88b1c4a1a1b68cfcfd1d6efe
Author: Olivier Crête <olivier crete collabora co uk>
Date:   Fri Aug 21 16:50:09 2009 -0400

    Properly register video source gstreamer element too

 libempathy-gtk/empathy-video-src.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-video-src.c b/libempathy-gtk/empathy-video-src.c
index bd014a5..96324e0 100644
--- a/libempathy-gtk/empathy-video-src.c
+++ b/libempathy-gtk/empathy-video-src.c
@@ -137,7 +137,15 @@ empathy_video_src_finalize (GObject *object)
 GstElement *
 empathy_video_src_new (void)
 {
-  return GST_ELEMENT (g_object_new (EMPATHY_TYPE_GST_VIDEO_SRC, NULL));
+  static gboolean registered = FALSE;
+
+  if (!registered) {
+    if (!gst_element_register (NULL, "empathyvideosrc",
+            GST_RANK_NONE, EMPATHY_TYPE_GST_VIDEO_SRC))
+      return NULL;
+    registered = TRUE;
+  }
+  return gst_element_factory_make ("empathyvideosrc", NULL);
 }
 
 void



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