16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 // USER |
19 // USER |
20 #include "musengmcesession.h" |
20 #include "musengmcesession.h" |
21 #include "musengsessiondurationtimer.h" |
21 |
22 #include "musengoutsessionobserver.h" |
22 |
23 //#include "musengmceutils.h" |
23 // ----------------------------------------------------------------------------- |
24 //#include "musuid.hrh" |
24 // |
25 #include "musengclipsessionobserver.h" |
25 // ----------------------------------------------------------------------------- |
26 |
26 // |
27 // SYSTEM |
27 CMusEngMceSession::CMusEngMceSession( const TRect& aRect ) |
28 /* |
28 : iRect ( aRect ) |
29 #include <mcemanager.h> |
29 { |
30 #include <mcesession.h> |
30 } |
31 #include <mcevideostream.h> |
31 |
32 #include <mceaudiostream.h> |
32 |
33 #include <mcertpsink.h> |
33 // ----------------------------------------------------------------------------- |
34 #include <mcedisplaysink.h> |
34 // |
35 #include <mcespeakersink.h> |
35 // ----------------------------------------------------------------------------- |
36 #include <mcefilesource.h> |
36 // |
37 */ |
37 void CMusEngMceSession::ConstructL() |
38 |
38 { |
39 const TInt KMusEngTimerInterval = 1000000; // 1 second |
39 CMusEngSession::ConstructL(); // Base class ConstructL -first |
40 const TInt KMusEngRtcpInactivityThreshold = 20; // seconds |
40 } |
41 |
41 |
42 // ----------------------------------------------------------------------------- |
42 // ----------------------------------------------------------------------------- |
43 // |
43 // |
44 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
45 // |
45 // |
46 CMusEngMceSession::~CMusEngMceSession() |
46 CMusEngMceSession::~CMusEngMceSession() |
47 { |
47 { |
48 } |
48 } |
49 |
49 |
50 |
50 // ----------------------------------------------------------------------------- |
51 // ----------------------------------------------------------------------------- |
51 // From MLcSession |
52 // |
52 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
53 // |
54 // |
54 |
55 EXPORT_C void CMusEngMceSession::TerminateL() |
55 MLcSession::TLcSessionState CMusEngMceSession::LcSessionState() const |
56 { |
56 { |
57 } |
57 TLcSessionState lcSessionState = MLcSession::EUninitialized; |
58 |
58 return lcSessionState; |
59 |
59 } |
60 // ----------------------------------------------------------------------------- |
60 |
61 // |
61 // ----------------------------------------------------------------------------- |
62 // ----------------------------------------------------------------------------- |
62 // From MLcSession |
63 // |
63 // ----------------------------------------------------------------------------- |
64 EXPORT_C void CMusEngMceSession::ReleaseInternalObservers() |
64 // |
65 { |
65 void CMusEngMceSession::EstablishLcSessionL() |
66 } |
66 { |
67 |
67 User::Leave( KErrNotSupported ); |
68 |
68 } |
69 // ----------------------------------------------------------------------------- |
69 |
70 // Returns estabilished session time. If not established return |
70 // ----------------------------------------------------------------------------- |
71 // value is < 0 |
71 // From MLcSession |
72 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
73 // |
73 // |
74 EXPORT_C TTimeIntervalSeconds CMusEngMceSession::GetSessionTime() const |
74 void CMusEngMceSession::TerminateLcSessionL() |
75 { |
75 { |
76 } |
76 } |
77 |
77 |
78 |
78 // ----------------------------------------------------------------------------- |
79 // ----------------------------------------------------------------------------- |
79 // From MLcSession |
80 // |
80 // ----------------------------------------------------------------------------- |
81 // ----------------------------------------------------------------------------- |
81 // |
82 // |
82 MLcVideoPlayer* CMusEngMceSession::RemoteVideoPlayer() |
83 EXPORT_C TBool CMusEngMceSession::ConnectionActive() const |
83 { |
84 { |
84 return NULL; |
85 return EFalse; |
85 } |
86 } |
86 |
87 |
87 // ----------------------------------------------------------------------------- |
88 |
88 // From MLcSession |
89 // ----------------------------------------------------------------------------- |
89 // ----------------------------------------------------------------------------- |
90 // |
90 // |
91 // ----------------------------------------------------------------------------- |
91 MLcVideoPlayer* CMusEngMceSession::LocalVideoPlayer() |
92 // |
92 { |
93 EXPORT_C void CMusEngMceSession::VolumeUpL() |
93 return NULL; |
94 { |
94 } |
95 } |
95 |
96 |
96 // ----------------------------------------------------------------------------- |
97 |
97 // From MLcSession |
98 // ----------------------------------------------------------------------------- |
98 // ----------------------------------------------------------------------------- |
99 // |
99 // |
100 // ----------------------------------------------------------------------------- |
100 const TDesC& CMusEngMceSession::LocalDisplayName() |
101 // |
101 { |
102 EXPORT_C void CMusEngMceSession::VolumeDownL() |
102 return KNullDesC; |
103 { |
103 } |
104 } |
104 |
105 |
105 // ----------------------------------------------------------------------------- |
106 |
106 // From MLcSession |
107 // ----------------------------------------------------------------------------- |
107 // ----------------------------------------------------------------------------- |
108 // |
108 // |
109 // ----------------------------------------------------------------------------- |
109 const TDesC& CMusEngMceSession::RemoteDisplayName() |
110 // |
110 { |
111 EXPORT_C void CMusEngMceSession::EnableDisplayL( TBool aEnable ) |
111 return KNullDesC; |
112 { |
112 } |
113 iDisplayEnabled = aEnable; |
113 |
114 } |
114 // ----------------------------------------------------------------------------- |
115 |
115 // From MLcSession |
116 |
116 // ----------------------------------------------------------------------------- |
117 // ----------------------------------------------------------------------------- |
117 // |
118 // Mutes playback of sended audio streams. Audio data is still streamed. |
118 TInt CMusEngMceSession::SetParameter( TInt /*aId*/, TInt /*aValue*/ ) |
119 // ----------------------------------------------------------------------------- |
119 { |
120 // |
120 return KErrNotSupported; |
121 EXPORT_C void CMusEngMceSession::MuteL() |
121 } |
122 { |
122 |
123 } |
123 // ----------------------------------------------------------------------------- |
124 |
124 // From MLcSession |
125 |
125 // ----------------------------------------------------------------------------- |
126 // ----------------------------------------------------------------------------- |
126 // |
127 // Unmutes playback of sended audio streams. |
127 TInt CMusEngMceSession::ParameterValue( TInt /*aId*/ ) |
128 // ----------------------------------------------------------------------------- |
128 { |
129 // |
129 return KErrNotSupported; |
130 EXPORT_C void CMusEngMceSession::UnmuteL() |
130 } |
131 { |
131 |
132 } |
132 // ----------------------------------------------------------------------------- |
133 |
133 // From MLcWindow |
134 |
134 // ----------------------------------------------------------------------------- |
135 // ----------------------------------------------------------------------------- |
135 // |
136 // |
136 void CMusEngMceSession::EnableLcWindowL( TBool aEnable ) |
137 // ----------------------------------------------------------------------------- |
137 { |
138 // |
138 iWindowEnabled = aEnable; |
139 CMusEngMceSession::CMusEngMceSession( const TRect& aRect ) |
139 } |
140 : CMusEngSession( aRect ), |
140 |
141 iSecondsFromLastRtcpReport ( 0 ) |
141 // ----------------------------------------------------------------------------- |
142 { |
142 // From MLcWindow |
143 } |
143 // ----------------------------------------------------------------------------- |
144 |
144 // |
145 |
145 TBool CMusEngMceSession::IsLcWindowEnabled() |
146 // ----------------------------------------------------------------------------- |
146 { |
147 // |
147 return iWindowEnabled; |
148 // ----------------------------------------------------------------------------- |
148 } |
149 // |
149 |
150 void CMusEngMceSession::ConstructL() |
150 // ----------------------------------------------------------------------------- |
151 { |
151 // From MLcWindow |
152 } |
152 // ----------------------------------------------------------------------------- |
153 |
153 // |
154 |
154 void CMusEngMceSession::SetLcWindowRectL( TRect aRect ) |
155 // ----------------------------------------------------------------------------- |
155 { |
156 // |
156 iRect = aRect; |
157 // ----------------------------------------------------------------------------- |
157 } |
158 // |
158 |
159 void CMusEngMceSession::RectChangedL() |
159 |
160 { |
160 // ----------------------------------------------------------------------------- |
161 } |
161 // From MLcWindow |
162 |
162 // ----------------------------------------------------------------------------- |
163 |
163 // |
164 |
164 TRect CMusEngMceSession::LcWindowRect() |
165 |
165 { |
166 // ----------------------------------------------------------------------------- |
166 return iRect; |
167 // |
167 } |
168 // ----------------------------------------------------------------------------- |
168 |
169 // |
169 // ----------------------------------------------------------------------------- |
170 TBool CMusEngMceSession::IsRtpcInactivityTimoutSupported() |
170 // From MLcWindow |
171 { |
171 // ----------------------------------------------------------------------------- |
172 return EFalse; |
172 // |
173 } |
173 void CMusEngMceSession::SetLcWindowOrientationL( |
174 |
174 TLcWindowOrientation aOrientation ) |
175 // ----------------------------------------------------------------------------- |
175 { |
176 // Initializes session timer to current time |
176 iOrientation = aOrientation; |
177 // ----------------------------------------------------------------------------- |
177 } |
178 // |
178 |
179 void CMusEngMceSession::InitializeSessionTimer() |
179 // ----------------------------------------------------------------------------- |
180 { |
180 // From MLcWindow |
181 } |
181 // ----------------------------------------------------------------------------- |
182 |
182 // |
183 |
183 MLcWindow::TLcWindowOrientation CMusEngMceSession::LcWindowOrientationL() |
184 // ----------------------------------------------------------------------------- |
184 { |
185 // |
185 MLcWindow::TLcWindowOrientation orientation; |
186 // ----------------------------------------------------------------------------- |
186 if ( iOrientation == ELandscape ) |
187 // |
187 { |
188 void CMusEngMceSession::UpdateTimerEvent() |
188 orientation = MLcWindow::ELandscape; |
189 { |
189 } |
190 } |
190 else |
191 |
191 { |
192 |
192 orientation = MLcWindow::EPortrait; |
193 // ----------------------------------------------------------------------------- |
193 } |
194 // Enables or disables all the speaker and rtp sinks of all the audio streams |
194 return orientation; |
195 // ----------------------------------------------------------------------------- |
195 } |
196 // |
196 |
197 void CMusEngMceSession::DoMuteL( TBool aMute ) |
197 // ----------------------------------------------------------------------------- |
198 { |
198 // From MLcAudioControl |
199 } |
199 // ----------------------------------------------------------------------------- |
200 |
200 // |
201 |
201 TBool CMusEngMceSession::IsLcAudioMutedL() |
202 // ----------------------------------------------------------------------------- |
202 { |
203 // Changes volume of all speaker sinks in the session structure |
203 return iMuted; |
204 // ----------------------------------------------------------------------------- |
204 } |
205 // |
205 |
206 void CMusEngMceSession::ChangeVolumeByOneL( TBool aIncreaseVolume ) |
206 // ----------------------------------------------------------------------------- |
207 { |
207 // From MLcAudioControl |
208 } |
208 // ----------------------------------------------------------------------------- |
209 |
209 // |
210 |
210 void CMusEngMceSession::MuteLcAudioL( TBool aMute ) |
211 // ----------------------------------------------------------------------------- |
211 { |
212 // |
212 iMuted = aMute; |
213 // ----------------------------------------------------------------------------- |
213 } |
214 // |
214 |
215 void CMusEngMceSession::CheckClipEndL() |
215 // ----------------------------------------------------------------------------- |
216 { |
216 // From MLcAudioControl |
217 } |
217 // ----------------------------------------------------------------------------- |
218 |
218 // |
219 |
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 |