19 #ifndef MUSHENGLIVESESSION_H |
19 #ifndef MUSHENGLIVESESSION_H |
20 #define MUSHENGLIVESESSION_H |
20 #define MUSHENGLIVESESSION_H |
21 |
21 |
22 // USER |
22 // USER |
23 #include "musengmceoutsession.h" |
23 #include "musengmceoutsession.h" |
24 #include "musunittesting.h" |
|
25 #include "mussettings.h" |
|
26 #include "musengcamerahandler.h" |
|
27 #include "lcvideoplayer.h" |
|
28 #include "lccameracontrol.h" |
|
29 #include "lcbrightnesscontrol.h" |
|
30 #include "lczoomcontrol.h" |
|
31 #include "lcfilecontrol.h" |
|
32 |
24 |
33 // SYSTEM |
25 // SYSTEM |
34 #include <ecam.h> |
26 #include <ecam.h> |
35 |
27 |
36 // FORWARD DECLARATIONS |
28 // FORWARD DECLARATIONS |
37 class MMusEngLiveSessionObserver; |
29 class MMusEngLiveSessionObserver; |
38 class MLcValueControl; |
30 |
39 |
31 |
40 |
32 class CMusEngLiveSession : public CMusEngMceOutSession |
41 class CMusEngLiveSession : |
|
42 public CMusEngMceOutSession, |
|
43 public MLcVideoPlayer, |
|
44 public MLcCameraControl, |
|
45 public MLcBrightnessControl, |
|
46 public MLcZoomControl, |
|
47 public MLcFileControl |
|
48 { |
33 { |
49 |
34 |
50 public: |
35 public: |
|
36 |
51 /** |
37 /** |
52 * Creates new MultimediaSharing Live session. |
38 * Creates new MultimediaSharing Live session. |
53 * |
39 * |
|
40 * @since S60 v3.2 |
54 * @param aFileName Media filename |
41 * @param aFileName Media filename |
55 * @param aRect UI drawing area. It is allowed handle from engine |
42 * @param aRect UI drawing area. It is allowed handle from engine |
56 * @param aSessionObserver Interface for session specific callbacks |
43 * @param aSessionObserver Session specific callbacks |
57 * @param aOutSessionObserver Interface for outsession specific callbacks |
44 * @param aSipProfileId SIP profile to be used, 0 is default profile |
58 * @param aLiveSessionObserver interface for live session specific |
|
59 * callbacks |
|
60 * @return CMusEngLiveSession* New instanse of specified class |
45 * @return CMusEngLiveSession* New instanse of specified class |
61 */ |
46 */ |
62 static CMusEngLiveSession* NewL( |
47 IMPORT_C static CMusEngLiveSession* NewL( |
63 const TDesC& aFileName, |
48 const TDesC& aFileName, |
64 const TRect& aRect ); |
49 const TRect& aRect, |
65 |
50 MMusEngLiveSessionObserver* aSessionObserver, |
|
51 TUint aSipProfileId = 0); |
|
52 |
66 /** |
53 /** |
67 * Creates new MultimediaSharing Live session. |
54 * Creates new MultimediaSharing Live session. |
68 * |
55 * |
|
56 * @since S60 v3.2 |
69 * @param aRect UI drawing area. It is allowed handle from engine |
57 * @param aRect UI drawing area. It is allowed handle from engine |
70 * @param aSessionObserver Interface for session specific callbacks |
58 * @param aSessionObserver Session specific callbacks |
71 * @param aOutSessionObserver Interface for outsession specific callbacks |
59 * @param aSipProfileId SIP profile to be used, 0 is default profile |
72 * @param aLiveSessionObserver interface for live session specific |
|
73 * callbacks |
|
74 * @return CMusEngLiveSession* New instanse of specified class |
60 * @return CMusEngLiveSession* New instanse of specified class |
75 */ |
61 */ |
76 static CMusEngLiveSession* NewL( |
62 IMPORT_C static CMusEngLiveSession* NewL( |
77 const TRect& aRect ); |
63 const TRect& aRect, |
78 |
64 MMusEngLiveSessionObserver* aSessionObserver, |
|
65 TUint aSipProfileId = 0 ); |
79 |
66 |
80 public: |
67 public: |
81 |
68 |
82 /** |
69 /** |
83 * Destructor |
70 * Destructor |
|
71 * |
|
72 * @since S60 v3.2 |
84 */ |
73 */ |
85 ~CMusEngLiveSession(); |
74 ~CMusEngLiveSession(); |
86 |
75 |
87 |
76 |
88 public: // from MLcSession |
77 |
89 |
78 public: // NEW API FUNCTIONS live session specific |
90 void EstablishLcSessionL(); |
79 |
91 |
80 /** |
92 MLcVideoPlayer* LocalVideoPlayer(); |
81 * Sets callback interface pointer |
93 |
82 * |
94 const TDesC& RemoteDisplayName(); |
83 * @since S60 v3.2 |
95 |
84 * @param aSessionObserver Pointer to class which implements interface |
96 |
85 */ |
97 public: // from MLcVideoPlayer |
86 IMPORT_C void SetSessionObserver( |
98 |
87 MMusEngLiveSessionObserver* aSessionObserver ); |
99 TLcVideoPlayerState LcVideoPlayerState() const; |
88 |
100 |
89 /** |
101 TBool LcIsPlayingL(); |
90 * Gets current zoom factor |
102 |
91 * |
103 void LcPlayL(); |
92 * @pre Session is established |
104 |
93 * @leave KErrNotReady if precondition not fullfilled |
105 void LcPauseL(); |
94 * @since S60 v3.2 |
106 |
95 */ |
107 MLcWindow* LcWindow(); |
96 IMPORT_C TInt CurrentZoomL() const; |
108 |
97 |
109 MLcCameraControl* LcCameraControl(); |
98 /** |
110 |
99 * Gets maximum zoom factor |
111 MLcFileControl* LcSourceFile(); |
100 * |
112 |
101 * @pre Session is established |
113 MLcFileControl* LcDestinationFile(); |
102 * @leave KErrNotReady if precondition not fullfilled |
114 |
103 * @since S60 v3.2 |
115 MLcAudioControl* LcAudioControl(); |
104 */ |
116 |
105 IMPORT_C TInt MaxZoomL() const; |
117 MLcZoomControl* LcZoomControl(); |
106 |
118 |
107 IMPORT_C TInt MinZoomL() const; |
119 MLcBrightnessControl* LcBrightnessControl(); |
108 |
120 |
109 /** |
121 RPointerArray< MLcValueControl >& LcExtensionControls(); |
110 * Increases zoom factor by one. |
122 |
111 * |
123 public: // from MLcCameraControl |
112 * @pre Session is established |
124 |
113 * @leave KErrNotReady if precondition not fullfilled |
125 TInt LcCameraCountL(); |
114 * @since S60 v3.2 |
126 |
115 */ |
127 void ToggleLcCameraL(); |
116 IMPORT_C void ZoomInL(); |
128 |
117 |
129 public: // MLcBrightnessControl |
118 /** |
130 |
119 * Decreases zoom factor by one. |
131 TInt MinLcBrightnessL(); |
120 * |
132 |
121 * @pre Session is established |
133 TInt MaxLcBrightnessL(); |
122 * @leave KErrNotReady if precondition not fullfilled |
134 |
123 * @since S60 v3.2 |
135 TInt LcBrightnessL(); |
124 */ |
136 |
125 IMPORT_C void ZoomOutL(); |
137 void SetLcBrightnessL( TInt aValue ); |
126 |
138 |
127 /** |
139 void IncreaseLcBrightnessL(); |
128 * Sets zoom factor to default. |
140 |
129 * |
141 void DecreaseLcBrightnessL(); |
130 * @pre Session is established |
142 |
131 * @leave KErrNotReady if precondition not fullfilled |
143 public: // from MLcZoomControl |
132 * @since S60 v3.2 |
144 |
133 */ |
145 TInt MinLcZoomL(); |
134 IMPORT_C void ZoomDefaultL(); |
146 |
135 |
147 TInt MaxLcZoomL(); |
136 public: // implementation of virtual API from CMusEngMceOutSession |
148 |
137 |
149 TInt LcZoomValueL(); |
138 /** |
150 |
139 * Resumes previously paused session. |
151 void SetLcZoomValueL( TInt aValue ); |
140 * Continues using viewfinder and enables streaming video. |
152 |
141 * |
153 void LcZoomInL(); |
142 * @since S60 v3.2 |
154 |
143 */ |
155 void LcZoomOutL(); |
144 IMPORT_C void PlayL(); |
156 |
145 |
157 public: // from MLcFileControl |
146 /** |
158 |
147 * Pauses session. |
159 void EnableLcFileL( TBool aEnable ); |
148 * Holds display and disables streaming video to network. |
160 |
149 * |
161 TBool IsLcFileEnabled(); |
150 * @since S60 v3.2 |
162 |
151 */ |
163 void SetLcFileNameL( const TFileName& aFileName ); |
152 IMPORT_C void PauseL(); |
164 |
153 |
165 TFileName& LcFileName(); |
154 |
166 |
155 protected: // inherited from CMusEngMceOutSession |
167 protected: |
156 |
|
157 /** |
|
158 * |
|
159 * @since S60 v3.2 |
|
160 */ |
|
161 void CompleteSessionStructureL(); |
|
162 |
|
163 |
|
164 private: |
168 |
165 |
169 /** |
166 /** |
170 * Constructor |
167 * Constructor |
171 */ |
168 |
172 CMusEngLiveSession( const TRect& aRect, |
169 * @since S60 v3.2 |
173 const TDesC& aRecordedFile = KNullDesC ); |
170 */ |
|
171 CMusEngLiveSession( MMusEngLiveSessionObserver* aSessionObserver, |
|
172 const TRect& aRect, |
|
173 TUint aSipProfileId = 0 ); |
174 |
174 |
175 /** |
175 /** |
176 * Second-phase constructor |
176 * Second-phase constructor |
|
177 * |
|
178 * @since S60 v3.2 |
177 */ |
179 */ |
178 void ConstructL(); |
180 void ConstructL(); |
179 |
181 |
180 |
182 |
181 |
183 public: |
182 protected: |
184 |
183 |
185 /** |
184 /** |
186 * |
185 * File name for recording. If KNullDesC no recording performed. |
187 * @since S60 v3.2 |
186 */ |
188 */ |
187 TFileName iRecordedFile; |
189 //TCameraInfo iCameraInfo; |
188 |
190 |
189 /** |
191 /** |
190 * Dummy member variable to implement MLcVideoPlayer::LcExtensionControls |
192 * |
191 */ |
193 * @since S60 v3.2 |
192 RPointerArray< MLcValueControl > iValueControls; |
194 */ |
193 |
195 TInt iDefaultZoomFactor; |
194 TMusEngCameraHandler iCameraHandler; |
196 TInt iPlaying; |
195 |
|
196 /* |
|
197 * Remote Display Name |
|
198 */ |
|
199 HBufC* iRemoteDisplayName; |
|
200 |
|
201 TInt iCurrentZoom; |
197 TInt iCurrentZoom; |
202 TInt iDefaultZoomFactor; |
198 |
203 TInt iCurrentBrighness; |
199 |
204 TInt iPlaying; |
|
205 TBool iFileEnabled; |
|
206 |
|
207 }; |
200 }; |
208 |
201 |
209 #endif |
202 #endif |
210 |
203 |