ekiga r7637 - in trunk: . lib/engine/components/opal



Author: dsandras
Date: Tue Feb  3 19:27:20 2009
New Revision: 7637
URL: http://svn.gnome.org/viewvc/ekiga?rev=7637&view=rev

Log:
The call setup is now threaded which makes Ekiga GUI finally more
reactive again. 
We still keep the main call setup in the main thread, which allows
cancelling a call before it fails or succeeds.


Modified:
   trunk/ChangeLog
   trunk/lib/engine/components/opal/opal-call.cpp
   trunk/lib/engine/components/opal/opal-call.h

Modified: trunk/lib/engine/components/opal/opal-call.cpp
==============================================================================
--- trunk/lib/engine/components/opal/opal-call.cpp	(original)
+++ trunk/lib/engine/components/opal/opal-call.cpp	Tue Feb  3 19:27:20 2009
@@ -48,6 +48,31 @@
 
 using namespace Opal;
 
+class CallSetup : public PThread
+{
+  PCLASSINFO(CallSetup, PThread);
+
+public:
+  CallSetup (Opal::Call & _call,
+             OpalConnection & _connection)
+    : PThread (1000, AutoDeleteThread),
+      call (_call),
+      connection (_connection)
+  {
+    this->Resume ();
+  }
+
+  void Main ()
+  {
+    call.DoSetUp (connection);
+  }
+
+private:
+  Opal::Call & call;
+  OpalConnection & connection;
+};
+
+
 Opal::Call::Call (OpalManager & _manager, Ekiga::ServiceCore & _core)
   : OpalCall (_manager), Ekiga::Call (), core (_core),
     call_setup(false),outgoing(true),jitter(0)
@@ -521,7 +546,9 @@
   cleared.connect (sigc::mem_fun (this, &Opal::Call::on_cleared_call));
   missed.connect (sigc::mem_fun (this, &Opal::Call::on_missed_call));
 
-  return OpalCall::OnSetUp (connection);
+  new CallSetup (*this, connection);
+
+  return true; 
 }
 
 
@@ -637,6 +664,13 @@
 
 
 void
+Opal::Call::DoSetUp (OpalConnection & connection)
+{
+  OpalCall::OnSetUp (connection);
+}
+
+
+void
 Opal::Call::OnNoAnswerTimeout (PTimer &,
                                INT) 
 {

Modified: trunk/lib/engine/components/opal/opal-call.h
==============================================================================
--- trunk/lib/engine/components/opal/opal-call.h	(original)
+++ trunk/lib/engine/components/opal/opal-call.h	Tue Feb  3 19:27:20 2009
@@ -174,6 +174,8 @@
 
     void OnRTPStatistics (const OpalConnection & connection, const RTP_Session & session);
 
+    void DoSetUp (OpalConnection & connection);
+
 private:
 
     PBoolean OnEstablished (OpalConnection & connection);



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