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