ekiga r7816 - in trunk: lib/engine/audioinput lib/engine/audiooutput lib/engine/videoinput lib/gui src/gui



Author: ededu
Date: Wed Mar 25 17:50:34 2009
New Revision: 7816
URL: http://svn.gnome.org/viewvc/ekiga?rev=7816&view=rev

Log:
Fix "ekiga does not compile with ptlib compiled with --disable-tracing (#575433)", patch by Mounir Lamouri.

Modified:
   trunk/lib/engine/audioinput/audioinput-core.cpp
   trunk/lib/engine/audiooutput/audiooutput-core.cpp
   trunk/lib/engine/videoinput/videoinput-core.cpp
   trunk/lib/gui/xvwindow.cpp
   trunk/lib/gui/xwindow.cpp
   trunk/src/gui/main.cpp

Modified: trunk/lib/engine/audioinput/audioinput-core.cpp
==============================================================================
--- trunk/lib/engine/audioinput/audioinput-core.cpp	(original)
+++ trunk/lib/engine/audioinput/audioinput-core.cpp	Wed Mar 25 17:50:34 2009
@@ -177,12 +177,12 @@
   yield = true;
   PWaitAndSignal m(core_mutex);
   bool go_on = true;
-  
+
   for (std::set<AudioInputManager *>::iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
       go_on = visitor (*(*iter));
-}		      
+}
 
 void AudioInputCore::get_devices (std::vector <AudioInputDevice> & devices)
 {
@@ -190,19 +190,19 @@
   PWaitAndSignal m(core_mutex);
 
   devices.clear();
-  
+
   for (std::set<AudioInputManager *>::iterator iter = managers.begin ();
        iter != managers.end ();
        iter++)
     (*iter)->get_devices (devices);
 
-  if (PTrace::CanTrace(4)) {
-     for (std::vector<AudioInputDevice>::iterator iter = devices.begin ();
-         iter != devices.end ();
-         iter++) {
-      PTRACE(4, "AudioInputCore\tDetected Device: " << *iter);
-    }
+#if PTRACING
+  for (std::vector<AudioInputDevice>::iterator iter = devices.begin ();
+       iter != devices.end ();
+       iter++) {
+    PTRACE(4, "AudioInputCore\tDetected Device: " << *iter);
   }
+#endif
 
 }
 

Modified: trunk/lib/engine/audiooutput/audiooutput-core.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/audiooutput-core.cpp	(original)
+++ trunk/lib/engine/audiooutput/audiooutput-core.cpp	Wed Mar 25 17:50:34 2009
@@ -144,19 +144,19 @@
   PWaitAndSignal m_sec(core_mutex[secondary]);
 
   devices.clear();
-  
+
   for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
        iter != managers.end ();
        iter++)
     (*iter)->get_devices (devices);
 
-  if (PTrace::CanTrace(4)) {
-     for (std::vector<AudioOutputDevice>::iterator iter = devices.begin ();
-         iter != devices.end ();
-         iter++) {
-      PTRACE(4, "AudioOutputCore\tDetected Device: " << *iter);
-    }
+#if PTRACING
+  for (std::vector<AudioOutputDevice>::iterator iter = devices.begin ();
+       iter != devices.end ();
+       iter++) {
+    PTRACE(4, "AudioOutputCore\tDetected Device: " << *iter);
   }
+#endif
 
 }
 

Modified: trunk/lib/engine/videoinput/videoinput-core.cpp
==============================================================================
--- trunk/lib/engine/videoinput/videoinput-core.cpp	(original)
+++ trunk/lib/engine/videoinput/videoinput-core.cpp	Wed Mar 25 17:50:34 2009
@@ -188,7 +188,7 @@
 {
   PWaitAndSignal m(core_mutex);
   bool go_on = true;
-  
+
   for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
@@ -200,19 +200,19 @@
   PWaitAndSignal m(core_mutex);
 
   devices.clear();
-  
+
   for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
        iter != managers.end ();
        iter++)
     (*iter)->get_devices (devices);
 
-  if (PTrace::CanTrace(4)) {
-     for (std::vector<VideoInputDevice>::iterator iter = devices.begin ();
-         iter != devices.end ();
-         iter++) {
-      PTRACE(4, "VidInputCore\tDetected Device: " << *iter);
-    }
+#if PTRACING
+  for (std::vector<VideoInputDevice>::iterator iter = devices.begin ();
+       iter != devices.end ();
+       iter++) {
+    PTRACE(4, "VidInputCore\tDetected Device: " << *iter);
   }
+#endif
 }
 
 void VideoInputCore::set_device(const VideoInputDevice & device, int channel, VideoInputFormat format)

Modified: trunk/lib/gui/xvwindow.cpp
==============================================================================
--- trunk/lib/gui/xvwindow.cpp	(original)
+++ trunk/lib/gui/xvwindow.cpp	Wed Mar 25 17:50:34 2009
@@ -409,24 +409,25 @@
           continue;
         }
 
-        if (PTrace::CanTrace (4)) 
-          DumpCapabilities (candidateXVPort);
+#if PTRACING
+        DumpCapabilities (candidateXVPort);
+#endif
 
         // Check if the Port supports YV12/YUV colorspace
         supportsYV12 = false;
-        xviformats = XvListImageFormats (_display, candidateXVPort, &numXviformats); 
+        xviformats = XvListImageFormats (_display, candidateXVPort, &numXviformats);
 
         for (j = 0 ; j < numXviformats ; j++)
-          if (xviformats [j].id == GUID_YV12_PLANAR) 
+          if (xviformats [j].id == GUID_YV12_PLANAR)
             supportsYV12 = true;
 
-        if (xviformats) 
+        if (xviformats)
           XFree (xviformats);
 
         if (!supportsYV12) {
 
           PTRACE(4, "XVideo\tPort " << candidateXVPort << " does not support YV12 colorspace");
-        } 
+        }
         else {
 
           result = XvGrabPort (_display, candidateXVPort, CurrentTime);
@@ -435,7 +436,7 @@
             PTRACE(4, "XVideo\tGrabbed Port: " << candidateXVPort);
             XvFreeAdaptorInfo (xvainfo);
             grabbedPorts.insert(candidateXVPort);
-            
+
             return candidateXVPort;
           } 
           else {
@@ -683,16 +684,18 @@
         _useShm = false;
       }
     }
-  
-    if ( (_useShm) && (PTrace::CanTrace (4)) ) {
+
+#if PTRACING
+    if (_useShm) {
       int j = 0;
-      PTRACE(4, "XVideo\tCreated XvImage (" << _XVImage[i]->width << "x" << _XVImage[i]->height 
-            << ", data size: " << _XVImage[i]->data_size << ", num_planes: " << _XVImage[i]->num_planes);
-  
-      for (j = 0 ; j < _XVImage[i]->num_planes ; j++) 
+      PTRACE(4, "XVideo\tCreated XvImage (" << _XVImage[i]->width << "x" << _XVImage[i]->height
+             << ", data size: " << _XVImage[i]->data_size << ", num_planes: " << _XVImage[i]->num_planes);
+
+      for (j = 0 ; j < _XVImage[i]->num_planes ; j++)
         PTRACE(4, "XVideo\t  Plane " << j << ": pitch=" << _XVImage[i]->pitches [j] << ", offset=" << _XVImage[i]->offsets [j]);
     }
-  
+#endif
+
     if (_useShm) {
       _XShmInfo[i].shmid = shmget (IPC_PRIVATE, _XVImage[i]->data_size, IPC_CREAT | 0777);
       if (_XShmInfo[i].shmid < 0) {

Modified: trunk/lib/gui/xwindow.cpp
==============================================================================
--- trunk/lib/gui/xwindow.cpp	(original)
+++ trunk/lib/gui/xwindow.cpp	Wed Mar 25 17:50:34 2009
@@ -200,8 +200,9 @@
   PTRACE(4, "X11\tInitiasing new X11 window with " << windowWidth << "x" << windowHeight << " at " << x << "," << y);
   XLockDisplay (_display);
 
-  if (PTrace::CanTrace (4)) 
-    DumpVisuals();
+#if PTRACING
+  DumpVisuals();
+#endif
 
   if (!CreateAtomsAndWindow(gc, x, y, windowWidth, windowHeight)) {
     XUnlockDisplay(_display);
@@ -1162,10 +1163,10 @@
     if (visuals != NULL) {
         for (i = 0; i < nbVisuals; i++) {
             PTRACE(4, "X11\tVisual #"  << i << " ID: " << visuals[i].visualid
-                       << " Class: "   << visuals[i].c_class  
+                       << " Class: "   << visuals[i].c_class
                        << " BPRGB: "     << visuals[i].bits_per_rgb
                        << " Depth: "   << visuals[i].depth << std::hex
-                       << " Red: 0x"   << visuals[i].red_mask 
+                       << " Red: 0x"   << visuals[i].red_mask
                        << " Green: 0x" << visuals[i].green_mask
                        << " Blue 0x"   << visuals[i].blue_mask << std::dec);
         }

Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp	(original)
+++ trunk/src/gui/main.cpp	Wed Mar 25 17:50:34 2009
@@ -4453,10 +4453,13 @@
   /* Ekiga initialisation */
   static GnomeMeeting instance;
 
+#if PTRACING
   if (debug_level != 0)
     PTrace::Initialise (PMAX (PMIN (5, debug_level), 0), NULL,
 			PTrace::Timestamp | PTrace::Thread
 			| PTrace::Blocks | PTrace::DateAndTime);
+#endif
+
 #ifdef EKIGA_REVISION
   PTRACE(1, "Ekiga SVN revision: " << EKIGA_REVISION);
 #endif



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