[ekiga] Opal::CallManager: Do not hardcode the video clock rate.



commit c757eef9298417dc450140911bf7ae85ad0f7895
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Dec 28 15:11:21 2014 +0100

    Opal::CallManager: Do not hardcode the video clock rate.

 lib/engine/components/opal/opal-call-manager.cpp |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-call-manager.cpp 
b/lib/engine/components/opal/opal-call-manager.cpp
index 7646e80..c572bd4 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -790,14 +790,10 @@ void CallManager::get_video_options (CallManager::VideoOptions & options) const
         g_error ("Cannot find video size");
       options.size = j;
 
-      options.maximum_frame_rate =
-        (int) (90000 / media_format.GetOptionInteger (OpalVideoFormat::FrameTimeOption ()));
-      options.maximum_bitrate =
-        (int) (media_format.GetOptionInteger (OpalVideoFormat::MaxBitRateOption ()) / 1000);
-      options.maximum_transmitted_bitrate =
-        (int) (media_format.GetOptionInteger (OpalVideoFormat::TargetBitRateOption ()) / 1000);
-      options.temporal_spatial_tradeoff =
-        media_format.GetOptionInteger (OpalVideoFormat::TemporalSpatialTradeOffOption ());
+      options.maximum_frame_rate = (int) (media_format.GetClockRate () / media_format.GetFrameTime ());
+      options.maximum_bitrate = (int) (media_format.GetOptionInteger (OpalVideoFormat::MaxBitRateOption ()) 
/ 1000);
+      options.maximum_transmitted_bitrate = (int) (media_format.GetOptionInteger 
(OpalVideoFormat::TargetBitRateOption ()) / 1000);
+      options.temporal_spatial_tradeoff = media_format.GetOptionInteger 
(OpalVideoFormat::TemporalSpatialTradeOffOption ());
 
       int evr = media_format.GetOptionInteger (OpalVideoFormat::OpalVideoFormat::ContentRoleMaskOption ());
       switch (evr) {


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