gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11499: Don't try to probe for input


From: Rob Savoye
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11499: Don't try to probe for input devices if we have an incomplete Gstreamer installation.
Date: Wed, 09 Sep 2009 13:43:18 -0600
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11499
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Wed 2009-09-09 13:43:18 -0600
message:
  Don't try to probe for input devices if we have an incomplete Gstreamer 
installation.
modified:
  libmedia/Makefile.am
  libmedia/gst/AudioInputGst.cpp
  libmedia/gst/VideoInputGst.cpp
=== modified file 'libmedia/Makefile.am'
--- a/libmedia/Makefile.am      2009-08-28 11:03:35 +0000
+++ b/libmedia/Makefile.am      2009-09-09 19:43:18 +0000
@@ -35,6 +35,7 @@
        -I$(top_srcdir)/libbase \
        -I$(top_srcdir)/libcore \
        $(PTHREAD_CFLAGS) \
+       $(LIBXML2_CFLAGS) \
        $(OPENGL_CFLAGS) \
        $(PNG_CFLAGS) \
        $(GLIB_CFLAGS) \

=== modified file 'libmedia/gst/AudioInputGst.cpp'
--- a/libmedia/gst/AudioInputGst.cpp    2009-08-07 20:51:26 +0000
+++ b/libmedia/gst/AudioInputGst.cpp    2009-09-09 19:43:18 +0000
@@ -80,12 +80,12 @@
             _numdevs += 1;
         }
         
-        
+#ifdef HAS_GSTREAMER_PLUGINS_BASE
         //detect pulse audio sources
         GstPropertyProbe *probe;
         GValueArray *devarr;
         element = NULL;
-        
+
         element = gst_element_factory_make ("pulsesrc", "pulsesrc");
         probe = GST_PROPERTY_PROBE (element);
         devarr = gst_property_probe_probe_and_get_values_name (probe, 
"device");
@@ -98,7 +98,7 @@
             gst_element_set_state (element, GST_STATE_PLAYING);
             g_object_get (element, "device-name", &dev_name, NULL);
             gst_element_set_state (element, GST_STATE_NULL);
-            if ((g_strcmp0(dev_name, "null") == 0) ||
+            if ((strcmp(dev_name, "null") == 0) ||
                     (std::strstr(dev_name, "Monitor") != NULL)) {
                 log_trace("No pulse audio input devices.");
             }
@@ -117,6 +117,7 @@
         if (devarr) {
             g_value_array_free (devarr);
         }
+#endif
     }
     
     bool
@@ -266,7 +267,7 @@
             audio->_audioSourceBin = NULL;
         }
         
-        if (g_strcmp0(audio->_deviceName, "audiotest") == 0) {
+        if (strcmp(audio->_deviceName, "audiotest") == 0) {
             log_trace("%s: You don't have any mics chosen, using audiotestsrc",
                 __FUNCTION__);
             audio->_audioSourceBin = gst_parse_bin_from_description (
@@ -324,7 +325,7 @@
     {
         GError *error = NULL;
         gchar *command = NULL;
-        if(g_strcmp0(audio->_deviceName, "audiotest") == 0) {
+        if(strcmp(audio->_deviceName, "audiotest") == 0) {
             log_trace("%s: You don't have any mics chosen, using audiotestsrc",
                 __FUNCTION__);
             audio->_audioSourceBin = gst_parse_bin_from_description (

=== modified file 'libmedia/gst/VideoInputGst.cpp'
--- a/libmedia/gst/VideoInputGst.cpp    2009-08-28 11:45:25 +0000
+++ b/libmedia/gst/VideoInputGst.cpp    2009-09-09 19:43:18 +0000
@@ -373,6 +373,7 @@
         cam.setProductName(g_strdup_printf("videotest"));
     }
     
+#ifdef HAS_GSTREAMER_PLUGINS_BASE
     //find v4l devices
     GstPropertyProbe *probe;
     GValueArray *devarr;
@@ -390,7 +391,7 @@
         gst_element_set_state (element, GST_STATE_PLAYING);
         g_object_get (element, "device-name", &dev_name, NULL);
         gst_element_set_state (element, GST_STATE_NULL);
-        if (g_strcmp0(dev_name, "null") == 0) {
+        if (strcmp(dev_name, "null") == 0) {
             log_debug("No v4l video sources. Checking for other vid inputs");
         }
         else { 
@@ -428,7 +429,7 @@
         gst_element_set_state (element, GST_STATE_PLAYING);
         g_object_get (element, "device-name", &dev_name, NULL);
         gst_element_set_state (element, GST_STATE_NULL);
-        if (g_strcmp0(dev_name, "null") == 0) {
+        if (strcmp(dev_name, "null") == 0) {
             log_debug("no v4l2 video sources found.");
         }
         else { 
@@ -447,6 +448,7 @@
     if (devarr) {
         g_value_array_free (devarr);
     }
+#endif
 }
 
 
@@ -1022,7 +1024,7 @@
         
         //check here to make sure the fps value is supported (only valid for
         //non test sources)
-        if (! g_strcmp0(webcam->_webcamDevice->getGstreamerSrc(), 
"videotestsrc") == 0) {
+        if (! strcmp(webcam->_webcamDevice->getGstreamerSrc(), "videotestsrc") 
== 0) {
             int newFps = _fps;
             if (checkForSupportedFramerate(webcam, newFps)) {
                 log_debug("checkforsupportedfr returned true");


reply via email to

[Prev in Thread] Current Thread [Next in Thread]