ekiga r7161 - in trunk: . lib/engine/components/gstreamer



Author: jpuydt
Date: Mon Oct  6 18:02:13 2008
New Revision: 7161
URL: http://svn.gnome.org/viewvc/ekiga?rev=7161&view=rev

Log:
Added two crazy devices to the GStreamer video input.

Modified:
   trunk/ChangeLog
   trunk/lib/engine/components/gstreamer/gst-videoinput.cpp
   trunk/lib/engine/components/gstreamer/gst-videoinput.h

Modified: trunk/lib/engine/components/gstreamer/gst-videoinput.cpp
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-videoinput.cpp	(original)
+++ trunk/lib/engine/components/gstreamer/gst-videoinput.cpp	Mon Oct  6 18:02:13 2008
@@ -211,6 +211,7 @@
   detect_videotestsrc_devices ();
   detect_v4l2src_devices ();
   detect_dv1394src_devices ();
+  detect_crazy_devices ();
 }
 
 void
@@ -349,3 +350,36 @@
   if (elt != NULL)
     gst_object_unref (GST_OBJECT (elt));
 }
+
+void
+GST::VideoInputManager::detect_crazy_devices ()
+{
+  GstElement* goom = NULL;
+  GstElement* audiotest = NULL;
+  GstElement* ffmpeg = NULL;
+  GstElement* scale = NULL;
+  GstElement* ximage = NULL;
+
+  goom = gst_element_factory_make ("goom", "goompresencetest");
+  audiotest = gst_element_factory_make ("audiotestsrc", "audiotestsrcpresencetest");
+  ffmpeg = gst_element_factory_make ("ffmpegcolorspace", "ffmpegcolorspacepresencetest");
+  scale = gst_element_factory_make ("videoscale", "videoscalepresencetest");
+  ximage = gst_element_factory_make ("ximagesrc", "ximagesrcpresencetest");
+
+  if (goom != NULL && audiotest != NULL && ffmpeg != NULL)
+    devices_by_name[std::pair<std::string,std::string>(_("Crazy"), _("Goom"))] = "audiotestsrc ! goom ! ffmpegcolorspace";
+
+  if (ximage != NULL && ffmpeg != NULL)
+    devices_by_name[std::pair<std::string,std::string>(_("Crazy"),_("Screencast"))] = "ximagesrc ! videoscale ! ffmpegcolorspace";
+
+  if (goom != NULL)
+    gst_object_unref (goom);
+  if (audiotest != NULL)
+    gst_object_unref (audiotest);
+  if (scale != NULL)
+    gst_object_unref (scale);
+  if (ffmpeg != NULL)
+    gst_object_unref (ffmpeg);
+  if (ximage != NULL)
+    gst_object_unref (ximage);
+}

Modified: trunk/lib/engine/components/gstreamer/gst-videoinput.h
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-videoinput.h	(original)
+++ trunk/lib/engine/components/gstreamer/gst-videoinput.h	Mon Oct  6 18:02:13 2008
@@ -76,6 +76,7 @@
     void detect_videotestsrc_devices ();
     void detect_v4l2src_devices ();
     void detect_dv1394src_devices ();
+    void detect_crazy_devices ();
 
     /* we take a user-readable name, and get the string describing
      * the actual device */



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