author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:31:01 +0100 | |
branch | RCL_3 |
changeset 33 | bc78a40cd63c |
parent 32 | 73a1feb507fb |
permissions | -rw-r--r-- |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
33 | 19 |
#ifndef MUSHENGLIVESESSION_H |
20 |
#define MUSHENGLIVESESSION_H |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
// USER |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "musengmceoutsession.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include "musunittesting.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
// SYSTEM |
33 | 27 |
#include <ecam.h> |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
// FORWARD DECLARATIONS |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
class MMusEngLiveSessionObserver; |
33 | 31 |
class CMusEngOrientationHandler; |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
|
33 | 33 |
class CMusEngLiveSession : public CMusEngMceOutSession |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
{ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
MUS_UNITTEST( UT_CMusEngOutSession ) |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
MUS_UNITTEST( UT_CMusEngLiveSession ) |
33 | 37 |
MUS_UNITTEST( UT_CMusEngOrientationHandler ) |
38 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
public: |
33 | 40 |
|
41 |
/** |
|
42 |
* Creates new MultimediaSharing Live session. |
|
43 |
* |
|
44 |
* @param aFileName Media filename |
|
45 |
* @param aRect UI drawing area. It is allowed handle from engine |
|
46 |
* @param aSessionObserver Interface for session specific callbacks |
|
47 |
* @param aOutSessionObserver Interface for outsession specific callbacks |
|
48 |
* @param aLiveSessionObserver interface for live session specific |
|
49 |
* callbacks |
|
50 |
* @param aSipProfileId SIP profile to be used, 0 is default profile |
|
51 |
* @return CMusEngLiveSession* New instanse of specified class |
|
52 |
*/ |
|
53 |
IMPORT_C static CMusEngLiveSession* NewL( |
|
54 |
const TDesC& aFileName, |
|
55 |
const TRect& aRect, |
|
56 |
MMusEngSessionObserver& aSessionObserver, |
|
57 |
MMusEngOutSessionObserver& aOutSessionObserver, |
|
58 |
MMusEngLiveSessionObserver& aLiveSessionObserver, |
|
59 |
TUint aSipProfileId = 0); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
* Creates new MultimediaSharing Live session. |
33 | 63 |
* |
64 |
* @param aRect UI drawing area. It is allowed handle from engine |
|
65 |
* @param aSessionObserver Interface for session specific callbacks |
|
66 |
* @param aOutSessionObserver Interface for outsession specific callbacks |
|
67 |
* @param aLiveSessionObserver interface for live session specific |
|
68 |
* callbacks |
|
69 |
* @param aSipProfileId SIP profile to be used, 0 is default profile |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
* @return CMusEngLiveSession* New instanse of specified class |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
*/ |
33 | 72 |
IMPORT_C static CMusEngLiveSession* NewL( |
73 |
const TRect& aRect, |
|
74 |
MMusEngSessionObserver& aSessionObserver, |
|
75 |
MMusEngOutSessionObserver& aOutSessionObserver, |
|
76 |
MMusEngLiveSessionObserver& aLiveSessionObserver, |
|
77 |
TUint aSipProfileId = 0 ); |
|
78 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
public: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
* Destructor |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
~CMusEngLiveSession(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
|
33 | 87 |
|
88 |
||
89 |
public: // NEW LIVE SESSION SPECIFIC API FUNCTIONS |
|
90 |
||
91 |
/** |
|
92 |
* Gets current zoom factor |
|
93 |
* |
|
94 |
* @pre Session is established |
|
95 |
* @leave KErrNotReady if precondition not fullfilled |
|
96 |
*/ |
|
97 |
IMPORT_C TInt CurrentZoomL() const; |
|
98 |
||
99 |
/** |
|
100 |
* Sets new zoom factor |
|
101 |
* |
|
102 |
* @pre Session is established |
|
103 |
* @pre MinZoomL <= aNewZoomFactor <= MaxZoomL |
|
104 |
* @leave KErrNotReady if session is not established |
|
105 |
*/ |
|
106 |
IMPORT_C void SetZoomL( TInt aNewZoomFactor ); |
|
107 |
||
108 |
/** |
|
109 |
* Gets minimum zoom factor |
|
110 |
* |
|
111 |
* @pre Session is established |
|
112 |
* @leave KErrNotReady if precondition not fullfilled |
|
113 |
*/ |
|
114 |
IMPORT_C TInt MinZoomL() const; |
|
115 |
||
116 |
/** |
|
117 |
* Gets maximum zoom factor |
|
118 |
* |
|
119 |
* @pre Session is established |
|
120 |
* @leave KErrNotReady if precondition not fullfilled |
|
121 |
*/ |
|
122 |
IMPORT_C TInt MaxZoomL() const; |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
|
33 | 124 |
/** |
125 |
* Increases zoom factor by one. |
|
126 |
* |
|
127 |
* @pre Session is established |
|
128 |
* @leave KErrNotReady if precondition not fullfilled |
|
129 |
*/ |
|
130 |
IMPORT_C void ZoomInL(); |
|
131 |
||
132 |
/** |
|
133 |
* Decreases zoom factor by one. |
|
134 |
* |
|
135 |
* @pre Session is established |
|
136 |
* @leave KErrNotReady if precondition not fullfilled |
|
137 |
*/ |
|
138 |
IMPORT_C void ZoomOutL(); |
|
139 |
||
140 |
/** |
|
141 |
* Sets zoom factor to default. |
|
142 |
* |
|
143 |
* @pre Session is established |
|
144 |
* @leave KErrNotReady if precondition not fullfilled |
|
145 |
*/ |
|
146 |
IMPORT_C void ZoomDefaultL(); |
|
147 |
||
148 |
/** |
|
149 |
* Sets current brightness |
|
150 |
* |
|
151 |
* @pre Session is established |
|
152 |
* @leave KErrNotReady if precondition not fullfilled |
|
153 |
*/ |
|
154 |
IMPORT_C void SetBrightnessL( TInt aBrightness ) const; |
|
155 |
||
156 |
||
157 |
/** |
|
158 |
* Gets current brightness |
|
159 |
* |
|
160 |
* @pre Session is established |
|
161 |
* @leave KErrNotReady if precondition not fullfilled |
|
162 |
*/ |
|
163 |
IMPORT_C TInt CurrentBrightnessL() const; |
|
164 |
||
165 |
/** |
|
166 |
* Gets maximum brightness |
|
167 |
* |
|
168 |
* @pre Session is established |
|
169 |
* @leave KErrNotReady if precondition not fullfilled |
|
170 |
*/ |
|
171 |
IMPORT_C TInt MaxBrightnessL() const; |
|
172 |
||
173 |
/** |
|
174 |
* Gets minimum brightness |
|
175 |
* |
|
176 |
* @pre Session is established |
|
177 |
* @leave KErrNotReady if precondition not fullfilled |
|
178 |
*/ |
|
179 |
IMPORT_C TInt MinBrightnessL() const; |
|
180 |
||
181 |
/** |
|
182 |
* Increases brightness by one. |
|
183 |
* |
|
184 |
* @pre Session is established |
|
185 |
* @leave KErrNotReady if precondition not fullfilled |
|
186 |
*/ |
|
187 |
IMPORT_C void IncreaseBrightnessL(); |
|
188 |
||
189 |
/** |
|
190 |
* Decreases brightness by one. |
|
191 |
* |
|
192 |
* @pre Session is established |
|
193 |
* @leave KErrNotReady if precondition not fullfilled |
|
194 |
*/ |
|
195 |
IMPORT_C void DecreaseBrightnessL(); |
|
196 |
||
197 |
/** |
|
198 |
* Sets brightness factor to default. |
|
199 |
* |
|
200 |
* @pre Session is established |
|
201 |
* @leave KErrNotReady if precondition not fullfilled |
|
202 |
*/ |
|
203 |
IMPORT_C void BrightnessDefaultL(); |
|
204 |
||
205 |
/** |
|
206 |
* Sets brightness to automatic. |
|
207 |
* |
|
208 |
* @pre Session is established |
|
209 |
* @leave KErrNotReady if precondition not fullfilled |
|
210 |
*/ |
|
211 |
IMPORT_C void BrightnessAutoL(); |
|
212 |
||
213 |
/** |
|
214 |
* Starts or pauses recording |
|
215 |
*/ |
|
216 |
IMPORT_C void RecordL( TBool aRecord ); |
|
217 |
||
218 |
/** |
|
219 |
* Tells whether recording is paused or not |
|
220 |
*/ |
|
221 |
IMPORT_C TBool IsRecording(); |
|
222 |
||
223 |
||
224 |
public: // implementation of virtual API from CMusEngMceOutSession |
|
225 |
||
226 |
/** |
|
227 |
* Resumes previously paused session. |
|
228 |
* Continues using viewfinder and enables streaming video. |
|
229 |
* |
|
230 |
*/ |
|
231 |
IMPORT_C void PlayL(); |
|
232 |
||
233 |
/** |
|
234 |
* Pauses session. |
|
235 |
* Holds display and disables streaming video to network. |
|
236 |
* |
|
237 |
*/ |
|
238 |
IMPORT_C void PauseL(); |
|
239 |
||
240 |
/** |
|
241 |
* Tells whether session is paused or not |
|
242 |
*/ |
|
243 |
IMPORT_C TBool IsPlayingL(); |
|
244 |
||
245 |
void EnableDisplayL( TBool aEnable ); |
|
246 |
||
247 |
void RefreshOrientationL(); |
|
248 |
||
249 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
protected: // inherited from CMusEngMceOutSession |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
* @param aLocalBundle All local streams are supposed to be added to |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
* this bundle |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
void CompleteSessionStructureL( CMceStreamBundle& aLocalBundle ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
|
33 | 259 |
private: // overrides ancestor class versions |
260 |
||
261 |
/** |
|
262 |
* The state of the session has changed |
|
263 |
* @param aSession, the session that has changed. |
|
264 |
*/ |
|
265 |
virtual void HandleSessionStateChanged( CMceSession& aSession, |
|
266 |
TInt aStatusCode, |
|
267 |
const TDesC8& aReasonPhrase ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
268 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
269 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
270 |
* Sets Multimediasharing specific video codec settings like video |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
* bitrate maxbitrate. This functions gets called for every video codec |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
* in session. This function overrides function in ancestor classes. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
* Function calls also overridden version. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
*/ |
33 | 275 |
virtual void AdjustVideoCodecL( CMceVideoCodec& aVideoCodec ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
278 |
* Sets Multimediasharing specific audio codec settings. This functions |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
* gets called for every audio codec in session. This function overrides |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
* function in base class. Function calls also overridden version. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
virtual void AdjustAudioCodecL( CMceAudioCodec& aAudioCodec ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
* Removes AVC if known that it is not supported |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
virtual void DoCodecSelectionL( CMceVideoStream& aVideoStream ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
289 |
|
33 | 290 |
private: // from MMceStreamObserver, |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
291 |
// overrides the function in CMusEngMceSession |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
292 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
293 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
294 |
* The state of the sink has changed. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
* @param aStream, the stream that uses the sink. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
297 |
* @param aSink, the sink that has changed. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
298 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
void StreamStateChanged( CMceMediaStream& aStream, |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
CMceMediaSink& aSink ); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
301 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
302 |
|
33 | 303 |
private: |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
304 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
306 |
* Constructor |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
*/ |
33 | 308 |
CMusEngLiveSession( MMusEngSessionObserver& aSessionObserver, |
309 |
MMusEngOutSessionObserver& aOutSessionObserver, |
|
310 |
MMusEngLiveSessionObserver& aLiveSessionObserver, |
|
311 |
const TRect& aRect, |
|
312 |
const TDesC& aRecordedFile = KNullDesC ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
313 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
314 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
315 |
* Second-phase constructor |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
316 |
*/ |
33 | 317 |
void ConstructL( TUint aSipProfileId ); |
318 |
||
319 |
||
320 |
private: // Helpers |
|
321 |
||
322 |
/** |
|
323 |
* Reads from CenRep and sets encoding device for a codec. |
|
324 |
*/ |
|
325 |
void SetEncodingDeviceL( CMceVideoCodec& aVideoCodec ); |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
326 |
|
33 | 327 |
/** |
328 |
* Sets configuration key for a codec |
|
329 |
*/ |
|
330 |
void SetCodecConfigKeyL( CMceVideoCodec& aVideoCodec ); |
|
331 |
||
332 |
/** |
|
333 |
* Reads proper configuration key for a codec. NULL if not available. |
|
334 |
* Ownership is transferred. |
|
335 |
*/ |
|
336 |
HBufC8* ReadCodecConfigKeyL( const CMceVideoCodec& aVideoCodec ) const; |
|
337 |
||
338 |
/** |
|
339 |
* Constructs and stores to cenrep a concatenation of all AVC config keys. |
|
340 |
*/ |
|
341 |
void StoreEncoderConfigInfoL() const; |
|
342 |
||
343 |
/** |
|
344 |
* Returns config key id for the provided codec. Ownership is transferred |
|
345 |
*/ |
|
346 |
const TPtrC8 ConfigKeyIdL( const CMceVideoCodec& aVideoCodec ) const; |
|
347 |
||
348 |
||
349 |
/** |
|
350 |
* Calculate the zoom step size based time escaped. |
|
351 |
* |
|
352 |
* @param aTime, start time. pass iZoomInTime or iZoomOutTime as parameter |
|
353 |
* @return TInt, return calculate result of the step size |
|
354 |
*/ |
|
355 |
TInt ZoomStepSize( TInt64& aTime ); |
|
356 |
||
357 |
/** |
|
358 |
* Calculates iMinZoomStep and iMaxZoomStep zoom step sizes, |
|
359 |
* should be called before first ZoomIn()/ZoomOut() call |
|
360 |
*/ |
|
361 |
void InitializeZoomStepSize(); |
|
362 |
||
363 |
||
364 |
private: |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
365 |
|
33 | 366 |
/** |
367 |
* Reference to live session observer interface. |
|
368 |
*/ |
|
369 |
MMusEngLiveSessionObserver& iLiveSessionObserver; |
|
370 |
||
371 |
/** |
|
372 |
* |
|
373 |
*/ |
|
374 |
TCameraInfo iCameraInfo; |
|
375 |
||
376 |
/** |
|
377 |
* |
|
378 |
*/ |
|
379 |
TInt iDefaultZoomFactor; |
|
380 |
||
381 |
/** |
|
382 |
* |
|
383 |
*/ |
|
384 |
TInt iDefaultBrightness; |
|
385 |
||
386 |
/** |
|
387 |
* File name for recording. If KNullDesC no recording performed. |
|
388 |
*/ |
|
389 |
TFileName iRecordedFile; |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
390 |
|
33 | 391 |
/** |
392 |
* If true, configuration key of current AVC codec must be written to |
|
393 |
* CenRep after session establishment. |
|
394 |
*/ |
|
395 |
TBool iStoreEncoderConfigInfo; |
|
396 |
||
397 |
/** |
|
398 |
* latest Zoomin time |
|
399 |
*/ |
|
400 |
||
401 |
TInt64 iZoomInTime; |
|
402 |
||
403 |
/** |
|
404 |
* latest Zoomout time |
|
405 |
*/ |
|
406 |
TInt64 iZoomOutTime; |
|
407 |
||
408 |
/** |
|
409 |
* |
|
410 |
*/ |
|
411 |
TInt iSmallZoomStep; |
|
412 |
||
413 |
/** |
|
414 |
* |
|
415 |
*/ |
|
416 |
TInt iBigZoomStep; |
|
417 |
||
418 |
CMusEngOrientationHandler* iOrientationHandler; |
|
419 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
}; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
|
33 | 422 |
#endif |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
423 |