|
1 /* |
|
2 * Copyright (c) 2005 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include "mcesrvstream.h" |
|
22 #include "mcesrvsource.h" |
|
23 #include "mcesrvsink.h" |
|
24 #include "mceevents.h" |
|
25 |
|
26 #include <sdpcodecstringconstants.h> |
|
27 |
|
28 #include "mcecomsession.h" |
|
29 #include "mcecomaudiostream.h" |
|
30 #include "mcecomaudiocodec.h" |
|
31 #include "mcecommediasource.h" |
|
32 #include "mcecommediasink.h" |
|
33 #include "mcecomvideostream.h" |
|
34 #include "mcecomvideocodec.h" |
|
35 #include "mcecomdisplaysink.h" |
|
36 #include "mcecomcamerasource.h" |
|
37 #include "mcedisplaysink.h" |
|
38 #include "mcecamerasource.h" |
|
39 |
|
40 #include "mceaudiostream.h" |
|
41 #include "mcevideostream.h" |
|
42 #include "mcesrvstreamiterator.h" |
|
43 #include "mcemediamanager.h" |
|
44 #include "mcedtmfcodec.h" |
|
45 #include "mcemmlogs.h" |
|
46 #include "mcedtmfhandler.h" |
|
47 |
|
48 #define MCE_MCC_STREAM_STATE_CHANGE_EVENT( event )\ |
|
49 ( aEvent.iEvent == KMccStreamPrepared || \ |
|
50 aEvent.iEvent == KMccStreamStarted || \ |
|
51 aEvent.iEvent == KMccStreamPaused || \ |
|
52 aEvent.iEvent == KMccStreamResumed || \ |
|
53 aEvent.iEvent == KMccStreamStopped ) |
|
54 |
|
55 |
|
56 |
|
57 // ============================ MEMBER FUNCTIONS =============================== |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // CMceSrvStream::DecodeL |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CMceSrvStream::DecodeL( RPointerArray<CMceSrvStream>& aStreams, |
|
64 CMceComMediaStream& aStream, |
|
65 CMceMediaManager& aManager ) |
|
66 { |
|
67 MCEMM_DEBUG("CMceSrvStream::DecodeL(), Entry "); |
|
68 |
|
69 switch( aStream.iType ) |
|
70 { |
|
71 case KMceAudio: |
|
72 { |
|
73 CMceComAudioStream& audio = |
|
74 static_cast<CMceComAudioStream&>( aStream ); |
|
75 DecodeAudioL( aStreams, audio, aManager ); |
|
76 break; |
|
77 } |
|
78 case KMceVideo: |
|
79 { |
|
80 CMceComVideoStream& video = |
|
81 static_cast<CMceComVideoStream&>( aStream ); |
|
82 DecodeVideoL( aStreams, video, aManager ); |
|
83 break; |
|
84 } |
|
85 default: |
|
86 { |
|
87 User::Leave( KErrNotSupported ); |
|
88 break; |
|
89 } |
|
90 } |
|
91 MCEMM_DEBUG("CMceSrvStream::DecodeL(), Exit "); |
|
92 } |
|
93 |
|
94 |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CMceSrvStream::DecodeAudioL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 void CMceSrvStream::DecodeAudioL( RPointerArray<CMceSrvStream>& aStreams, |
|
101 CMceComAudioStream& aAudio, |
|
102 CMceMediaManager& aManager ) |
|
103 { |
|
104 MCEMM_DEBUG("CMceSrvStream::DecodeAudioL(), Entry "); |
|
105 |
|
106 // First clear all enabled states, those are affected inside codec |
|
107 // specific decoding |
|
108 for( TInt i = 0; i < aAudio.CodecCount(); ++i ) |
|
109 { |
|
110 aAudio.CodecL( i )->SetEnabled( EFalse ); |
|
111 } |
|
112 |
|
113 for ( TInt j = 0; j < aAudio.CodecCount(); ++j ) |
|
114 { |
|
115 aAudio.CodecL( j )->DoDecodeAudioL( j, |
|
116 aStreams, |
|
117 aAudio, |
|
118 aManager ); |
|
119 } |
|
120 |
|
121 if ( aAudio.BoundStream() && aAudio.Binder() ) |
|
122 { |
|
123 DecodeL( aStreams, aAudio.BoundStreamL(), aManager ); |
|
124 } |
|
125 MCEMM_DEBUG("CMceSrvStream::DecodeAudioL(), Exit "); |
|
126 } |
|
127 |
|
128 |
|
129 |
|
130 // ----------------------------------------------------------------------------- |
|
131 // CMceSrvStream::DecodeVideoL |
|
132 // ----------------------------------------------------------------------------- |
|
133 // |
|
134 |
|
135 void CMceSrvStream::DecodeVideoL( RPointerArray<CMceSrvStream>& aStreams, |
|
136 CMceComVideoStream& aVideo, |
|
137 CMceMediaManager& aManager ) |
|
138 { |
|
139 MCEMM_DEBUG("CMceSrvStream::DecodeVideoL(), Entry "); |
|
140 |
|
141 for( TInt codecNdx = 0;codecNdx < aVideo.CodecCount();codecNdx++ ) |
|
142 { |
|
143 aVideo.CodecL( codecNdx )->SetEnabled( |
|
144 codecNdx == 0 || IS_RECEIVESTREAM( &aVideo ) ); |
|
145 |
|
146 for( TInt sinkNdx = 0 ; sinkNdx < aVideo.Sinks().Count() ; sinkNdx++ ) |
|
147 { |
|
148 CMceSrvStream* srvStream = NewL( aManager, aVideo, |
|
149 *aVideo.Source(), |
|
150 *aVideo.Sinks()[ sinkNdx ], |
|
151 *aVideo.CodecL( codecNdx ) ); |
|
152 CleanupStack::PushL( srvStream ); |
|
153 MCEMM_DEBUG_STREAM( "CMceSrvStream::DecodeVideoL(): decoded video", *srvStream ); |
|
154 aStreams.AppendL( srvStream ); |
|
155 CleanupStack::Pop( srvStream ); |
|
156 } |
|
157 } |
|
158 if ( aVideo.BoundStream() && aVideo.Binder() ) |
|
159 { |
|
160 DecodeL( aStreams, aVideo.BoundStreamL(), aManager ); |
|
161 } |
|
162 MCEMM_DEBUG("CMceSrvStream::DecodeVideoL(), Exit "); |
|
163 } |
|
164 |
|
165 |
|
166 // ----------------------------------------------------------------------------- |
|
167 // CMceSrvStream::NewL |
|
168 // ----------------------------------------------------------------------------- |
|
169 // |
|
170 CMceSrvStream* CMceSrvStream::NewL( CMceMediaManager& aManager, |
|
171 CMceComMediaStream& aData, |
|
172 CMceComMediaSource& aSource, |
|
173 CMceComMediaSink& aSink, |
|
174 CMceComCodec& aCodec ) |
|
175 { |
|
176 CMceSrvStream* self = new (ELeave) CMceSrvStream( &aManager, &aData, &aCodec ); |
|
177 CleanupStack::PushL( self ); |
|
178 self->ConstructL( aSource, aSink ); |
|
179 CleanupStack::Pop( self ); |
|
180 |
|
181 return self; |
|
182 } |
|
183 |
|
184 // ----------------------------------------------------------------------------- |
|
185 // CMceSrvStream::CMceSrvStream |
|
186 // ----------------------------------------------------------------------------- |
|
187 // |
|
188 CMceSrvStream::CMceSrvStream() |
|
189 { |
|
190 } |
|
191 |
|
192 // ----------------------------------------------------------------------------- |
|
193 // CMceSrvStream::CMceSrvStream |
|
194 // ----------------------------------------------------------------------------- |
|
195 // |
|
196 CMceSrvStream::CMceSrvStream( CMceMediaManager* aManager, |
|
197 CMceComMediaStream* aData, |
|
198 CMceComCodec* aCodec ) |
|
199 : iManager( aManager ), |
|
200 iData( aData ), |
|
201 iCodec( aCodec ), |
|
202 iMerged( EFalse ), |
|
203 iID( KMceNotAssigned ) |
|
204 { |
|
205 } |
|
206 |
|
207 // ----------------------------------------------------------------------------- |
|
208 // CMceSrvStream::CreateLinkL |
|
209 // ----------------------------------------------------------------------------- |
|
210 // |
|
211 TBool CMceSrvStream::CreateLinkL() |
|
212 { |
|
213 __ASSERT_ALWAYS( State() == ECreated, User::Leave( KErrArgument ) ); |
|
214 TBool sequence = KMceSrvStreamDefaultSequence; |
|
215 |
|
216 if ( !UseDefaultStartupSequence() ) |
|
217 { |
|
218 sequence = KMceSrvStreamAlternativeSequence; |
|
219 } |
|
220 |
|
221 return sequence; |
|
222 |
|
223 } |
|
224 |
|
225 // ----------------------------------------------------------------------------- |
|
226 // CMceSrvStream::PrepareL |
|
227 // ----------------------------------------------------------------------------- |
|
228 // |
|
229 TBool CMceSrvStream::PrepareL() |
|
230 { |
|
231 __ASSERT_ALWAYS( State() == ELinkCreated, User::Leave( KErrArgument ) ); |
|
232 TBool sequence = KMceSrvStreamDefaultSequence; |
|
233 |
|
234 if ( !UseDefaultStartupSequence() ) |
|
235 { |
|
236 MCEMM_DEBUG("CMceSrvStream::PrepareL(): alternative prepare"); |
|
237 |
|
238 sequence = KMceSrvStreamAlternativeSequence; |
|
239 TMceMccComEvent prepare( KMccStreamPrepared ); |
|
240 |
|
241 iSource->EventReceived( prepare ); |
|
242 iSink->EventReceived( prepare ); |
|
243 |
|
244 MCEMM_DEBUG_STREAM( "CMceSrvStream::PrepareL(): after prepare", *this ); |
|
245 } |
|
246 else if ( IsMccPrepared() ) |
|
247 { |
|
248 iSource->Data().PrepareL(); |
|
249 iSink->Data().PrepareL(); |
|
250 } |
|
251 else |
|
252 { |
|
253 // NOP |
|
254 } |
|
255 |
|
256 return sequence; |
|
257 |
|
258 } |
|
259 |
|
260 // ----------------------------------------------------------------------------- |
|
261 // CMceSrvStream::StartL |
|
262 // ----------------------------------------------------------------------------- |
|
263 // |
|
264 TBool CMceSrvStream::StartL() |
|
265 { |
|
266 |
|
267 if ( IsMccPrepared() ) |
|
268 { |
|
269 return KMceSrvStreamDefaultSequence; |
|
270 } |
|
271 |
|
272 MCEMM_DEBUG("CMceSrvStream::StartL(): alternative start"); |
|
273 |
|
274 TMceMccComEvent started( KMccStreamStarted ); |
|
275 TMceMccComEvent paused( KMccStreamPaused ); |
|
276 |
|
277 if ( iSource->Data().IsEnabled() ) |
|
278 { |
|
279 iSource->EventReceived( started ); |
|
280 iSource->EnableL( *this, KMceSrvStreamSync ); |
|
281 } |
|
282 else |
|
283 { |
|
284 iSource->EventReceived( paused ); |
|
285 } |
|
286 |
|
287 if ( iSink->Data().IsEnabled() ) |
|
288 { |
|
289 iSink->EventReceived( started ); |
|
290 iSink->EnableL( *this, KMceSrvStreamSync ); |
|
291 } |
|
292 else |
|
293 { |
|
294 iSink->EventReceived( paused ); |
|
295 } |
|
296 |
|
297 MCEMM_DEBUG_STREAM( "CMceSrvStream::StartL(): after start", *this ); |
|
298 |
|
299 return KMceSrvStreamAlternativeSequence; |
|
300 |
|
301 } |
|
302 |
|
303 // ----------------------------------------------------------------------------- |
|
304 // CMceSrvStream::SynchronizeL |
|
305 // ----------------------------------------------------------------------------- |
|
306 // |
|
307 TBool CMceSrvStream::SynchronizeL() |
|
308 { |
|
309 |
|
310 if ( IsMccPrepared() ) |
|
311 { |
|
312 return KMceSrvStreamDefaultSequence; |
|
313 } |
|
314 |
|
315 MCEMM_DEBUG("CMceSrvStream::SynchronizeL(): alternative synchronize"); |
|
316 |
|
317 if ( iSource->Data().IsEnabled() ) |
|
318 { |
|
319 iSource->EnableL( *this, KMceSrvStreamSync ); |
|
320 } |
|
321 else |
|
322 { |
|
323 iSource->DisableL( *this, KMceSrvStreamSync ); |
|
324 } |
|
325 |
|
326 if ( iSink->Data().IsEnabled() ) |
|
327 { |
|
328 iSink->EnableL( *this, KMceSrvStreamSync ); |
|
329 } |
|
330 else |
|
331 { |
|
332 iSink->DisableL( *this, KMceSrvStreamSync ); |
|
333 } |
|
334 |
|
335 MCEMM_DEBUG_STREAM( "CMceSrvStream::SynchronizeL(): after synchronize", *this ); |
|
336 |
|
337 return KMceSrvStreamAlternativeSequence; |
|
338 |
|
339 } |
|
340 |
|
341 |
|
342 // ----------------------------------------------------------------------------- |
|
343 // CMceSrvStream::Stop |
|
344 // ----------------------------------------------------------------------------- |
|
345 // |
|
346 TBool CMceSrvStream::Stop() |
|
347 { |
|
348 |
|
349 if ( IsMccPrepared() ) |
|
350 { |
|
351 return KMceSrvStreamDefaultSequence; |
|
352 } |
|
353 |
|
354 MCEMM_DEBUG("CMceSrvStream::Stop(): alternative stop, stopping source"); |
|
355 |
|
356 DoEndpointDisable( *iSource ); |
|
357 |
|
358 MCEMM_DEBUG("CMceSrvStream::Stop(): alternative stop, stopping sink"); |
|
359 |
|
360 DoEndpointDisable( *iSink ); |
|
361 |
|
362 // Generating stopped event must be done after disabling |
|
363 TMceMccComEvent stopped( KMccStreamStopped ); |
|
364 iSink->EventReceived( stopped ); |
|
365 iSource->EventReceived( stopped ); |
|
366 |
|
367 MCEMM_DEBUG_STREAM( "CMceSrvStream::Stop(): after stop", *this ); |
|
368 return KMceSrvStreamAlternativeSequence; |
|
369 |
|
370 } |
|
371 |
|
372 // ----------------------------------------------------------------------------- |
|
373 // CMceSrvStream::Validate |
|
374 // ----------------------------------------------------------------------------- |
|
375 // |
|
376 TBool CMceSrvStream::Validate() |
|
377 { |
|
378 return StreamType() == CMceComMediaStream::ELocalStream; |
|
379 } |
|
380 |
|
381 // ----------------------------------------------------------------------------- |
|
382 // CMceSrvStream::UseDefaultStartupSequence |
|
383 // ----------------------------------------------------------------------------- |
|
384 // |
|
385 TBool CMceSrvStream::UseDefaultStartupSequence() |
|
386 { |
|
387 TBool defaultSequence = ETrue; |
|
388 |
|
389 //special case: local stream, which has camera source and |
|
390 // diaplay sink |
|
391 if ( StreamType() == CMceComMediaStream::ELocalStream && |
|
392 iSource->Data().iType == KMceCameraSource && |
|
393 iSink->Data().iType == KMceDisplaySink ) |
|
394 { |
|
395 //try to find stream, which is send stream and it has the |
|
396 //same camera source |
|
397 TMceSrvStreamIterator streams( |
|
398 Data().Session()->MccStreams(), iSource->Data() ); |
|
399 |
|
400 CMceSrvStream* pairedStream = NULL; |
|
401 CMceSrvStream* stream = NULL; |
|
402 while( !pairedStream && streams.Next( stream ) ) |
|
403 { |
|
404 pairedStream = |
|
405 ( stream->StreamType() == CMceComMediaStream::ESendStream || |
|
406 stream->StreamType() == CMceComMediaStream::ESendOnlyStream ) ? |
|
407 stream : NULL; |
|
408 } |
|
409 defaultSequence = MCE_IS_NULL_PTR( pairedStream ); |
|
410 if ( !defaultSequence ) |
|
411 { |
|
412 static_cast<CMceComDisplaySink&>( iSink->Data() ).SetViewFinder( ETrue ); |
|
413 } |
|
414 |
|
415 } |
|
416 |
|
417 return defaultSequence; |
|
418 |
|
419 } |
|
420 |
|
421 // ----------------------------------------------------------------------------- |
|
422 // CMceSrvStream::ConstructL |
|
423 // ----------------------------------------------------------------------------- |
|
424 // |
|
425 void CMceSrvStream::ConstructL( CMceComMediaSource& aSource, |
|
426 CMceComMediaSink& aSink ) |
|
427 { |
|
428 iSource = new (ELeave) CMceSrvSource( *iManager, aSource ); |
|
429 iSink = new (ELeave) CMceSrvSink( *iManager, aSink ); |
|
430 } |
|
431 |
|
432 |
|
433 // ----------------------------------------------------------------------------- |
|
434 // CMceSrvStream::IsMerged |
|
435 // ----------------------------------------------------------------------------- |
|
436 // |
|
437 TBool CMceSrvStream::IsMerged() const |
|
438 { |
|
439 return iMerged; |
|
440 } |
|
441 |
|
442 |
|
443 // ----------------------------------------------------------------------------- |
|
444 // CMceSrvStream::IsMccPrepared |
|
445 // ----------------------------------------------------------------------------- |
|
446 // |
|
447 TBool CMceSrvStream::IsMccPrepared() const |
|
448 { |
|
449 return iID != KMceNotAssigned; |
|
450 } |
|
451 |
|
452 |
|
453 // ----------------------------------------------------------------------------- |
|
454 // CMceSrvStream::Merge |
|
455 // ----------------------------------------------------------------------------- |
|
456 // |
|
457 void CMceSrvStream::Merge( CMceSrvStream& aMergeWith, TBool aDeepMerge ) |
|
458 { |
|
459 aMergeWith.iMerged = ETrue; |
|
460 |
|
461 iMerged = aMergeWith.iMerged; |
|
462 iID = aMergeWith.iID; |
|
463 iSource->Merge( aMergeWith.Source() ); |
|
464 iSink->Merge( aMergeWith.Sink() ); |
|
465 Data().SetLinkId( aMergeWith.LinkId() ); |
|
466 |
|
467 if ( aDeepMerge ) |
|
468 { |
|
469 Data().Merge( aMergeWith.Data() ); |
|
470 iCodec->Merge( aMergeWith.Codec() ); |
|
471 iSource->Data().Merge( aMergeWith.Source().Data() ); |
|
472 iSink->Data().Merge( aMergeWith.Sink().Data() ); |
|
473 } |
|
474 |
|
475 } |
|
476 |
|
477 |
|
478 // ----------------------------------------------------------------------------- |
|
479 // CMceSrvStream::IsAdopted |
|
480 // ----------------------------------------------------------------------------- |
|
481 // |
|
482 TBool CMceSrvStream::IsAdopted() const |
|
483 { |
|
484 return EFalse; |
|
485 } |
|
486 |
|
487 |
|
488 // ----------------------------------------------------------------------------- |
|
489 // CMceSrvStream::UnMerge |
|
490 // ----------------------------------------------------------------------------- |
|
491 // |
|
492 void CMceSrvStream::UnMerge() |
|
493 { |
|
494 iMerged = EFalse; |
|
495 } |
|
496 |
|
497 |
|
498 // ----------------------------------------------------------------------------- |
|
499 // CMceSrvStream::UnMergeL |
|
500 // ----------------------------------------------------------------------------- |
|
501 // |
|
502 void CMceSrvStream::UnMergeL( CMceSrvStream& aUnMergeFrom ) |
|
503 { |
|
504 UnMerge(); |
|
505 |
|
506 if ( !IsAdopted() && !aUnMergeFrom.IsAdopted() ) |
|
507 { |
|
508 iSource->Merge( aUnMergeFrom.Source() ); |
|
509 iSink->Merge( aUnMergeFrom.Sink() ); |
|
510 iManager->SynchronizeMccStreamL( *this ); |
|
511 } |
|
512 } |
|
513 |
|
514 |
|
515 // ----------------------------------------------------------------------------- |
|
516 // CMceSrvStream::Cleanup |
|
517 // ----------------------------------------------------------------------------- |
|
518 // |
|
519 void CMceSrvStream::Cleanup() |
|
520 { |
|
521 MCEMM_DEBUG("CMceSrvStream::Cleanup(), Entry "); |
|
522 |
|
523 if ( iManager->CanReleaseEndpoint( *this, Source().Id() ) ) |
|
524 { |
|
525 iManager->ReleaseSource( *this, Source().Id() ); |
|
526 } |
|
527 |
|
528 if ( iManager->CanReleaseEndpoint( *this, Sink().Id() ) ) |
|
529 { |
|
530 iManager->ReleaseSink( *this, Sink().Id() ); |
|
531 } |
|
532 |
|
533 MCEMM_DEBUG("CMceSrvStream::Cleanup(), Exit "); |
|
534 } |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 // ----------------------------------------------------------------------------- |
|
540 // CMceSrvStream::IsEqual |
|
541 // ----------------------------------------------------------------------------- |
|
542 // |
|
543 TBool CMceSrvStream::IsEqual( const CMceSrvStream& aStream ) const |
|
544 { |
|
545 TBool equal = EFalse; |
|
546 if ( &aStream ) |
|
547 { |
|
548 equal = Codec().Id() == aStream.Codec().Id() && |
|
549 Source().Data().Id() == aStream.Source().Data().Id() && |
|
550 Sink().Data().Id() == aStream.Sink().Data().Id(); |
|
551 } |
|
552 |
|
553 return equal; |
|
554 |
|
555 } |
|
556 |
|
557 // ----------------------------------------------------------------------------- |
|
558 // CMceSrvStream::Consumes |
|
559 // ----------------------------------------------------------------------------- |
|
560 // |
|
561 TBool CMceSrvStream::Consumes( const TMceMccComEvent& aEvent ) const |
|
562 { |
|
563 TBool match = EFalse; |
|
564 |
|
565 if ( State() != EAdopted ) |
|
566 { |
|
567 if ( aEvent.iStreamId ) |
|
568 { |
|
569 match = iID == aEvent.iStreamId; |
|
570 } |
|
571 else if ( aEvent.iEndpointId ) |
|
572 { |
|
573 match = LinkId() == aEvent.iLinkId && |
|
574 ( Sink().Id() == aEvent.iEndpointId || |
|
575 Source().Id() == aEvent.iEndpointId ); |
|
576 } |
|
577 else |
|
578 { |
|
579 match = LinkId() == aEvent.iLinkId; |
|
580 } |
|
581 } |
|
582 |
|
583 return match; |
|
584 } |
|
585 |
|
586 // ----------------------------------------------------------------------------- |
|
587 // CMceSrvStream::DtmfHandlerL |
|
588 // ----------------------------------------------------------------------------- |
|
589 // |
|
590 CMceDtmfHandler& CMceSrvStream::DtmfHandlerL( CMccInterface& aMccInterface ) |
|
591 { |
|
592 __ASSERT_ALWAYS( MccStreamType() == KMccDtmfStream, |
|
593 User::Leave( KErrNotFound ) ); |
|
594 |
|
595 if ( !iDtmfHandler ) |
|
596 { |
|
597 iDtmfHandler = CMceDtmfHandler::NewL( *this, aMccInterface ); |
|
598 } |
|
599 |
|
600 return *iDtmfHandler; |
|
601 } |
|
602 |
|
603 // ----------------------------------------------------------------------------- |
|
604 // CMceSrvStream::UpdateEndpointStates |
|
605 // ----------------------------------------------------------------------------- |
|
606 // |
|
607 void CMceSrvStream::UpdateEndpointStates( |
|
608 TBool aSinkAffected, |
|
609 TBool aSourceAffected, |
|
610 TBool aIsEnabled ) |
|
611 { |
|
612 MCEMM_DEBUG_DVALUES( "CMceSrvStream::UpdateEndpointStates, sink affected:", |
|
613 aSinkAffected, |
|
614 " source affected:", |
|
615 aSourceAffected ) |
|
616 MCEMM_DEBUG_DVALUE( "CMceSrvStream::UpdateEndpointStates, enabled:", |
|
617 aIsEnabled ) |
|
618 |
|
619 if ( aSinkAffected ) |
|
620 { |
|
621 Sink().Data().Enabled( aIsEnabled ); |
|
622 } |
|
623 if ( aSourceAffected ) |
|
624 { |
|
625 Source().Data().Enabled( aIsEnabled ); |
|
626 } |
|
627 } |
|
628 |
|
629 // ----------------------------------------------------------------------------- |
|
630 // CMceSrvStream::EndpointMatch |
|
631 // ----------------------------------------------------------------------------- |
|
632 // |
|
633 TBool CMceSrvStream::EndpointMatch( |
|
634 const CMceComEndpoint& aEndpoint, |
|
635 TBool aUseProxyMatch ) |
|
636 { |
|
637 CMceSrvEndpoint* srvEndpoint = NULL; |
|
638 if ( aEndpoint.Category() == KMceCategorySource ) |
|
639 { |
|
640 srvEndpoint = &Source(); |
|
641 } |
|
642 else |
|
643 { |
|
644 srvEndpoint = &Sink(); |
|
645 } |
|
646 return srvEndpoint->EndpointMatch( aEndpoint, aUseProxyMatch ); |
|
647 } |
|
648 |
|
649 // ----------------------------------------------------------------------------- |
|
650 // CMceSrvStream::~CMceSrvStream |
|
651 // ----------------------------------------------------------------------------- |
|
652 // |
|
653 CMceSrvStream::~CMceSrvStream() |
|
654 { |
|
655 delete iDtmfHandler; |
|
656 delete iSource; |
|
657 delete iSink; |
|
658 } |
|
659 |
|
660 |
|
661 // ----------------------------------------------------------------------------- |
|
662 // CMceSrvStream::SessionId |
|
663 // ----------------------------------------------------------------------------- |
|
664 // |
|
665 TUint32 CMceSrvStream::SessionId() const |
|
666 { |
|
667 return Data().Session()->iMccID; |
|
668 } |
|
669 |
|
670 |
|
671 // ----------------------------------------------------------------------------- |
|
672 // CMceSrvStream::LinkId |
|
673 // ----------------------------------------------------------------------------- |
|
674 // |
|
675 TUint32 CMceSrvStream::LinkId() const |
|
676 { |
|
677 TUint32 linkId = Data().iLinkId; |
|
678 return linkId == 0 ? KMceNotAssigned : linkId; |
|
679 } |
|
680 |
|
681 // ----------------------------------------------------------------------------- |
|
682 // CMceSrvStream::SetLinkId |
|
683 // ----------------------------------------------------------------------------- |
|
684 // |
|
685 void CMceSrvStream::SetLinkId( TUint32 aLinkId ) |
|
686 { |
|
687 Data()().SetLinkId( aLinkId ); |
|
688 } |
|
689 |
|
690 |
|
691 // ----------------------------------------------------------------------------- |
|
692 // CMceSrvStream::IapId |
|
693 // ----------------------------------------------------------------------------- |
|
694 // |
|
695 TUint32 CMceSrvStream::IapId() const |
|
696 { |
|
697 return Data().Session()->iIapId; |
|
698 } |
|
699 |
|
700 // ----------------------------------------------------------------------------- |
|
701 // CMceSrvStream::LocalMediaPort |
|
702 // ----------------------------------------------------------------------------- |
|
703 // |
|
704 TUint CMceSrvStream::LocalMediaPort() const |
|
705 { |
|
706 return Data().LocalMediaPort(); |
|
707 } |
|
708 |
|
709 // ----------------------------------------------------------------------------- |
|
710 // CMceSrvStream::SetLocalMediaPort |
|
711 // ----------------------------------------------------------------------------- |
|
712 // |
|
713 void CMceSrvStream::SetLocalMediaPort( TUint aPort ) |
|
714 { |
|
715 return Data().SetLocalMediaPort( aPort ); |
|
716 } |
|
717 |
|
718 |
|
719 // ----------------------------------------------------------------------------- |
|
720 // CMceSrvStream::RemoteIpAddress |
|
721 // ----------------------------------------------------------------------------- |
|
722 // |
|
723 TInetAddr CMceSrvStream::RemoteIpAddress() const |
|
724 { |
|
725 TInetAddr remoteAddress = Data().Session()->iRemoteIpAddress; |
|
726 remoteAddress.SetPort( Data().RemoteMediaPort() ); |
|
727 return remoteAddress; |
|
728 } |
|
729 |
|
730 |
|
731 // ----------------------------------------------------------------------------- |
|
732 // CMceSrvStream::Id |
|
733 // ----------------------------------------------------------------------------- |
|
734 // |
|
735 TUint32& CMceSrvStream::Id() |
|
736 { |
|
737 return iID; |
|
738 } |
|
739 |
|
740 // ----------------------------------------------------------------------------- |
|
741 // CMceSrvStream::Data |
|
742 // ----------------------------------------------------------------------------- |
|
743 // |
|
744 CMceComMediaStream& CMceSrvStream::Data() const |
|
745 { |
|
746 return *iData; |
|
747 } |
|
748 |
|
749 // ----------------------------------------------------------------------------- |
|
750 // CMceSrvStream::Source |
|
751 // ----------------------------------------------------------------------------- |
|
752 // |
|
753 CMceSrvSource& CMceSrvStream::Source() const |
|
754 { |
|
755 return *iSource; |
|
756 } |
|
757 |
|
758 // ----------------------------------------------------------------------------- |
|
759 // CMceSrvStream::Sink |
|
760 // ----------------------------------------------------------------------------- |
|
761 // |
|
762 CMceSrvSink& CMceSrvStream::Sink() const |
|
763 { |
|
764 return *iSink; |
|
765 } |
|
766 |
|
767 // ----------------------------------------------------------------------------- |
|
768 // CMceSrvStream::Codec |
|
769 // ----------------------------------------------------------------------------- |
|
770 // |
|
771 CMceComCodec& CMceSrvStream::Codec() const |
|
772 { |
|
773 return *iCodec; |
|
774 } |
|
775 |
|
776 // ----------------------------------------------------------------------------- |
|
777 // CMceSrvStream::Invalidate |
|
778 // ----------------------------------------------------------------------------- |
|
779 // |
|
780 void CMceSrvStream::Invalidate() |
|
781 { |
|
782 MCEMM_DEBUG("CMceSrvStream::Invalidate(), Entry "); |
|
783 |
|
784 TMceMccComEvent invalidate( KMccStreamStopped, |
|
785 Data().iLinkId, iID, 0 ); |
|
786 |
|
787 EventReceived( invalidate, KMceSrvStreamNoCallback ); |
|
788 MCEMM_DEBUG("CMceSrvStream::Invalidate(), Exit "); |
|
789 |
|
790 } |
|
791 |
|
792 // ----------------------------------------------------------------------------- |
|
793 // CMceSrvStream::EventReceived |
|
794 // ----------------------------------------------------------------------------- |
|
795 // |
|
796 TInt CMceSrvStream::EventReceived( TMceMccComEvent& aEvent, TBool aCallback ) |
|
797 { |
|
798 |
|
799 MCEMM_DEBUG("CMceSrvStream::EventReceived(), Entry "); |
|
800 MCEMM_DEBUG_DVALUE("event", aEvent.iEvent ); |
|
801 MCEMM_DEBUG_DVALUE("callback", aCallback ); |
|
802 |
|
803 TInt status = KMceEventConsumed; |
|
804 |
|
805 if ( aEvent.iEvent == KMccLinkCreated ) |
|
806 { |
|
807 if ( State() == ECreatingLink ) //might be inactive |
|
808 { |
|
809 iSource->EventReceived( aEvent ); |
|
810 iSink->EventReceived( aEvent ); |
|
811 TPckgBuf<TMccNetSettings> netSettingsBuf; |
|
812 netSettingsBuf.Copy( *aEvent.iItcDataDesC ); |
|
813 TMccNetSettings netSettings = netSettingsBuf(); |
|
814 SetLocalMediaPort( netSettings.iLocalAddress.Port() ); |
|
815 Data().Session()->iServiceType = netSettings.iMediaQosValue; |
|
816 TMceSrvStreamIterator streams( Data().Session()->MccStreams(), |
|
817 Data() ); |
|
818 CMceSrvStream* stream = NULL; |
|
819 if ( !streams.Next( stream, ECreatingLink ) ) |
|
820 { |
|
821 // If all created, update client side |
|
822 Data().EventReceived( aEvent ); |
|
823 } |
|
824 } |
|
825 } |
|
826 else if ( IsMccPrepared() || |
|
827 aEvent.iLinkId == Data().iLinkId ) |
|
828 { |
|
829 aEvent.iCodec = iCodec; |
|
830 aEvent.iSource = aEvent.iEndpointId > 0 && iSource->Id() == aEvent.iEndpointId ? |
|
831 &iSource->Data() : NULL; |
|
832 aEvent.iSink = aEvent.iEndpointId > 0 && iSink->Id() == aEvent.iEndpointId ? |
|
833 &iSink->Data() : NULL; |
|
834 |
|
835 if ( aEvent.iSource ) |
|
836 { |
|
837 iSource->EventReceived( aEvent ); |
|
838 } |
|
839 else if ( aEvent.iSink ) |
|
840 { |
|
841 iSink->EventReceived( aEvent ); |
|
842 } |
|
843 else |
|
844 { |
|
845 iSource->EventReceived( aEvent ); |
|
846 iSink->EventReceived( aEvent ); |
|
847 } |
|
848 |
|
849 TBool allowEvent( ETrue ); |
|
850 if ( MCE_MCC_STREAM_STATE_CHANGE_EVENT( aEvent ) ) |
|
851 { |
|
852 allowEvent = StreamStateChangeEventReceived( aEvent ); |
|
853 } |
|
854 |
|
855 if ( Data().iState == CMceMediaStream::EDisabled && |
|
856 aEvent.iEvent == KMccStreamError && |
|
857 aEvent.iError == KErrHostUnreach ) |
|
858 { |
|
859 allowEvent = EFalse; |
|
860 } |
|
861 |
|
862 if ( allowEvent ) |
|
863 { |
|
864 Data().SetState( aEvent ); |
|
865 if ( aCallback ) |
|
866 { |
|
867 Data().EventReceived( aEvent ); |
|
868 } |
|
869 } |
|
870 } |
|
871 else //if 'local' stream |
|
872 { |
|
873 iSource->EventReceived( aEvent ); |
|
874 iSink->EventReceived( aEvent ); |
|
875 } |
|
876 |
|
877 MCEMM_DEBUG_STREAM( "CMceSrvStream::EventReceived(): after received", *this ); |
|
878 MCEMM_DEBUG("CMceSrvStream::EventReceived(), Exit "); |
|
879 |
|
880 return status; |
|
881 } |
|
882 |
|
883 |
|
884 // ----------------------------------------------------------------------------- |
|
885 // CMceSrvStream::RequireSignalling |
|
886 // ----------------------------------------------------------------------------- |
|
887 // |
|
888 TInt CMceSrvStream::RequireSignalling( CMceSrvStream& aCurrent, |
|
889 CMccCodecInformation& aMccCurentCodec, |
|
890 CMccCodecInformation& aMccUpdateCodec ) const |
|
891 { |
|
892 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(), Entry "); |
|
893 |
|
894 TInt action = KMceNoSignalling; |
|
895 |
|
896 if ( Codec().MccRequireSignalling( *this, aMccCurentCodec, aMccUpdateCodec ) ) |
|
897 { |
|
898 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): codec requires signalling"); |
|
899 action = KMceRequiresSignalling; |
|
900 } |
|
901 else if ( LocalMediaPort() != aCurrent.LocalMediaPort() || |
|
902 Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) ) |
|
903 //local port has changed => needs new media session & signaling |
|
904 { |
|
905 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): local port changed. requires signalling"); |
|
906 action = KMceRequiresSignalling; |
|
907 } |
|
908 |
|
909 else if ( Data().RemoteRTCPAddressChanged(aCurrent.Data().iRemoteRtcpPort, |
|
910 aCurrent.Data().iRemoteRtcpAddress)) |
|
911 |
|
912 { |
|
913 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote Rtcp Port changed, requires signalling"); |
|
914 action = KMceRequiresSignalling; |
|
915 } |
|
916 |
|
917 else if ( Data().iIsEnabled != aCurrent.Data().iIsEnabled ) |
|
918 //hold or resume => just SIP signaling |
|
919 { |
|
920 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): hold/resume detected. requires signalling"); |
|
921 action = KMceRequiresSipSignallingOnly; |
|
922 } |
|
923 else |
|
924 { |
|
925 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): requires no signalling"); |
|
926 //NOP |
|
927 } |
|
928 |
|
929 MCEMM_DEBUG("CMceSrvStream::RequireSignalling(), Exit "); |
|
930 return action; |
|
931 |
|
932 } |
|
933 |
|
934 |
|
935 // ----------------------------------------------------------------------------- |
|
936 // CMceSrvStream::RequireSignalling |
|
937 // ----------------------------------------------------------------------------- |
|
938 // |
|
939 TInt CMceSrvStream::RequireSignalling( |
|
940 RPointerArray<CMceSrvStream>& /*aUpdateStreams*/ ) const |
|
941 { |
|
942 TInt action = KMceRequiresSignalling; |
|
943 |
|
944 //local stream added or removed => no signalling |
|
945 if ( StreamType() == CMceComMediaStream::ELocalStream ) |
|
946 { |
|
947 action = KMceNoSignalling; |
|
948 } |
|
949 //enabled stream |
|
950 else if ( !IsMccPrepared() ) |
|
951 { |
|
952 action = KMceRequiresSipSignallingOnly; |
|
953 } |
|
954 return action; |
|
955 |
|
956 } |
|
957 |
|
958 // ----------------------------------------------------------------------------- |
|
959 // CMceSrvStream::State |
|
960 // ----------------------------------------------------------------------------- |
|
961 // |
|
962 CMceSrvStream::TState CMceSrvStream::State() const |
|
963 { |
|
964 |
|
965 CMceSrvStream::TState state = EInactive; |
|
966 |
|
967 if ( iSource->State() == ECreated && |
|
968 iSink->State() == ECreated && |
|
969 Data().IsEnabled() ) |
|
970 { |
|
971 state = ECreated; |
|
972 } |
|
973 else if ( iSource->State() == EStopped && |
|
974 iSink->State() == EStopped ) |
|
975 { |
|
976 state = EStopped; |
|
977 } |
|
978 else if ( iSource->State() == EPending && |
|
979 iSink->State() == EPending ) |
|
980 { |
|
981 state = EPending; |
|
982 } |
|
983 else if ( iSource->State() == ECreatingLink || |
|
984 iSink->State() == ECreatingLink ) |
|
985 { |
|
986 state = ECreatingLink; |
|
987 } |
|
988 else if ( iSource->State() == EPreparing || |
|
989 iSink->State() == EPreparing ) |
|
990 { |
|
991 state = EPreparing; |
|
992 } |
|
993 else if ( iSource->State() == EStarting || |
|
994 iSink->State() == EStarting ) |
|
995 { |
|
996 state = EStarting; |
|
997 } |
|
998 else if ( iSource->State() == ELinkCreated || |
|
999 iSink->State() == ELinkCreated ) |
|
1000 { |
|
1001 state = ELinkCreated; |
|
1002 } |
|
1003 else if ( iSource->State() == EPrepared || |
|
1004 iSink->State() == EPrepared ) |
|
1005 { |
|
1006 state = EPrepared; |
|
1007 } |
|
1008 else if ( iSource->State() >= EStarted || |
|
1009 iSink->State() >= EStarted ) |
|
1010 { |
|
1011 state = EStarted; |
|
1012 } |
|
1013 else |
|
1014 { |
|
1015 state = EInactive; |
|
1016 } |
|
1017 |
|
1018 return state; |
|
1019 |
|
1020 } |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 // ----------------------------------------------------------------------------- |
|
1026 // CMceSrvStream::MccPrepareCalledL |
|
1027 // ----------------------------------------------------------------------------- |
|
1028 // |
|
1029 void CMceSrvStream::MccPrepareCalledL() |
|
1030 { |
|
1031 iSource->MccPrepareCalledL( *this ); |
|
1032 iSink->MccPrepareCalledL( *this ); |
|
1033 } |
|
1034 |
|
1035 |
|
1036 |
|
1037 // ----------------------------------------------------------------------------- |
|
1038 // CMceSrvStream::MccStreamType |
|
1039 // ----------------------------------------------------------------------------- |
|
1040 // |
|
1041 TInt CMceSrvStream::MccStreamType() const |
|
1042 { |
|
1043 if ( iCodec->iSdpName.CompareF( KMceSDPNameDtmf ) == 0 ) |
|
1044 { |
|
1045 return KMccDtmfStream; |
|
1046 } |
|
1047 return iData->MccStreamType(); |
|
1048 } |
|
1049 |
|
1050 // ----------------------------------------------------------------------------- |
|
1051 // CMceSrvStream::StreamType |
|
1052 // ----------------------------------------------------------------------------- |
|
1053 // |
|
1054 CMceComMediaStream::TStreamType CMceSrvStream::StreamType() const |
|
1055 { |
|
1056 return iData->iStreamType; |
|
1057 } |
|
1058 |
|
1059 // ----------------------------------------------------------------------------- |
|
1060 // CMceSrvStream::Direction |
|
1061 // ----------------------------------------------------------------------------- |
|
1062 // |
|
1063 CMceComMediaStream::TStreamType CMceSrvStream::Direction() const |
|
1064 { |
|
1065 CMceComMediaStream::TStreamType type = StreamType(); |
|
1066 TInt direction = iData->Direction(); |
|
1067 if ( direction == SdpCodecStringConstants::EAttributeRecvonly ) |
|
1068 { |
|
1069 type = type == CMceComMediaStream::EReceiveStream ? |
|
1070 CMceComMediaStream::EReceiveOnlyStream : type; |
|
1071 } |
|
1072 else if ( direction == SdpCodecStringConstants::EAttributeSendonly ) |
|
1073 { |
|
1074 type = type == CMceComMediaStream::ESendStream ? |
|
1075 CMceComMediaStream::ESendOnlyStream : type; |
|
1076 } |
|
1077 else |
|
1078 { |
|
1079 } |
|
1080 |
|
1081 return type; |
|
1082 } |
|
1083 |
|
1084 |
|
1085 // ----------------------------------------------------------------------------- |
|
1086 // CMceSrvStream::LinkType |
|
1087 // ----------------------------------------------------------------------------- |
|
1088 // |
|
1089 TInt CMceSrvStream::LinkType() const |
|
1090 { |
|
1091 return iData->MccLinkType(); |
|
1092 } |
|
1093 |
|
1094 |
|
1095 |
|
1096 // ----------------------------------------------------------------------------- |
|
1097 // CMceSrvStream::EventReceived |
|
1098 // ----------------------------------------------------------------------------- |
|
1099 // |
|
1100 CMceSrvStream* CMceSrvStream::EventReceived( RPointerArray<CMceSrvStream>& aStreams, |
|
1101 TMceMccComEvent& aEvent, |
|
1102 TBool aConsumeOnlyOnce ) |
|
1103 { |
|
1104 TMceSrvStreamIterator iterator( aStreams ); |
|
1105 CMceSrvStream* stream = NULL; |
|
1106 CMceSrvStream* firstMatch = NULL; |
|
1107 |
|
1108 TBool propagate( ETrue ); |
|
1109 while( iterator.Next( stream, aEvent ) && propagate ) |
|
1110 { |
|
1111 propagate = ( stream->EventReceived( aEvent ) == KMceEventConsumed ) ? |
|
1112 ( !aConsumeOnlyOnce ) : ETrue; |
|
1113 firstMatch = !firstMatch ? stream : firstMatch; |
|
1114 } |
|
1115 |
|
1116 return firstMatch; |
|
1117 } |
|
1118 |
|
1119 // ----------------------------------------------------------------------------- |
|
1120 // CMceSrvStream::StreamStateChangeEventReceived |
|
1121 // ----------------------------------------------------------------------------- |
|
1122 // |
|
1123 TBool CMceSrvStream::StreamStateChangeEventReceived( TMceMccComEvent& aEvent ) |
|
1124 { |
|
1125 TBool allowEvent( ETrue ); |
|
1126 |
|
1127 switch ( aEvent.iEvent ) |
|
1128 { |
|
1129 case KMccStreamStarted: |
|
1130 case KMccStreamPaused: |
|
1131 case KMccStreamResumed: |
|
1132 { |
|
1133 // Client side is not affected until all mcc streams are on same |
|
1134 // level |
|
1135 if ( aEvent.iSource ) |
|
1136 { |
|
1137 allowEvent = iSource->StreamStateChangeEventReceived( aEvent ); |
|
1138 } |
|
1139 else if ( aEvent.iSink ) |
|
1140 { |
|
1141 allowEvent = iSink->StreamStateChangeEventReceived( aEvent ); |
|
1142 } |
|
1143 else |
|
1144 { |
|
1145 // It might be that only another endpoint can be informed, |
|
1146 // in that case modify the event |
|
1147 TBool allowSourceEvent = iSource->StreamStateChangeEventReceived( aEvent ); |
|
1148 aEvent.iSource = allowSourceEvent ? aEvent.iSource : 0; |
|
1149 TBool allowSinkEvent = iSink->StreamStateChangeEventReceived( aEvent ); |
|
1150 aEvent.iSink = allowSinkEvent ? aEvent.iSink : 0; |
|
1151 allowEvent = ( allowSourceEvent || allowSinkEvent ); |
|
1152 } |
|
1153 break; |
|
1154 } |
|
1155 case KMccStreamStopped: |
|
1156 { |
|
1157 // Special handling for stopped events, all streams associated with |
|
1158 // the source and sink has to be stopped before state can be updated |
|
1159 // |
|
1160 TMceSrvStreamIterator streams( Data().Session()->MccStreams(), |
|
1161 iSource->Data() ); |
|
1162 CMceSrvStream* stream = NULL; |
|
1163 if ( streams.Next( |
|
1164 stream, |
|
1165 CMceSrvStream::EStopped, |
|
1166 TMceSrvStreamIterator::ExactReverseMatch ) ) |
|
1167 { |
|
1168 allowEvent = EFalse; |
|
1169 } |
|
1170 |
|
1171 TMceSrvStreamIterator streams2( Data().Session()->MccStreams(), |
|
1172 iSink->Data() ); |
|
1173 stream = NULL; |
|
1174 if ( allowEvent && streams2.Next( |
|
1175 stream, |
|
1176 CMceSrvStream::EStopped, |
|
1177 TMceSrvStreamIterator::ExactReverseMatch ) ) |
|
1178 { |
|
1179 allowEvent = EFalse; |
|
1180 } |
|
1181 break; |
|
1182 } |
|
1183 default: |
|
1184 { |
|
1185 break; |
|
1186 } |
|
1187 } |
|
1188 |
|
1189 return allowEvent; |
|
1190 } |
|
1191 |
|
1192 // ----------------------------------------------------------------------------- |
|
1193 // CMceSrvStream::DoEndpointDisable |
|
1194 // ----------------------------------------------------------------------------- |
|
1195 // |
|
1196 void CMceSrvStream::DoEndpointDisable( CMceSrvEndpoint& aEndpoint ) |
|
1197 { |
|
1198 // Disable only if all corresponding endpoints are stopped |
|
1199 // |
|
1200 TMceSrvStreamIterator streams( Data().Session()->MccStreams(), |
|
1201 aEndpoint.Data(), |
|
1202 KMceComNoProxyMatch, |
|
1203 TMceSrvStreamIterator::ELocal ); |
|
1204 |
|
1205 CMceSrvStream* stream = NULL; |
|
1206 TBool allowDisable( ETrue ); |
|
1207 while ( streams.Next( stream ) && allowDisable ) |
|
1208 { |
|
1209 if ( stream != this && |
|
1210 aEndpoint.Endpoint( *stream ).State() != CMceSrvStream::EStopped ) |
|
1211 { |
|
1212 MCEMM_DEBUG("CMceSrvStream::DoEndpointDisable(): stopping not yet allowed"); |
|
1213 allowDisable = EFalse; |
|
1214 } |
|
1215 } |
|
1216 |
|
1217 if ( allowDisable ) |
|
1218 { |
|
1219 TRAP_IGNORE( |
|
1220 aEndpoint.DisableL( *this, KMceSrvStreamNoSync, KMceSrvStreamForce ) ); |
|
1221 } |
|
1222 } |
|
1223 |
|
1224 // End of file |