|
1 /* |
|
2 * Copyright (c) 2006 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 // USER INCLUDES |
|
21 |
|
22 #include "musengreceivesession.h" |
|
23 #include "musengsessionobserver.h" |
|
24 #include "musengreceivesessionobserver.h" |
|
25 #include "musengmceutils.h" |
|
26 #include "musenglogger.h" |
|
27 #include "mussipprofilehandler.h" |
|
28 #include "mussessionproperties.h" |
|
29 |
|
30 // SYSTEM INCLUDES |
|
31 #include <mcemanager.h> |
|
32 #include <mceinsession.h> |
|
33 #include <mcestreambundle.h> |
|
34 #include <mceaudiostream.h> |
|
35 #include <mcevideostream.h> |
|
36 #include <mcemediasource.h> |
|
37 #include <mcertpsource.h> |
|
38 #include <mcedisplaysink.h> |
|
39 #include <mcespeakersink.h> |
|
40 #include <mceaudiocodec.h> |
|
41 #include <mceavccodec.h> |
|
42 #include <e32property.h> |
|
43 |
|
44 #include <utf.h> |
|
45 |
|
46 |
|
47 const TUint8 KMusEngRtpKeepAliveTimer = 5; // this should be 30 sec, this a temporary fix |
|
48 const TUint8 KMusEngKeepAlivePayloadTypeVideoH263 = 96; |
|
49 const TUint8 KMusEngKeepAlivePayloadTypeAudio = 97; |
|
50 const TUint8 KMusEngKeepAlivePayloadTypeVideoAvc = 98; |
|
51 |
|
52 const TInt KMusEngJitterBufferLength = 51; //Must be bigger than treshold |
|
53 // Using following value increases treshold buffer to 1 second from |
|
54 // default 100 ms |
|
55 const TInt KMusEngJitterBufferTreshold = 50; |
|
56 const TInt KMusEngTresholdToSecondsFactor = 20; |
|
57 const TInt KMusEngOneSecondInMilliSeconds = 1000; |
|
58 // Use inactivity timer value that is a little bigger than treshold in seconds |
|
59 const TUint KMusEngInactivityTimer = KMusEngTresholdToSecondsFactor * |
|
60 KMusEngJitterBufferTreshold + |
|
61 KMusEngOneSecondInMilliSeconds; |
|
62 |
|
63 _LIT8( KMusEngSwisIdentifier, "Require: precondition" ); |
|
64 _LIT8( KMusEngAssertedIdentity, "P-Asserted-Identity" ); |
|
65 _LIT8( KMusEngBiggerSign, ">" ); |
|
66 |
|
67 const TInt KMusEngSipReasonCodeBusyHere = 486; |
|
68 _LIT8( KMusEngSipReasonPhraseBusy, "Busy" ); |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 CMusEngReceiveSession::~CMusEngReceiveSession() |
|
75 { |
|
76 delete iRemoteDisplayName; |
|
77 } |
|
78 |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 CMusEngReceiveSession* CMusEngReceiveSession::NewL( const TRect& aRect ) |
|
85 { |
|
86 MUS_LOG( "mus: [ENGINE] -> CMusEngReceiveSession::NewL(...)" ) |
|
87 |
|
88 CMusEngReceiveSession* self = new( ELeave ) CMusEngReceiveSession( aRect ); |
|
89 CleanupStack::PushL( self ); |
|
90 self->ConstructL(); |
|
91 CleanupStack::Pop( self ); |
|
92 |
|
93 MUS_LOG( "mus: [ENGINE] <- CMusEngReceiveSession::NewL(...)" ) |
|
94 return self; |
|
95 } |
|
96 |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // From MLcSession |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CMusEngReceiveSession::EstablishLcSessionL() |
|
103 { |
|
104 } |
|
105 |
|
106 // ----------------------------------------------------------------------------- |
|
107 // From MLcSession |
|
108 // ----------------------------------------------------------------------------- |
|
109 // |
|
110 MLcVideoPlayer* CMusEngReceiveSession::RemoteVideoPlayer() |
|
111 { |
|
112 return this; |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // From MLcSession |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 |
|
120 const TDesC& CMusEngReceiveSession::RemoteDisplayName() |
|
121 { |
|
122 return *iRemoteDisplayName; |
|
123 } |
|
124 |
|
125 |
|
126 // ----------------------------------------------------------------------------- |
|
127 // From MLcVideoPlayer |
|
128 // ----------------------------------------------------------------------------- |
|
129 // |
|
130 MLcVideoPlayer::TLcVideoPlayerState CMusEngReceiveSession::LcVideoPlayerState() const |
|
131 { |
|
132 TLcVideoPlayerState vidPlayerState = MLcVideoPlayer::EUnavailable; |
|
133 |
|
134 return vidPlayerState; |
|
135 } |
|
136 // ----------------------------------------------------------------------------- |
|
137 // From MLcVideoPlayer |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 TBool CMusEngReceiveSession::LcIsPlayingL() |
|
141 { |
|
142 return EFalse; |
|
143 } |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // From MLcVideoPlayer |
|
147 // ----------------------------------------------------------------------------- |
|
148 // |
|
149 void CMusEngReceiveSession::LcPlayL() |
|
150 { |
|
151 // NOP |
|
152 } |
|
153 |
|
154 // ----------------------------------------------------------------------------- |
|
155 // From MLcVideoPlayer |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 void CMusEngReceiveSession::LcPauseL() |
|
159 { |
|
160 // NOP |
|
161 } |
|
162 |
|
163 // ----------------------------------------------------------------------------- |
|
164 // From MLcVideoPlayer |
|
165 // ----------------------------------------------------------------------------- |
|
166 // |
|
167 MLcWindow* CMusEngReceiveSession::LcWindow() |
|
168 { |
|
169 return this; |
|
170 } |
|
171 |
|
172 // ----------------------------------------------------------------------------- |
|
173 // From MLcVideoPlayer |
|
174 // ----------------------------------------------------------------------------- |
|
175 // |
|
176 MLcCameraControl* CMusEngReceiveSession::LcCameraControl() |
|
177 { |
|
178 return NULL; |
|
179 } |
|
180 |
|
181 // ----------------------------------------------------------------------------- |
|
182 // From MLcVideoPlayer |
|
183 // ----------------------------------------------------------------------------- |
|
184 // |
|
185 MLcFileControl* CMusEngReceiveSession::LcSourceFile() |
|
186 { |
|
187 return NULL; |
|
188 } |
|
189 |
|
190 // ----------------------------------------------------------------------------- |
|
191 // From MLcVideoPlayer |
|
192 // ----------------------------------------------------------------------------- |
|
193 // |
|
194 MLcFileControl* CMusEngReceiveSession::LcDestinationFile() |
|
195 { |
|
196 return NULL; |
|
197 } |
|
198 |
|
199 // ----------------------------------------------------------------------------- |
|
200 // From MLcVideoPlayer |
|
201 // ----------------------------------------------------------------------------- |
|
202 // |
|
203 MLcAudioControl* CMusEngReceiveSession::LcAudioControl() |
|
204 { |
|
205 return this; |
|
206 } |
|
207 |
|
208 // ----------------------------------------------------------------------------- |
|
209 // From MLcVideoPlayer |
|
210 // ----------------------------------------------------------------------------- |
|
211 // |
|
212 MLcZoomControl* CMusEngReceiveSession::LcZoomControl() |
|
213 { |
|
214 return NULL; |
|
215 } |
|
216 |
|
217 // ----------------------------------------------------------------------------- |
|
218 // From MLcVideoPlayer |
|
219 // ----------------------------------------------------------------------------- |
|
220 // |
|
221 MLcBrightnessControl* CMusEngReceiveSession::LcBrightnessControl() |
|
222 { |
|
223 return NULL; |
|
224 } |
|
225 |
|
226 // ----------------------------------------------------------------------------- |
|
227 // From MLcVideoPlayer |
|
228 // ----------------------------------------------------------------------------- |
|
229 // |
|
230 RPointerArray< MLcValueControl >& CMusEngReceiveSession::LcExtensionControls() |
|
231 { |
|
232 return iValueControls; |
|
233 } |
|
234 |
|
235 // End of File |