ekiga r7817 - in branches/gnome-2-26: lib/engine/audioinput lib/engine/audiooutput lib/engine/videoinput lib/gui src/gui



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

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

Modified:
   branches/gnome-2-26/lib/engine/audioinput/audioinput-core.cpp
   branches/gnome-2-26/lib/engine/audiooutput/audiooutput-core.cpp
   branches/gnome-2-26/lib/engine/videoinput/videoinput-core.cpp
   branches/gnome-2-26/lib/gui/xvwindow.cpp
   branches/gnome-2-26/lib/gui/xwindow.cpp
   branches/gnome-2-26/src/gui/main.cpp

Modified: branches/gnome-2-26/lib/engine/audioinput/audioinput-core.cpp
==============================================================================
--- branches/gnome-2-26/lib/engine/audioinput/audioinput-core.cpp	(original)
+++ branches/gnome-2-26/lib/engine/audioinput/audioinput-core.cpp	Wed Mar 25 17:51:31 2009
@@ -178,12 +178,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)
 {
@@ -191,19 +191,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: branches/gnome-2-26/lib/engine/audiooutput/audiooutput-core.cpp
==============================================================================
--- branches/gnome-2-26/lib/engine/audiooutput/audiooutput-core.cpp	(original)
+++ branches/gnome-2-26/lib/engine/audiooutput/audiooutput-core.cpp	Wed Mar 25 17:51:31 2009
@@ -145,19 +145,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: branches/gnome-2-26/lib/engine/videoinput/videoinput-core.cpp
==============================================================================
--- branches/gnome-2-26/lib/engine/videoinput/videoinput-core.cpp	(original)
+++ branches/gnome-2-26/lib/engine/videoinput/videoinput-core.cpp	Wed Mar 25 17:51:31 2009
@@ -189,7 +189,7 @@
 {
   PWaitAndSignal m(core_mutex);
   bool go_on = true;
-  
+
   for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
        iter != managers.end () && go_on;
        iter++)
@@ -201,19 +201,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: branches/gnome-2-26/lib/gui/xvwindow.cpp
==============================================================================
--- branches/gnome-2-26/lib/gui/xvwindow.cpp	(original)
+++ branches/gnome-2-26/lib/gui/xvwindow.cpp	Wed Mar 25 17:51:31 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: branches/gnome-2-26/lib/gui/xwindow.cpp
==============================================================================
--- branches/gnome-2-26/lib/gui/xwindow.cpp	(original)
+++ branches/gnome-2-26/lib/gui/xwindow.cpp	Wed Mar 25 17:51:31 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: branches/gnome-2-26/src/gui/main.cpp
==============================================================================
--- branches/gnome-2-26/src/gui/main.cpp	(original)
+++ branches/gnome-2-26/src/gui/main.cpp	Wed Mar 25 17:51:31 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]