|
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 "mcesrvsink.h" |
|
22 #include "mcesrvstream.h" |
|
23 #include "mcemediamanager.h" |
|
24 #include "mcecommediasink.h" |
|
25 #include "mcertpsink.h" |
|
26 #include "mceevent.h" |
|
27 #include "mcesrvstreamiterator.h" |
|
28 #include "mcesdpsession.h" |
|
29 |
|
30 #define _MEDIA_SINK static_cast<CMceComMediaSink*>( &Data() ) |
|
31 |
|
32 // ============================ MEMBER FUNCTIONS =============================== |
|
33 |
|
34 |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CMceSrvSink::CMceSrvSink |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 CMceSrvSink::CMceSrvSink( CMceMediaManager& aManager, |
|
41 CMceComMediaSink& aData ) |
|
42 : CMceSrvEndpoint( aManager, aData ) |
|
43 { |
|
44 |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CMceSrvSink::~CMceSrvSink |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CMceSrvSink::~CMceSrvSink() |
|
52 { |
|
53 //NOP |
|
54 } |
|
55 |
|
56 // ----------------------------------------------------------------------------- |
|
57 // CMceSrvSink::MccPrepareCalledL |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CMceSrvSink::MccPrepareCalledL( CMceSrvStream& aStream ) |
|
61 { |
|
62 |
|
63 if ( Data().iType == KMceRTPSink ) |
|
64 { |
|
65 iSSRC = iManager->GetSSRCL( aStream ); |
|
66 //store it also to sink |
|
67 _MEDIA_SINK->SetSSRC( iSSRC ); |
|
68 } |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CMceSrvSink::Endpoint |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 CMceSrvEndpoint& CMceSrvSink::Endpoint( CMceSrvStream& aStream ) |
|
76 { |
|
77 return aStream.Sink(); |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CMceSrvSink::HandleSecureEventReceivedL |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 void CMceSrvSink::HandleSecureEventReceivedL( ) |
|
85 { |
|
86 |
|
87 TMceSrvStreamIterator streams( Data().MediaStream()->Session()->MccStreams(), |
|
88 Data() ); |
|
89 CMceSrvStream* stream = NULL; |
|
90 while ( streams.Next( stream ) ) |
|
91 { |
|
92 if ( stream->Codec().iIsEnabled && |
|
93 Endpoint( *stream ).State() > CMceSrvStream::EPrepared && |
|
94 Endpoint( *stream ).State() != CMceSrvStream::EPaused ) |
|
95 { |
|
96 Data().MediaStream()->Session()->SdpSession().Manager().PauseL( *(_MEDIA_SINK) ); |
|
97 } |
|
98 } |
|
99 |
|
100 } |
|
101 // End of file |
|
102 |