ekiga r7063 - trunk/lib/engine/components/gstreamer
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7063 - trunk/lib/engine/components/gstreamer
- Date: Tue, 23 Sep 2008 05:51:56 +0000 (UTC)
Author: jpuydt
Date: Tue Sep 23 05:51:56 2008
New Revision: 7063
URL: http://svn.gnome.org/viewvc/ekiga?rev=7063&view=rev
Log:
Made the device detection in the GStreamer video input work better
Modified:
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 Tue Sep 23 05:51:56 2008
@@ -205,19 +205,47 @@
GST::VideoInputManager::detect_devices ()
{
devices_by_name.clear ();
- devices_by_name["Video test"] = "videotestsrc";
+ detect_videotestsrc_devices ();
detect_v4l2src_devices ();
detect_dv1394src_devices ();
}
void
+GST::VideoInputManager::detect_videotestsrc_devices ()
+{
+ GstElement* elt = NULL;
+
+ elt = gst_element_factory_make ("videotestsrc", "videotestsrcpresencetest");
+
+ if (elt != NULL) {
+
+ devices_by_name["Video test"] = "videotestsrc";
+ gst_object_unref (GST_OBJECT (elt));
+ }
+}
+
+void
GST::VideoInputManager::detect_v4l2src_devices ()
{
+ bool problem = false;
GstElement* elt = NULL;
+ elt = gst_element_factory_make ("videoscale", "videoscalepresencetest");
+ if (elt == NULL)
+ problem = true;
+ else
+ gst_object_unref (elt);
+
+ elt = gst_element_factory_make ("ffmpegcolorspace",
+ "ffmpegcolorspacepresencetest");
+ if (elt == NULL)
+ problem = true;
+ else
+ gst_object_unref (elt);
+
elt = gst_element_factory_make ("v4l2src", "v4l2srcpresencetest");
- if (elt != NULL) {
+ if (elt != NULL && problem == false) {
GstPropertyProbe* probe = NULL;
const GParamSpec* pspec = NULL;
@@ -248,18 +276,33 @@
gst_element_set_state (elt, GST_STATE_NULL);
}
- gst_object_unref (GST_OBJECT (elt));
}
+ if (elt != NULL)
+ gst_object_unref (GST_OBJECT (elt));
}
void
GST::VideoInputManager::detect_dv1394src_devices ()
{
+ bool problem = false;
GstElement* elt = NULL;
+ elt = gst_element_factory_make ("decodebin", "decodebinpresencetest");
+ if (elt == NULL)
+ problem = true;
+ else
+ gst_object_unref (elt);
+
+ elt = gst_element_factory_make ("ffmpegcolorspace",
+ "ffmpegcolorspacepresencetest");
+ if (elt == NULL)
+ problem = true;
+ else
+ gst_object_unref (elt);
+
elt = gst_element_factory_make ("dv1394src", "dv1394srcpresencetest");
- if (elt != NULL) {
+ if (elt != NULL && problem == false) {
GstPropertyProbe* probe = NULL;
const GParamSpec* pspec = NULL;
@@ -290,6 +333,7 @@
gst_element_set_state (elt, GST_STATE_NULL);
}
- gst_object_unref (GST_OBJECT (elt));
}
+ if (elt != NULL)
+ gst_object_unref (GST_OBJECT (elt));
}
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 Tue Sep 23 05:51:56 2008
@@ -74,6 +74,7 @@
private:
void detect_devices ();
+ void detect_videotestsrc_devices ();
void detect_v4l2src_devices ();
void detect_dv1394src_devices ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]