|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Method implementations common to RTP data source and -sink. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "rtpapi.h" |
|
24 #include "mccrtpinterface.h" |
|
25 #include "mccrtpdefs.h" |
|
26 #include "mccinternalevents.h" |
|
27 #include "mccrtpkeepalivecontainer.h" |
|
28 #include "mmcccryptocontext.h" |
|
29 |
|
30 |
|
31 // EXTERNAL DATA STRUCTURES |
|
32 |
|
33 // EXTERNAL FUNCTION PROTOTYPES |
|
34 |
|
35 // CONSTANTS |
|
36 |
|
37 // MACROS |
|
38 |
|
39 // LOCAL CONSTANTS AND MACROS |
|
40 |
|
41 // MODULE DATA STRUCTURES |
|
42 |
|
43 // LOCAL FUNCTION PROTOTYPES |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 |
|
47 // ============================= LOCAL FUNCTIONS =============================== |
|
48 |
|
49 // ============================ MEMBER FUNCTIONS =============================== |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // MMccRtpInterface::SetSessionParamsL |
|
53 // Set session level parameters. |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 void MMccRtpInterface::SetSessionParamsL( const TMccRtpSessionParams& /*aParams*/ ) |
|
57 { |
|
58 |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // MMccRtpInterface::CheckBufferSupportL |
|
63 // Check the buffer support |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 void MMccRtpInterface::CheckBufferSupportL( CMMFBuffer* /*aBuffer*/ ) const |
|
67 { |
|
68 |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // MMccRtpInterface::SetStateL |
|
73 // Make transition to the new state if acceptable. Otherwise leave. |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 void MMccRtpInterface::SetStateL( TSourceSinkState /*aState*/ ) |
|
77 { |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // MMccRtpInterface::CloseStreams |
|
82 // close all RTP streams |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void MMccRtpInterface::CloseStreams() |
|
86 { |
|
87 |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // MMccRtpInterface::ConfigureL |
|
92 // Configures the RTP source/sink |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 void MMccRtpInterface::ConfigureL( const TDesC8& /*aConfig*/ ) |
|
96 { |
|
97 if ( KNullId == RtpStreamId() ) |
|
98 { |
|
99 this->DoCreateStreamL(); |
|
100 } |
|
101 } |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // MMccRtpInterface::SendRTCPReceiverReport |
|
105 // Sends RTCP receiver report to uplink if possible. |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 TInt MMccRtpInterface::SendRTCPReceiverReport() |
|
109 { |
|
110 TRtpId streamId = RtpStreamId(); |
|
111 if ( KNullId != streamId ) |
|
112 { |
|
113 return KErrNone; |
|
114 } |
|
115 else |
|
116 { |
|
117 return KErrNotReady; |
|
118 } |
|
119 } |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // MMccRtpInterface::SendRTCPSenderReport |
|
123 // Sends RTCP sender report to uplink if possible. |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 TInt MMccRtpInterface::SendRTCPSenderReport() |
|
127 { |
|
128 TRtpId streamId = RtpStreamId(); |
|
129 if ( KNullId != streamId ) |
|
130 { |
|
131 return KErrNone; |
|
132 } |
|
133 else |
|
134 { |
|
135 return KErrNotReady; |
|
136 } |
|
137 } |
|
138 |
|
139 // ----------------------------------------------------------------------------- |
|
140 // MMccRtpInterface::SendRTCPDataL |
|
141 // Sends RTCP sender report to uplink if possible. |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 void MMccRtpInterface::SendRTCPDataL( const TDesC8& /*aData*/ ) |
|
145 { |
|
146 User::Leave( KErrNotSupported ); |
|
147 } |
|
148 |
|
149 // ----------------------------------------------------------------------------- |
|
150 // MMccRtpInterface::StartInactivityTimerL |
|
151 // Starts inactivity timer for a stream |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 void MMccRtpInterface::StartInactivityTimerL( TUint32 /*aTimeoutTime*/ ) |
|
155 { |
|
156 User::Leave( KErrNotSupported ); |
|
157 } |
|
158 |
|
159 |
|
160 // ----------------------------------------------------------------------------- |
|
161 // MMccRtpInterface::StopInactivityTimerL |
|
162 // Stops inactivity timer for a stream |
|
163 // ----------------------------------------------------------------------------- |
|
164 // |
|
165 void MMccRtpInterface::StopInactivityTimerL( ) |
|
166 { |
|
167 User::Leave( KErrNotSupported ); |
|
168 } |
|
169 |
|
170 // ----------------------------------------------------------------------------- |
|
171 // MMccRtpInterface::StandBy |
|
172 // ----------------------------------------------------------------------------- |
|
173 // |
|
174 TInt MMccRtpInterface::StandBy( TMccStandbyActionType /*aActionType*/, TUint /*aPayloadType*/ ) |
|
175 { |
|
176 return KErrNone; |
|
177 } |
|
178 |
|
179 // ----------------------------------------------------------------------------- |
|
180 // MMccRtpInterface::HandleBySsrc |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 TBool MMccRtpInterface::HandleBySsrc( const TRtpSSRC& /*aSsrc*/ ) |
|
184 { |
|
185 return EFalse; |
|
186 } |
|
187 |
|
188 // ----------------------------------------------------------------------------- |
|
189 // MMccRtpInterface::HandleByStreamId |
|
190 // ----------------------------------------------------------------------------- |
|
191 // |
|
192 TBool MMccRtpInterface::HandleByStreamId( const TRtpId& /*aStreamId*/ ) |
|
193 { |
|
194 return ETrue; |
|
195 } |
|
196 |
|
197 // ----------------------------------------------------------------------------- |
|
198 // MMccRtpInterface::IsSink |
|
199 // ----------------------------------------------------------------------------- |
|
200 // |
|
201 TBool MMccRtpInterface::IsSink() const |
|
202 { |
|
203 return EFalse; |
|
204 } |
|
205 |
|
206 // ----------------------------------------------------------------------------- |
|
207 // MMccRtpInterface::IsSending |
|
208 // ----------------------------------------------------------------------------- |
|
209 // |
|
210 TBool MMccRtpInterface::IsSending() const |
|
211 { |
|
212 return EFalse; |
|
213 } |
|
214 |
|
215 // ----------------------------------------------------------------------------- |
|
216 // MMccRtpInterface::SendInternalRtpEventToClient |
|
217 // ----------------------------------------------------------------------------- |
|
218 // |
|
219 void MMccRtpInterface::SendInternalRtpEventToClient( |
|
220 MAsyncEventHandler* /*aEventHandler*/, |
|
221 TUid /*aEventOriginator*/, |
|
222 TMccInternalEventType /*aInternalEventType*/, |
|
223 TMccEventType /*aEventType*/, |
|
224 TUint32 /*aEndpointId*/, |
|
225 TInt /*aError*/, |
|
226 TUint64 /*aJitterEstimate*/, |
|
227 TUint32 /*aPacketsReceived*/, |
|
228 TInt64 /*iPrevTransTime*/, |
|
229 TUint64 /*iTriggeredJitterLevel*/ ) |
|
230 { |
|
231 |
|
232 } |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // MMccRtpInterface::SendInternalRtpEventToAllClients |
|
236 // ----------------------------------------------------------------------------- |
|
237 // |
|
238 void MMccRtpInterface::SendInternalRtpEventToAllClients( |
|
239 RArray<TMccRtpUser>& aUsers, |
|
240 TUid aEventOriginator, |
|
241 TMccInternalEventType aInternalEventType, |
|
242 TMccEventType aEventType, |
|
243 TUint32 aEndpointId, |
|
244 TInt aError, |
|
245 TUint64 aJitterEstimate, |
|
246 TUint32 aPacketsReceived, |
|
247 TInt64 aPrevTransTime, |
|
248 TUint64 aTriggeredJitterLevel ) |
|
249 { |
|
250 TRACE_RTP_SOURCE_PRINT( "MMccRtpInterface::SendInternalRtpEventToAllClients" ) |
|
251 |
|
252 TInt index( aUsers.Count() ); |
|
253 while ( index-- ) |
|
254 { |
|
255 SendInternalRtpEventToClient( aUsers[index].iEventHandler, aEventOriginator, |
|
256 aInternalEventType, aEventType, aEndpointId, aError, aJitterEstimate, |
|
257 aPacketsReceived, aPrevTransTime, aTriggeredJitterLevel ); |
|
258 } |
|
259 } |
|
260 |
|
261 |
|
262 // ----------------------------------------------------------------------------- |
|
263 // MMccRtpInterface::ClearMccEvent |
|
264 // ----------------------------------------------------------------------------- |
|
265 // |
|
266 void MMccRtpInterface::ClearMccEvent() |
|
267 { |
|
268 |
|
269 } |
|
270 |
|
271 // ----------------------------------------------------------------------------- |
|
272 // MMccRtpInterface::StartKeepaliveL |
|
273 // ----------------------------------------------------------------------------- |
|
274 // |
|
275 void MMccRtpInterface::StartKeepaliveL( CMccRtpMediaClock& /*aRtpMediaClock*/ ) |
|
276 { |
|
277 |
|
278 } |
|
279 |
|
280 // ----------------------------------------------------------------------------- |
|
281 // MMccRtpInterface::StopKeepalive |
|
282 // ----------------------------------------------------------------------------- |
|
283 // |
|
284 void MMccRtpInterface::StopKeepalive() |
|
285 { |
|
286 |
|
287 } |
|
288 |
|
289 // ----------------------------------------------------------------------------- |
|
290 // MMccRtpInterface::ResetKeepaliveTimer |
|
291 // ----------------------------------------------------------------------------- |
|
292 // |
|
293 void MMccRtpInterface::ResetKeepaliveTimer() |
|
294 { |
|
295 |
|
296 } |
|
297 |
|
298 // ----------------------------------------------------------------------------- |
|
299 // MMccRtpInterface::ApplyCryptoContextL |
|
300 // ----------------------------------------------------------------------------- |
|
301 // |
|
302 void MMccRtpInterface::ApplyCryptoContextL( const TMccCryptoContext& /*aContextParams*/ ) |
|
303 { |
|
304 } |
|
305 |
|
306 // ----------------------------------------------------------------------------- |
|
307 // MMccRtpInterface::CreateContext |
|
308 // ----------------------------------------------------------------------------- |
|
309 // |
|
310 TInt MMccRtpInterface::RemoveCryptoContext() |
|
311 { |
|
312 return KErrNone; |
|
313 } |
|
314 |
|
315 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
316 |
|
317 // End of File |