16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // USER |
19 // USER |
20 #include "musengmcesession.h" |
20 #include "musengmcesession.h" |
|
21 #include "musengsessiondurationtimer.h" |
|
22 #include "musengoutsessionobserver.h" |
|
23 //#include "musengmceutils.h" |
|
24 //#include "musuid.hrh" |
|
25 #include "musengclipsessionobserver.h" |
|
26 |
|
27 // SYSTEM |
|
28 /* |
|
29 #include <mcemanager.h> |
|
30 #include <mcesession.h> |
|
31 #include <mcevideostream.h> |
|
32 #include <mceaudiostream.h> |
|
33 #include <mcertpsink.h> |
|
34 #include <mcedisplaysink.h> |
|
35 #include <mcespeakersink.h> |
|
36 #include <mcefilesource.h> |
|
37 */ |
|
38 |
|
39 const TInt KMusEngTimerInterval = 1000000; // 1 second |
|
40 const TInt KMusEngRtcpInactivityThreshold = 20; // seconds |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CMusEngMceSession::~CMusEngMceSession() |
|
47 { |
|
48 } |
|
49 |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 EXPORT_C void CMusEngMceSession::TerminateL() |
|
56 { |
|
57 } |
|
58 |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 EXPORT_C void CMusEngMceSession::ReleaseInternalObservers() |
|
65 { |
|
66 } |
|
67 |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // Returns estabilished session time. If not established return |
|
71 // value is < 0 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C TTimeIntervalSeconds CMusEngMceSession::GetSessionTime() const |
|
75 { |
|
76 } |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 EXPORT_C TBool CMusEngMceSession::ConnectionActive() const |
|
84 { |
|
85 return EFalse; |
|
86 } |
|
87 |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 EXPORT_C void CMusEngMceSession::VolumeUpL() |
|
94 { |
|
95 } |
|
96 |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 EXPORT_C void CMusEngMceSession::VolumeDownL() |
|
103 { |
|
104 } |
|
105 |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 EXPORT_C void CMusEngMceSession::EnableDisplayL( TBool aEnable ) |
|
112 { |
|
113 iDisplayEnabled = aEnable; |
|
114 } |
|
115 |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // Mutes playback of sended audio streams. Audio data is still streamed. |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 EXPORT_C void CMusEngMceSession::MuteL() |
|
122 { |
|
123 } |
|
124 |
|
125 |
|
126 // ----------------------------------------------------------------------------- |
|
127 // Unmutes playback of sended audio streams. |
|
128 // ----------------------------------------------------------------------------- |
|
129 // |
|
130 EXPORT_C void CMusEngMceSession::UnmuteL() |
|
131 { |
|
132 } |
21 |
133 |
22 |
134 |
23 // ----------------------------------------------------------------------------- |
135 // ----------------------------------------------------------------------------- |
24 // |
136 // |
25 // ----------------------------------------------------------------------------- |
137 // ----------------------------------------------------------------------------- |
26 // |
138 // |
27 CMusEngMceSession::CMusEngMceSession( const TRect& aRect ) |
139 CMusEngMceSession::CMusEngMceSession( const TRect& aRect ) |
28 : iRect ( aRect ) |
140 : CMusEngSession( aRect ), |
|
141 iSecondsFromLastRtcpReport ( 0 ) |
29 { |
142 { |
30 } |
143 } |
31 |
144 |
32 |
145 |
33 // ----------------------------------------------------------------------------- |
146 // ----------------------------------------------------------------------------- |
34 // |
147 // |
35 // ----------------------------------------------------------------------------- |
148 // ----------------------------------------------------------------------------- |
36 // |
149 // |
37 void CMusEngMceSession::ConstructL() |
150 void CMusEngMceSession::ConstructL() |
38 { |
151 { |
39 CMusEngSession::ConstructL(); // Base class ConstructL -first |
152 } |
40 } |
153 |
41 |
154 |
42 // ----------------------------------------------------------------------------- |
155 // ----------------------------------------------------------------------------- |
43 // |
156 // |
44 // ----------------------------------------------------------------------------- |
157 // ----------------------------------------------------------------------------- |
45 // |
158 // |
46 CMusEngMceSession::~CMusEngMceSession() |
159 void CMusEngMceSession::RectChangedL() |
47 { |
160 { |
48 } |
161 } |
49 |
162 |
50 // ----------------------------------------------------------------------------- |
163 |
51 // From MLcSession |
164 |
52 // ----------------------------------------------------------------------------- |
165 |
53 // |
166 // ----------------------------------------------------------------------------- |
54 |
167 // |
55 MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const |
168 // ----------------------------------------------------------------------------- |
56 { |
169 // |
57 TLcSessionState lcSessionState = MLcSession::EUninitialized; |
170 TBool CMusEngMceSession::IsRtpcInactivityTimoutSupported() |
58 return lcSessionState; |
171 { |
59 } |
172 return EFalse; |
60 |
173 } |
61 // ----------------------------------------------------------------------------- |
174 |
62 // From MLcSession |
175 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
176 // Initializes session timer to current time |
64 // |
177 // ----------------------------------------------------------------------------- |
65 void CMusEngMceSession::EstablishLcSessionL() |
178 // |
66 { |
179 void CMusEngMceSession::InitializeSessionTimer() |
67 User::Leave( KErrNotSupported ); |
180 { |
68 } |
181 } |
69 |
182 |
70 // ----------------------------------------------------------------------------- |
183 |
71 // From MLcSession |
184 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
185 // |
73 // |
186 // ----------------------------------------------------------------------------- |
74 void CMusEngMceSession::TerminateLcSessionL() |
187 // |
75 { |
188 void CMusEngMceSession::UpdateTimerEvent() |
76 } |
189 { |
77 |
190 } |
78 // ----------------------------------------------------------------------------- |
191 |
79 // From MLcSession |
192 |
80 // ----------------------------------------------------------------------------- |
193 // ----------------------------------------------------------------------------- |
81 // |
194 // Enables or disables all the speaker and rtp sinks of all the audio streams |
82 MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer() |
195 // ----------------------------------------------------------------------------- |
83 { |
196 // |
84 return NULL; |
197 void CMusEngMceSession::DoMuteL( TBool aMute ) |
85 } |
198 { |
86 |
199 } |
87 // ----------------------------------------------------------------------------- |
200 |
88 // From MLcSession |
201 |
89 // ----------------------------------------------------------------------------- |
202 // ----------------------------------------------------------------------------- |
90 // |
203 // Changes volume of all speaker sinks in the session structure |
91 MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer() |
204 // ----------------------------------------------------------------------------- |
92 { |
205 // |
93 return NULL; |
206 void CMusEngMceSession::ChangeVolumeByOneL( TBool aIncreaseVolume ) |
94 } |
207 { |
95 |
208 } |
96 // ----------------------------------------------------------------------------- |
209 |
97 // From MLcSession |
210 |
98 // ----------------------------------------------------------------------------- |
211 // ----------------------------------------------------------------------------- |
99 // |
212 // |
100 const TDesC& CMusEngMceSession::LocalDisplayName() |
213 // ----------------------------------------------------------------------------- |
101 { |
214 // |
102 return KNullDesC; |
215 void CMusEngMceSession::CheckClipEndL() |
103 } |
216 { |
104 |
217 } |
105 // ----------------------------------------------------------------------------- |
218 |
106 // From MLcSession |
219 |
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 const TDesC& CMusEngMceSession::RemoteDisplayName() |
|
110 { |
|
111 return KNullDesC; |
|
112 } |
|
113 |
|
114 // ----------------------------------------------------------------------------- |
|
115 // From MLcSession |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ ) |
|
119 { |
|
120 return KErrNotSupported; |
|
121 } |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // From MLcSession |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ ) |
|
128 { |
|
129 return KErrNotSupported; |
|
130 } |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // From MLcWindow |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 void CMusEngMceSession::EnableLcWindowL( TBool aEnable ) |
|
137 { |
|
138 iWindowEnabled = aEnable; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // From MLcWindow |
|
143 // ----------------------------------------------------------------------------- |
|
144 // |
|
145 TBool CMusEngMceSession::IsLcWindowEnabled() |
|
146 { |
|
147 return iWindowEnabled; |
|
148 } |
|
149 |
|
150 // ----------------------------------------------------------------------------- |
|
151 // From MLcWindow |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 void CMusEngMceSession::SetLcWindowRectL( TRect aRect ) |
|
155 { |
|
156 iRect = aRect; |
|
157 } |
|
158 |
|
159 |
|
160 // ----------------------------------------------------------------------------- |
|
161 // From MLcWindow |
|
162 // ----------------------------------------------------------------------------- |
|
163 // |
|
164 TRect CMusEngMceSession::LcWindowRect() |
|
165 { |
|
166 return iRect; |
|
167 } |
|
168 |
|
169 // ----------------------------------------------------------------------------- |
|
170 // From MLcWindow |
|
171 // ----------------------------------------------------------------------------- |
|
172 // |
|
173 void CMusEngMceSession::SetLcWindowOrientationL( |
|
174 TLcWindowOrientation aOrientation ) |
|
175 { |
|
176 iOrientation = aOrientation; |
|
177 } |
|
178 |
|
179 // ----------------------------------------------------------------------------- |
|
180 // From MLcWindow |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 MLcWindow::TLcWindowOrientation CMusEngMceSession::LcWindowOrientationL() |
|
184 { |
|
185 MLcWindow::TLcWindowOrientation orientation; |
|
186 if ( iOrientation == ELandscape ) |
|
187 { |
|
188 orientation = MLcWindow::ELandscape; |
|
189 } |
|
190 else |
|
191 { |
|
192 orientation = MLcWindow::EPortrait; |
|
193 } |
|
194 return orientation; |
|
195 } |
|
196 |
|
197 // ----------------------------------------------------------------------------- |
|
198 // From MLcAudioControl |
|
199 // ----------------------------------------------------------------------------- |
|
200 // |
|
201 TBool CMusEngMceSession::IsLcAudioMutedL() |
|
202 { |
|
203 return iMuted; |
|
204 } |
|
205 |
|
206 // ----------------------------------------------------------------------------- |
|
207 // From MLcAudioControl |
|
208 // ----------------------------------------------------------------------------- |
|
209 // |
|
210 void CMusEngMceSession::MuteLcAudioL( TBool aMute ) |
|
211 { |
|
212 iMuted = aMute; |
|
213 } |
|
214 |
|
215 // ----------------------------------------------------------------------------- |
|
216 // From MLcAudioControl |
|
217 // ----------------------------------------------------------------------------- |
|
218 // |
|
219 TBool CMusEngMceSession::IsEnablingLcLoudspeakerAllowed() |
|
220 { |
|
221 return iEnablingLoudspeakerAllowed; |
|
222 } |
|
223 |
|
224 // ----------------------------------------------------------------------------- |
|
225 // From MLcAudioControl |
|
226 // ----------------------------------------------------------------------------- |
|
227 // |
|
228 TBool CMusEngMceSession::IsLcMicMutedL() |
|
229 { |
|
230 return iMicMuted; |
|
231 } |
|
232 |
|
233 // ----------------------------------------------------------------------------- |
|
234 // From MLcAudioControl |
|
235 // ----------------------------------------------------------------------------- |
|
236 // |
|
237 void CMusEngMceSession::MuteLcMicL( TBool aMute ) |
|
238 { |
|
239 iMicMuted = aMute; |
|
240 } |
|
241 |
|
242 // ----------------------------------------------------------------------------- |
|
243 // From MLcAudioControl |
|
244 // ----------------------------------------------------------------------------- |
|
245 // |
|
246 TBool CMusEngMceSession::IsLcLoudspeakerEnabled() |
|
247 { |
|
248 return iLoudspeakerEnabled; |
|
249 } |
|
250 |
|
251 // ----------------------------------------------------------------------------- |
|
252 // From MLcAudioControl |
|
253 // ----------------------------------------------------------------------------- |
|
254 // |
|
255 void CMusEngMceSession::EnableLcLoudspeakerL( TBool aEnabled ) |
|
256 { |
|
257 iLoudspeakerEnabled = aEnabled; |
|
258 } |
|
259 |
|
260 // ----------------------------------------------------------------------------- |
|
261 // From MLcAudioControl |
|
262 // ----------------------------------------------------------------------------- |
|
263 // |
|
264 TInt CMusEngMceSession::LcVolumeL() |
|
265 { |
|
266 return iVolume; |
|
267 } |
|
268 |
|
269 // ----------------------------------------------------------------------------- |
|
270 // From MLcAudioControl |
|
271 // ----------------------------------------------------------------------------- |
|
272 // |
|
273 void CMusEngMceSession::SetLcVolumeL( TInt aValue ) |
|
274 { |
|
275 iVolume = aValue; |
|
276 } |
|
277 |
|
278 // ----------------------------------------------------------------------------- |
|
279 // From MLcAudioControl |
|
280 // ----------------------------------------------------------------------------- |
|
281 // |
|
282 void CMusEngMceSession::IncreaseLcVolumeL() |
|
283 { |
|
284 iVolume++; |
|
285 } |
|
286 |
|
287 // ----------------------------------------------------------------------------- |
|
288 // From MLcAudioControl |
|
289 // ----------------------------------------------------------------------------- |
|
290 // |
|
291 void CMusEngMceSession::DecreaseLcVolumeL() |
|
292 { |
|
293 iVolume--; |
|
294 } |
|
295 |
|
296 void CMusEngMceSession::UpdateLcSessionL() |
|
297 { |
|
298 } |
|
299 |
|
300 |
|
301 |
|
302 // End of file |
|