changeset 27886:2333ab5777eb

Handle sources for Windows better.
author maiku@pidgin.im
date Thu, 13 Aug 2009 07:21:12 +0000
parents f77978e6968e
children 56770cc3287d
files pidgin/gtkmedia.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkmedia.c	Thu Aug 13 07:12:02 2009 +0000
+++ b/pidgin/gtkmedia.c	Thu Aug 13 07:21:12 2009 +0000
@@ -882,6 +882,14 @@
 	GstPad *ghost;
 	GstCaps *caps;
 
+#ifdef _WIN32
+	/* autovideosrc doesn't pick ksvideosrc for some reason */
+	src = gst_element_factory_make("ksvideosrc", NULL);
+	if (src == NULL)
+		src = gst_element_factory_make("dshowvideosrc", NULL);
+	if (src == NULL)
+		src = gst_element_factory_make("autovideosrc", NULL);
+#else
 	src = gst_element_factory_make("gconfvideosrc", NULL);
 	if (src == NULL)
 		src = gst_element_factory_make("autovideosrc", NULL);
@@ -889,10 +897,7 @@
 		src = gst_element_factory_make("v4l2src", NULL);
 	if (src == NULL)
 		src = gst_element_factory_make("v4lsrc", NULL);
-	if (src == NULL)
-		src = gst_element_factory_make("ksvideosrc", NULL);
-	if (src == NULL)
-		src = gst_element_factory_make("dshowvideosrc", NULL);
+#endif
 	if (src == NULL) {
 		purple_debug_error("gtkmedia", "Unable to find a suitable "
 				"element for the default video source.\n");