|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Defines APIs common to all supported codecs. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __VOIPJITTERBUFFERINTFC_H |
|
20 #define __VOIPJITTERBUFFERINTFC_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <voipaudiocommon.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CVoIPJitterBufferIntfc; |
|
29 class CVoIPJitterBufferIntfcImpl; |
|
30 |
|
31 |
|
32 /** |
|
33 * TVoIPJBConfig |
|
34 * ?description |
|
35 * @since S60 v5.0 |
|
36 */ |
|
37 class TVoIPJBConfig |
|
38 { |
|
39 public: |
|
40 // Jitter latency |
|
41 TUint iJitterLatency; |
|
42 |
|
43 // Frame time |
|
44 TUint8 iSampleInterval; |
|
45 |
|
46 //Jitter Buffer buffer queue size |
|
47 TUint iJBBufferLength; |
|
48 |
|
49 //Jitter Buffer threshold |
|
50 TUint iJBThreshold; |
|
51 |
|
52 //Jitter Buffer InactivityTimeOut |
|
53 TUint iJBInactivityTimeOut; |
|
54 |
|
55 //Jitter Buffer tone TimeOut |
|
56 TUint iJBPlayToneTimeout; |
|
57 |
|
58 //Jitter Buffer tone frequecy |
|
59 TUint iJBPlayToneFrequency; |
|
60 |
|
61 //Jitter Buffer tone duration |
|
62 TUint iJBPlayToneDuration; |
|
63 }; |
|
64 |
|
65 |
|
66 /** |
|
67 * MVoIPJitterBufferObserver class |
|
68 * |
|
69 * description |
|
70 * |
|
71 * @lib VoIPAudioIntfc.dll |
|
72 * @since S60 v5.0 |
|
73 */ |
|
74 class MVoIPJitterBufferObserver |
|
75 { |
|
76 public: |
|
77 static const TUint KJBReserved1 = 1; //TBD |
|
78 static const TUint KJBReserved2 = 2; //TBD |
|
79 |
|
80 public: |
|
81 /** |
|
82 * ?description |
|
83 * |
|
84 * @since S60 v5.0 |
|
85 * @param const CVoIPJitterBufferIntfc& |
|
86 * @param TInt - event type |
|
87 * @return void |
|
88 */ |
|
89 virtual void Event(const CVoIPJitterBufferIntfc& aSrc, |
|
90 TInt aEventType) = 0; |
|
91 }; |
|
92 |
|
93 |
|
94 /** |
|
95 * CVoIPFormatIntfc class |
|
96 * |
|
97 * Base class for codec format configuration |
|
98 * |
|
99 * @lib VoIPAudioIntfc.dll |
|
100 * @since S60 v5.0 |
|
101 */ |
|
102 class CVoIPJitterBufferIntfc |
|
103 { |
|
104 public: |
|
105 /** |
|
106 * Destructor |
|
107 * |
|
108 * @since S60 v5.0 |
|
109 * @param none |
|
110 * @return none |
|
111 */ |
|
112 IMPORT_C virtual ~CVoIPJitterBufferIntfc(); |
|
113 |
|
114 /** |
|
115 * ?description |
|
116 * |
|
117 * @since S60 v5.0 |
|
118 * @param MVoIPFormatObserver& |
|
119 * @return TInt |
|
120 */ |
|
121 IMPORT_C TInt SetObserver(MVoIPJitterBufferObserver& aObserver); |
|
122 |
|
123 |
|
124 /** |
|
125 * ConfigureJitterBuffer |
|
126 * @since S60 v5.0 |
|
127 * @param TVoIPJBConfig& |
|
128 * @return void |
|
129 */ |
|
130 IMPORT_C TInt ConfigureJitterBuffer(const TVoIPJBConfig& aJbConfig); |
|
131 |
|
132 /** |
|
133 * ResetJitterbuffer |
|
134 * @since S60 v5.0 |
|
135 * @param aPlayTone ETrue, if tone should be played |
|
136 * @return void |
|
137 */ |
|
138 IMPORT_C TInt ResetJitterBuffer(TBool aPlayTone = ETrue); |
|
139 |
|
140 /** |
|
141 * DelayDown |
|
142 * @since S60 v5.0 |
|
143 * @param none |
|
144 * @return void |
|
145 */ |
|
146 IMPORT_C TInt DelayDown(); |
|
147 |
|
148 /** |
|
149 * DelayUp |
|
150 * @since S60 v5.0 |
|
151 * @param none |
|
152 * @return void |
|
153 */ |
|
154 IMPORT_C TInt DelayUp(); |
|
155 |
|
156 protected: |
|
157 |
|
158 /** |
|
159 * Constructor |
|
160 * |
|
161 * @since S60 v5.0 |
|
162 * @param none |
|
163 * @return none |
|
164 */ |
|
165 CVoIPJitterBufferIntfc(); |
|
166 |
|
167 /** |
|
168 * 2-nd phase constructor |
|
169 * |
|
170 * @since S60 v5.0 |
|
171 * @param CVoIPJitterBufferIntfcImpl* |
|
172 * @return void |
|
173 */ |
|
174 void ConstructL(CVoIPJitterBufferIntfcImpl* aVoIPJitterBufferIntfcImpl); |
|
175 |
|
176 protected: |
|
177 CVoIPJitterBufferIntfcImpl* iVoIPJitterBufferIntfcImpl; |
|
178 |
|
179 }; |
|
180 |
|
181 #endif //__VOIPJITTERBUFFERINTFC_H |
|
182 |
|
183 |
|
184 // End of File |