[ekiga/ds-opal-refactoring] H323: Moved setting handling from EndPoint to CallManager.



commit f053f14f102161de61226633d4c1a9d244909dea
Author: Damien Sandras <dsandras seconix com>
Date:   Sat Mar 21 19:02:16 2015 +0100

    H323: Moved setting handling from EndPoint to CallManager.

 lib/engine/components/opal/h323-call-manager.cpp   |    5 +++--
 .../components/opal/process/h323-endpoint.cpp      |    8 --------
 lib/engine/components/opal/process/h323-endpoint.h |    4 +---
 3 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/lib/engine/components/opal/h323-call-manager.cpp 
b/lib/engine/components/opal/h323-call-manager.cpp
index 0f68f80..deb0be7 100644
--- a/lib/engine/components/opal/h323-call-manager.cpp
+++ b/lib/engine/components/opal/h323-call-manager.cpp
@@ -184,11 +184,12 @@ void Opal::H323::CallManager::setup (const std::string & setting)
   }
   if (setting.empty () || setting == "maximum-video-tx-bitrate") {
 
-    int maximum_video_tx_bitrate = video_codecs_settings->get_int ("maximum-video-tx-bitrate");
     // maximum_video_tx_bitrate is the max video bitrate specified by the user
     // add to it 10% (approx.) accounting for audio,
     // and multiply it by 10 as needed by SetInitialBandwidth
-    h323_endpoint.set_initial_bandwidth (maximum_video_tx_bitrate * 11);
+    int maximum_video_tx_bitrate = video_codecs_settings->get_int ("maximum-video-tx-bitrate");
+    h323_endpoint.SetInitialBandwidth (OpalBandwidth::Tx, maximum_video_tx_bitrate > 0 ? 
maximum_video_tx_bitrate * 11 : 100000);
+    PTRACE (4, "Opal::H323::EndPoint\tSet maximum/initial tx bandwidth to " << maximum_video_tx_bitrate * 
11);
   }
   if (setting.empty () || setting == "enable-h245-tunneling") {
 
diff --git a/lib/engine/components/opal/process/h323-endpoint.cpp 
b/lib/engine/components/opal/process/h323-endpoint.cpp
index 170ff92..299359e 100644
--- a/lib/engine/components/opal/process/h323-endpoint.cpp
+++ b/lib/engine/components/opal/process/h323-endpoint.cpp
@@ -193,14 +193,6 @@ Opal::H323::EndPoint::StartListener (unsigned port)
 
 
 void
-Opal::H323::EndPoint::set_initial_bandwidth (unsigned bitrate)
-{
-  SetInitialBandwidth (OpalBandwidth::Tx, bitrate > 0 ? bitrate : 100000);
-  PTRACE (4, "Opal::H323::EndPoint\tSet maximum/initial tx bandwidth to " << bitrate);
-}
-
-
-void
 Opal::H323::EndPoint::EnableAccount (Account& account)
 {
   new GatekeeperHandler (account, *this, true);
diff --git a/lib/engine/components/opal/process/h323-endpoint.h 
b/lib/engine/components/opal/process/h323-endpoint.h
index d1d9fe6..7990a22 100644
--- a/lib/engine/components/opal/process/h323-endpoint.h
+++ b/lib/engine/components/opal/process/h323-endpoint.h
@@ -74,14 +74,12 @@ namespace Opal {
 
       bool StartListener (unsigned port);
 
-      void set_initial_bandwidth (unsigned max_tx_video_bitrate);
-
-
       /* Enable / Disable accounts. The account given as argument
        * will be updated to reflect the current account state once
        * the operation has been successful.
        */
       void EnableAccount (Account & account);
+
       void DisableAccount (Account & account);
 
       bool UseGatekeeper (const PString & address = PString::Empty (),


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