18 |
18 |
19 |
19 |
20 // USER INCLUDES |
20 // USER INCLUDES |
21 |
21 |
22 #include "musengreceivesession.h" |
22 #include "musengreceivesession.h" |
23 #include "musengsessionobserver.h" |
|
24 #include "musengreceivesessionobserver.h" |
23 #include "musengreceivesessionobserver.h" |
25 #include "musengmceutils.h" |
24 //#include "musengmceutils.h" |
26 #include "musenglogger.h" |
25 //#include "muslogger.h" |
27 #include "mussipprofilehandler.h" |
|
28 #include "mussessionproperties.h" |
|
29 |
26 |
30 // SYSTEM INCLUDES |
27 // SYSTEM INCLUDES |
31 #include <mcemanager.h> |
28 #include <mcemanager.h> |
32 #include <mceinsession.h> |
29 #include <mceinsession.h> |
33 #include <mcestreambundle.h> |
|
34 #include <mceaudiostream.h> |
30 #include <mceaudiostream.h> |
35 #include <mcevideostream.h> |
31 #include <mcevideostream.h> |
36 #include <mcemediasource.h> |
32 #include <mcemediasource.h> |
37 #include <mcertpsource.h> |
33 #include <mcertpsource.h> |
38 #include <mcedisplaysink.h> |
34 #include <mcedisplaysink.h> |
39 #include <mcespeakersink.h> |
35 #include <mcespeakersink.h> |
40 #include <mceaudiocodec.h> |
|
41 #include <mceavccodec.h> |
|
42 #include <e32property.h> |
|
43 |
36 |
44 #include <utf.h> |
37 #include <utf.h> |
45 |
38 |
46 |
39 |
47 const TUint8 KMusEngRtpKeepAliveTimer = 5; // this should be 30 sec, this a temporary fix |
40 const TInt KMaxUriLength = 512; |
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 |
41 |
70 // ----------------------------------------------------------------------------- |
42 // ----------------------------------------------------------------------------- |
71 // |
43 // |
72 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
73 // |
45 // |
74 CMusEngReceiveSession::~CMusEngReceiveSession() |
46 CMusEngReceiveSession::~CMusEngReceiveSession() |
75 { |
47 { |
76 delete iRemoteDisplayName; |
|
77 } |
48 } |
78 |
49 |
79 |
50 |
80 // ----------------------------------------------------------------------------- |
51 // ----------------------------------------------------------------------------- |
81 // |
52 // |
82 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
83 // |
54 // |
84 CMusEngReceiveSession* CMusEngReceiveSession::NewL( const TRect& aRect ) |
55 EXPORT_C CMusEngReceiveSession* CMusEngReceiveSession::NewL( |
|
56 const TRect& aRect, |
|
57 MMusEngReceiveSessionObserver* aSessionObserver) |
85 { |
58 { |
86 MUS_LOG( "mus: [ENGINE] -> CMusEngReceiveSession::NewL(...)" ) |
59 CMusEngReceiveSession* self = |
87 |
60 new( ELeave ) CMusEngReceiveSession( aSessionObserver, aRect ); |
88 CMusEngReceiveSession* self = new( ELeave ) CMusEngReceiveSession( aRect ); |
|
89 CleanupStack::PushL( self ); |
61 CleanupStack::PushL( self ); |
90 self->ConstructL(); |
62 self->ConstructL(); |
91 CleanupStack::Pop( self ); |
63 CleanupStack::Pop( self ); |
92 |
|
93 MUS_LOG( "mus: [ENGINE] <- CMusEngReceiveSession::NewL(...)" ) |
|
94 return self; |
64 return self; |
95 } |
65 } |
96 |
66 |
97 |
67 |
98 // ----------------------------------------------------------------------------- |
68 // ----------------------------------------------------------------------------- |
99 // From MLcSession |
69 // |
100 // ----------------------------------------------------------------------------- |
70 // ----------------------------------------------------------------------------- |
101 // |
71 // |
102 void CMusEngReceiveSession::EstablishLcSessionL() |
72 EXPORT_C void CMusEngReceiveSession::AcceptInvitationL( |
|
73 const TBool& aAccept ) |
|
74 { |
|
75 iAccepInvitation = aAccept; |
|
76 } |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 EXPORT_C void CMusEngReceiveSession::SetSessionObserver( |
|
84 MMusEngReceiveSessionObserver* aSessionObserver) |
|
85 { |
|
86 iSessionObserver = aSessionObserver; |
|
87 } |
|
88 |
|
89 |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 TBool CMusEngReceiveSession::IsRtpcInactivityTimoutSupported() |
|
96 { |
|
97 return ETrue; |
|
98 } |
|
99 |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 CMusEngReceiveSession::CMusEngReceiveSession( |
|
106 MMusEngReceiveSessionObserver* aSessionObserver, |
|
107 const TRect& aRect ) |
|
108 : CMusEngMceSession( aRect ) |
103 { |
109 { |
104 } |
110 } |
105 |
111 |
106 // ----------------------------------------------------------------------------- |
112 |
107 // From MLcSession |
|
108 // ----------------------------------------------------------------------------- |
113 // ----------------------------------------------------------------------------- |
109 // |
114 // |
110 MLcVideoPlayer* CMusEngReceiveSession::RemoteVideoPlayer() |
|
111 { |
|
112 return this; |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // From MLcSession |
|
117 // ----------------------------------------------------------------------------- |
115 // ----------------------------------------------------------------------------- |
118 // |
116 // |
119 |
117 void CMusEngReceiveSession::ConstructL() |
120 const TDesC& CMusEngReceiveSession::RemoteDisplayName() |
118 { |
121 { |
119 } |
122 return *iRemoteDisplayName; |
120 |
123 } |
121 |
124 |
|
125 |
122 |
126 // ----------------------------------------------------------------------------- |
123 // ----------------------------------------------------------------------------- |
127 // From MLcVideoPlayer |
124 // |
128 // ----------------------------------------------------------------------------- |
125 // ----------------------------------------------------------------------------- |
129 // |
126 // |
130 MLcVideoPlayer::TLcVideoPlayerState CMusEngReceiveSession::LcVideoPlayerState() const |
127 MMusEngReceiveSessionObserver* CMusEngReceiveSession::ReceiveSessionObserver() |
131 { |
128 { |
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 } |
129 } |
144 |
130 |
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 |
|