[vlc-commits] dash: Allow bps methods to be called from a IAdaptationLogic*

Hugo Beauzée-Luyssen git at videolan.org
Thu Feb 2 14:40:23 CET 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Jan 25 17:39:24 2012 +0100| [466e3f4412eca748fc4cf6ce2e9499738be20ea9] | committer: Hugo Beauzée-Luyssen

dash: Allow bps methods to be called from a IAdaptationLogic*

This is the interface we use in the module file.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=466e3f4412eca748fc4cf6ce2e9499738be20ea9
---

 .../adaptationlogic/AbstractAdaptationLogic.cpp    |    4 ++--
 .../dash/adaptationlogic/AbstractAdaptationLogic.h |    4 ++--
 .../dash/adaptationlogic/IAdaptationLogic.h        |    6 +++++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp b/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
index dab9019..5d54848 100644
--- a/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
+++ b/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.cpp
@@ -47,11 +47,11 @@ void AbstractAdaptationLogic::downloadRateChanged    (long bpsAvg, long bpsLastC
     this->bpsAvg        = bpsAvg;
     this->bpsLastChunk  = bpsLastChunk;
 }
-long AbstractAdaptationLogic::getBpsAvg              ()
+long AbstractAdaptationLogic::getBpsAvg              () const
 {
     return this->bpsAvg;
 }
-long AbstractAdaptationLogic::getBpsLastChunk        ()
+long AbstractAdaptationLogic::getBpsLastChunk        () const
 {
     return this->bpsLastChunk;
 }
diff --git a/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h b/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
index 9187ea8..216f7f1 100644
--- a/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
+++ b/modules/stream_filter/dash/adaptationlogic/AbstractAdaptationLogic.h
@@ -47,8 +47,8 @@ namespace dash
 
                 virtual void                downloadRateChanged     (long bpsAvg, long bpsLastChunk);
 
-                long                        getBpsAvg               ();
-                long                        getBpsLastChunk         ();
+                long                        getBpsAvg               () const;
+                long                        getBpsLastChunk         () const;
 
             private:
                 int                     bpsAvg;
diff --git a/modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h b/modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
index ef08124..7a65716 100644
--- a/modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
+++ b/modules/stream_filter/dash/adaptationlogic/IAdaptationLogic.h
@@ -46,7 +46,11 @@ namespace dash
                 };
 
                 virtual dash::http::Chunk*  getNextChunk() throw(dash::exception::EOFException) = 0;
-
+                /**
+                 *  \return     The average bitrate in Bytes per second.
+                 */
+                virtual long                    getBpsAvg               () const = 0;
+                virtual long                    getBpsLastChunk         () const = 0;
         };
     }
 }



More information about the vlc-commits mailing list