sipxmedialib  Version 3.3
MpJitterBufferEstimation.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2008 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // $$
10 
11 // Author: Alexander Chemeris <Alexander.Chemeris AT SIPez DOT com>
12 
13 #ifndef _MpJitterBufferEstimation_h_
14 #define _MpJitterBufferEstimation_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
18 #include <os/OsIntTypes.h>
19 #include <os/OsStatus.h>
20 #include <utl/UtlString.h>
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
30 struct RtpHeader;
31 
36 {
37 /* //////////////////////////////// PUBLIC //////////////////////////////// */
38 public:
39 
40 /* =============================== CREATORS =============================== */
42 
43 
46 
48  virtual OsStatus init(int samplerate) = 0;
53  static MpJitterBufferEstimation *createJbe(const UtlString &algName = "");
64 
65 /* ============================= MANIPULATORS ============================= */
67 
68 
70  virtual OsStatus update(const RtpHeader *rtp,
71  uint32_t cur_rtp_timestamp,
72  uint32_t cur_playback_time,
73  int32_t *hint) = 0;
74 
76  static void setDefaultAlgorithm(const UtlString& name);
86  virtual void reset() = 0;
95 
96 /* ============================== ACCESSORS =============================== */
98 
99 
100 
102 
103 /* =============================== INQUIRY ================================ */
105 
106 
107 
109 
110 /* ////////////////////////////// PROTECTED /////////////////////////////// */
111 protected:
112 
113  static UtlString smDefaultAlgorithm;
114 
115 /* /////////////////////////////// PRIVATE //////////////////////////////// */
116 private:
117 
118 
119 };
120 
121 /* ============================ INLINE METHODS ============================ */
122 
123 #endif // _MpJitterBufferEstimation_h_
static void setDefaultAlgorithm(const UtlString &name)
Set algorithm to be used by default.
Definition: MpJitterBufferEstimation.cpp:63
virtual void reset()=0
Prepare to process other unrelated audio stream.
static MpJitterBufferEstimation * createJbe(const UtlString &algName="")
Factory method for VAD algorithms creation.
Definition: MpJitterBufferEstimation.cpp:32
virtual OsStatus init(int samplerate)=0
Initialize algorithm with given samplerate.
virtual ~MpJitterBufferEstimation()
Destructor.
Definition: MpJitterBufferEstimation.h:45
RTP header as described in RFC 3550.
Definition: RtpHeader.h:43
virtual OsStatus update(const RtpHeader *rtp, uint32_t cur_rtp_timestamp, uint32_t cur_playback_time, int32_t *hint)=0
Update estimation with new received packet.
static UtlString smDefaultAlgorithm
Name of algorithm to be used by default.
Definition: MpJitterBufferEstimation.h:113
Abstract base class for Jitter Buffer Estimation (JBE) algorithms.
Definition: MpJitterBufferEstimation.h:35