[ekiga] videoutput: new parameter device_opened() signal



commit 5252ec14c8f65083a3ec6e93b08f14147f10d810
Author: VÃctor Manuel JÃquez Leal <vjaquez igalia com>
Date:   Wed Sep 5 17:14:22 2012 -0500

    videoutput: new parameter device_opened() signal
    
    This patch is traversal to all the videooutput subsystem.
    
    It adds a new parameter to the on_device_opened() signal. This new parameter
    indicates if there is an extended stream in the connection.
    
    With it, the UI can enable the option to display the extended stream in the
    video widget.

 .../videooutput-manager-common.cpp                 |   11 +++++++----
 .../videooutput-manager-common.h                   |    2 +-
 .../dx-videooutput/videooutput-manager-dx.cpp      |    6 +++---
 .../dx-videooutput/videooutput-manager-dx.h        |    2 +-
 .../x-videooutput/videooutput-manager-x.cpp        |   10 +++++++---
 .../x-videooutput/videooutput-manager-x.h          |    2 +-
 lib/engine/gui/gtk-frontend/call-window.cpp        |    4 +++-
 lib/engine/videooutput/videooutput-core.cpp        |   11 ++++++++---
 lib/engine/videooutput/videooutput-core.h          |    9 +++++++--
 lib/engine/videooutput/videooutput-manager.h       |    3 ++-
 10 files changed, 40 insertions(+), 20 deletions(-)
---
diff --git a/lib/engine/components/common-videooutput/videooutput-manager-common.cpp b/lib/engine/components/common-videooutput/videooutput-manager-common.cpp
index 2daee9b..aa3398a 100644
--- a/lib/engine/components/common-videooutput/videooutput-manager-common.cpp
+++ b/lib/engine/components/common-videooutput/videooutput-manager-common.cpp
@@ -288,11 +288,14 @@ void GMVideoOutputManager::update_gui_device ()
   last_frame.ext_stream_active = current_frame.ext_stream_active;
 
   Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager::device_closed_in_main, this));
-  Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager::device_opened_in_main, this, current_frame.accel, current_frame.mode, current_frame.zoom, current_frame.both_streams_active));
 
+  Ekiga::Runtime::run_in_main
+    (boost::bind (&GMVideoOutputManager::device_opened_in_main, this,
+                  current_frame.accel, current_frame.mode, current_frame.zoom,
+                  current_frame.both_streams_active,
+                  current_frame.ext_stream_active));
 }
 
-
 bool
 GMVideoOutputManager::frame_display_change_needed ()
 {
@@ -395,9 +398,9 @@ void
 GMVideoOutputManager::device_opened_in_main (Ekiga::VideoOutputAccel accel,
 					     Ekiga::VideoOutputMode mode,
 					     unsigned zoom,
-					     bool both)
+					     bool both, bool ext)
 {
-  device_opened (accel, mode, zoom, both);
+  device_opened (accel, mode, zoom, both, ext);
 }
 
 void
diff --git a/lib/engine/components/common-videooutput/videooutput-manager-common.h b/lib/engine/components/common-videooutput/videooutput-manager-common.h
index e3b86f8..7daaa29 100644
--- a/lib/engine/components/common-videooutput/videooutput-manager-common.h
+++ b/lib/engine/components/common-videooutput/videooutput-manager-common.h
@@ -270,7 +270,7 @@
     void device_opened_in_main (Ekiga::VideoOutputAccel accel,
 				Ekiga::VideoOutputMode mode,
 				unsigned zoom,
-				bool both);
+				bool both, bool ext);
 
     void device_closed_in_main ();
 
diff --git a/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp b/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
index f199e0f..3d9423e 100644
--- a/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
+++ b/lib/engine/components/dx-videooutput/videooutput-manager-dx.cpp
@@ -201,7 +201,7 @@ GMVideoOutputManager_dx::setup_frame_display ()
   }
   else {
     current_frame.accel = Ekiga::VO_ACCEL_ALL; 
-    Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager_dx::device_opened_in_main, this, current_frame.accel, current_frame.mode, current_frame.zoom, current_frame.both_streams_active));
+    Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager_dx::device_opened_in_main, this, current_frame.accel, current_frame.mode, current_frame.zoom, current_frame.both_streams_active, current_frame.ext_stream_active));
   }
 }
 
@@ -271,9 +271,9 @@ void
 GMVideoOutputManager_dx::device_opened_in_main (Ekiga::VideoOutputAccel accel,
 		       Ekiga::VideoOutputMode mode,
 		       unsigned zoom,
-		       bool both)
+		       bool both, bool ext)
 {
-  device_opened (accel, mode, zoom, both);
+  device_opened (accel, mode, zoom, both, ext);
 }
 
 void
diff --git a/lib/engine/components/dx-videooutput/videooutput-manager-dx.h b/lib/engine/components/dx-videooutput/videooutput-manager-dx.h
index 40e7d90..d7e2e9c 100644
--- a/lib/engine/components/dx-videooutput/videooutput-manager-dx.h
+++ b/lib/engine/components/dx-videooutput/videooutput-manager-dx.h
@@ -88,7 +88,7 @@
   void device_opened_in_main (Ekiga::VideoOutputAccel accel,
 			      Ekiga::VideoOutputMode mode,
 			      unsigned zoom,
-			      bool both);
+			      bool both, bool ext);
 
   void device_closed_in_main ();
 
diff --git a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
index 9334e31..cddabd0 100644
--- a/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
+++ b/lib/engine/components/x-videooutput/videooutput-manager-x.cpp
@@ -425,7 +425,11 @@ GMVideoOutputManager_x::setup_frame_display ()
     Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager_x::device_error_in_main, this, Ekiga::VO_ERROR));
   }
   else {
-    Ekiga::Runtime::run_in_main (boost::bind (&GMVideoOutputManager_x::device_opened_in_main, this, current_frame.accel, current_frame.mode, current_frame.zoom, current_frame.both_streams_active));
+    Ekiga::Runtime::run_in_main
+      (boost::bind (&GMVideoOutputManager_x::device_opened_in_main, this,
+                    current_frame.accel, current_frame.mode, current_frame.zoom,
+                    current_frame.both_streams_active,
+                    current_frame.ext_stream_active));
   }
 }
 
@@ -536,9 +540,9 @@ void
 GMVideoOutputManager_x::device_opened_in_main (Ekiga::VideoOutputAccel accel,
 					       Ekiga::VideoOutputMode mode,
 					       unsigned zoom,
-					       bool both)
+					       bool both, bool ext)
 {
-  device_opened (accel, mode, zoom, both);
+  device_opened (accel, mode, zoom, both, ext);
 }
 
 void
diff --git a/lib/engine/components/x-videooutput/videooutput-manager-x.h b/lib/engine/components/x-videooutput/videooutput-manager-x.h
index 239932f..16c429a 100644
--- a/lib/engine/components/x-videooutput/videooutput-manager-x.h
+++ b/lib/engine/components/x-videooutput/videooutput-manager-x.h
@@ -96,7 +96,7 @@ private:
   void device_opened_in_main (Ekiga::VideoOutputAccel accel,
 			      Ekiga::VideoOutputMode mode,
 			      unsigned zoom,
-			      bool both);
+			      bool both, bool ext);
 
   void device_closed_in_main ();
 
diff --git a/lib/engine/gui/gtk-frontend/call-window.cpp b/lib/engine/gui/gtk-frontend/call-window.cpp
index 4a4ae81..c380ff6 100644
--- a/lib/engine/gui/gtk-frontend/call-window.cpp
+++ b/lib/engine/gui/gtk-frontend/call-window.cpp
@@ -263,6 +263,7 @@ static void on_videooutput_device_opened_cb (Ekiga::VideoOutputManager & /* mana
                                              Ekiga::VideoOutputMode mode,
                                              unsigned zoom,
                                              bool both_streams,
+                                             G_GNUC_UNUSED bool ext_stream,
                                              gpointer self);
 
 static void on_videooutput_device_closed_cb (Ekiga::VideoOutputManager & /* manager */,
@@ -732,6 +733,7 @@ on_videooutput_device_opened_cb (Ekiga::VideoOutputManager & /* manager */,
                                  Ekiga::VideoOutputMode mode,
                                  unsigned zoom,
                                  bool both_streams,
+                                 G_GNUC_UNUSED bool ext_stream,
                                  gpointer self)
 {
   EkigaCallWindow *cw = EKIGA_CALL_WINDOW (self);
@@ -2211,7 +2213,7 @@ ekiga_call_window_connect_engine_signals (EkigaCallWindow *cw)
   /* New Display Engine signals */
   boost::shared_ptr<Ekiga::VideoOutputCore> videooutput_core = cw->priv->core->get<Ekiga::VideoOutputCore> ("videooutput-core");
 
-  conn = videooutput_core->device_opened.connect (boost::bind (&on_videooutput_device_opened_cb, _1, _2, _3, _4, _5, (gpointer) cw));
+  conn = videooutput_core->device_opened.connect (boost::bind (&on_videooutput_device_opened_cb, _1, _2, _3, _4, _5, _6, (gpointer) cw));
   cw->priv->connections.push_back (conn);
 
   conn = videooutput_core->device_closed.connect (boost::bind (&on_videooutput_device_closed_cb, _1, (gpointer) cw));
diff --git a/lib/engine/videooutput/videooutput-core.cpp b/lib/engine/videooutput/videooutput-core.cpp
index 55392f9..497c136 100644
--- a/lib/engine/videooutput/videooutput-core.cpp
+++ b/lib/engine/videooutput/videooutput-core.cpp
@@ -87,7 +87,7 @@ void VideoOutputCore::add_manager (VideoOutputManager &manager)
   managers.insert (&manager);
   manager_added (manager);
 
-  manager.device_opened.connect (boost::bind (&VideoOutputCore::on_device_opened, this, _1, _2, _3, _4, &manager));
+  manager.device_opened.connect (boost::bind (&VideoOutputCore::on_device_opened, this, _1, _2, _3, _4, _5, &manager));
   manager.device_closed.connect (boost::bind (&VideoOutputCore::on_device_closed, this, &manager));
   manager.device_error.connect (boost::bind (&VideoOutputCore::on_device_error, this, _1, &manager));
   manager.fullscreen_mode_changed.connect (boost::bind (&VideoOutputCore::on_fullscreen_mode_changed, this, _1, &manager));
@@ -202,9 +202,14 @@ void VideoOutputCore::set_display_info (const DisplayInfo & _display_info)
 }
 
 
-void VideoOutputCore::on_device_opened (VideoOutputAccel videooutput_accel, VideoOutputMode mode, unsigned zoom, bool both_streams, VideoOutputManager *manager)
+void VideoOutputCore::on_device_opened (VideoOutputAccel videooutput_accel,
+                                        VideoOutputMode mode,
+                                        unsigned zoom,
+                                        bool both_streams,
+                                        bool ext_stream,
+                                        VideoOutputManager *manager)
 {
-  device_opened (*manager, videooutput_accel, mode, zoom, both_streams);
+  device_opened (*manager, videooutput_accel, mode, zoom, both_streams, ext_stream);
 }
 
 void VideoOutputCore::on_device_closed ( VideoOutputManager *manager)
diff --git a/lib/engine/videooutput/videooutput-core.h b/lib/engine/videooutput/videooutput-core.h
index 79ba042..b8968da 100644
--- a/lib/engine/videooutput/videooutput-core.h
+++ b/lib/engine/videooutput/videooutput-core.h
@@ -165,7 +165,7 @@ namespace Ekiga
 
       /** See videooutput-manager.h for the API
        */
-      boost::signal5<void, VideoOutputManager &, VideoOutputAccel, VideoOutputMode, unsigned, bool> device_opened;
+      boost::signal6<void, VideoOutputManager &, VideoOutputAccel, VideoOutputMode, unsigned, bool, bool> device_opened;
       boost::signal1<void, VideoOutputManager &> device_closed;
       boost::signal2<void, VideoOutputManager &, VideoOutputErrorCodes> device_error;
       boost::signal2<void, VideoOutputManager &, VideoOutputFSToggle> fullscreen_mode_changed;
@@ -173,7 +173,12 @@ namespace Ekiga
 
 
   private:
-      void on_device_opened (VideoOutputAccel videooutput_accel, VideoOutputMode mode, unsigned zoom, bool both_streams, VideoOutputManager *manager);
+      void on_device_opened (VideoOutputAccel videooutput_accel,
+                             VideoOutputMode mode,
+                             unsigned zoom,
+                             bool both_streams,
+                             bool ext_stream,
+                             VideoOutputManager *manager);
       void on_device_closed (VideoOutputManager *manager);
       void on_device_error (VideoOutputErrorCodes error_code, VideoOutputManager *manager);
       void on_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager);
diff --git a/lib/engine/videooutput/videooutput-manager.h b/lib/engine/videooutput/videooutput-manager.h
index a96d8c0..c9e22b5 100644
--- a/lib/engine/videooutput/videooutput-manager.h
+++ b/lib/engine/videooutput/videooutput-manager.h
@@ -105,8 +105,9 @@ namespace Ekiga
        * @param mode the mode in which the device was initially opened.
        * @param zoom the initial zoom level when de device was opened.
        * @param both_streams if a frame from both local and remote stream has been received.
+       * @param ext_stream if a frame from an extended video stream has been received.
        */
-      boost::signal4<void, VideoOutputAccel, VideoOutputMode, unsigned, bool> device_opened;
+      boost::signal5<void, VideoOutputAccel, VideoOutputMode, unsigned, bool, bool> device_opened;
 
       /** This signal is emitted when a video output device is closed.
        */



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