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