42 * @since Series 60 3.2 |
42 * @since Series 60 3.2 |
43 */ |
43 */ |
44 class MRtpJitterObserver |
44 class MRtpJitterObserver |
45 { |
45 { |
46 public: |
46 public: |
47 virtual void SendJitterEvent( TMccRtpEventDataExtended aEvent, TInt aError ) = 0; |
47 virtual void SendJitterEvent( TMccRtpEventData aEvent, TInt aError ) = 0; |
48 }; |
48 }; |
49 |
49 |
50 |
50 |
51 /** |
51 /** |
52 * Class which implements jittercalculations for received RTP packets |
52 * Class which implements jittercalculations for received RTP packets |
89 * @since Series 60 3.0 |
89 * @since Series 60 3.0 |
90 * @param "aHeaderInfo" |
90 * @param "aHeaderInfo" |
91 * RTP header from received packet |
91 * RTP header from received packet |
92 * @return void |
92 * @return void |
93 */ |
93 */ |
94 void RtpPacketReceived( const TUint32 aTimeStamp, TBool aMarker, TUint16 aSeqNum ); |
94 void RtpPacketReceived( const TUint32 aTimeStamp, TBool aMarker ); |
95 |
95 |
96 /** |
96 /** |
97 * Set media configurations |
97 * Set media configurations |
98 * @since Series 60 3.0 |
98 * @since Series 60 3.0 |
99 * @param "aMessage" |
99 * @param "aMessage" |
132 * @since Series 60 3.0 |
132 * @since Series 60 3.0 |
133 * @return void |
133 * @return void |
134 */ |
134 */ |
135 void JitterObserving(); |
135 void JitterObserving(); |
136 |
136 |
137 /** |
|
138 * Counts packet loss percentage from iStartingSeqNum, iCurrentSeqNum |
|
139 * and iReceivedPacketCounter |
|
140 * @return Counted packet loss percentage |
|
141 */ |
|
142 TInt CountPacketLossPercentage(); |
|
143 |
|
144 /** |
|
145 * Checks if current jitter level exceeds the jitter level given by the client, |
|
146 * and if exceeded, sends the report to client |
|
147 * @param "aReportIntervalReached" |
|
148 * Changed to ETrue if the report interval was reached |
|
149 * @param "aReportSent" |
|
150 * Changed to ETrue if the jitter report was sent |
|
151 * @return void |
|
152 */ |
|
153 void CheckJitter( TBool& aReportIntervalReached, TBool& aReportSent ); |
|
154 |
|
155 /** |
|
156 * Checks if current packet loss level exceeds the packet loss level |
|
157 * given by the client, and if exceeded, sends the report to client |
|
158 * @param "aReportIntervalReached" |
|
159 * Changed to ETrue if the report interval was reached |
|
160 * @param "aReportSent" |
|
161 * Changed to ETrue if the packet loss report was sent |
|
162 * @return void |
|
163 */ |
|
164 void CheckPacketLoss( TBool& aReportIntervalReached, TBool& aReportSent ); |
|
165 |
|
166 /** |
|
167 * Calculates a new FER value |
|
168 * @param aPrevValue Previous FER value |
|
169 * @param aAdd Value to add( ETrue/EFalse) |
|
170 * @param aFlag To add (ETrue) or remove (EFalse) |
|
171 * @return new FER value |
|
172 */ |
|
173 TUint32 CalculateFer( TUint32 aPrevValue, TBool aAdd, TBool aFlag ); |
|
174 |
|
175 private: |
137 private: |
176 |
138 |
177 // Number of packets received |
139 // Number of packets received |
178 TUint32 iPacketsReceived; |
140 TUint32 iPacketsReceived; |
179 |
141 |
227 * jitter observer |
189 * jitter observer |
228 * Own. |
190 * Own. |
229 */ |
191 */ |
230 MRtpJitterObserver* iObserver; |
192 MRtpJitterObserver* iObserver; |
231 |
193 |
232 // Current packet sequence number |
|
233 TUint16 iCurrentSeqNum; |
|
234 |
|
235 // Packet sequence number where to start counting the packet loss |
|
236 TUint16 iStartingSeqNum; |
|
237 |
|
238 // Holds the previous number of packets expected |
|
239 TUint32 iPrevExpectedPackets; |
|
240 |
|
241 // Holds the previous number of packets received |
|
242 TUint32 iPrevPacketsReceived; |
|
243 |
|
244 // Holds the previous FER value |
|
245 TUint32 iPrevFerValue; |
|
246 |
|
247 #ifdef FTD_ENABLED |
194 #ifdef FTD_ENABLED |
248 |
195 |
249 // Message queue carrying stream statistics |
196 // Message queue carrying stream statistics |
250 RMsgQueue<TMccStreamStats> iStreamStatsQueue; |
197 RMsgQueue<TMccStreamStats> iStreamStatsQueue; |
251 |
198 |