57
|
1 |
/*
|
|
2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: MPX Video base playback view
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
// Version : %version: 25 %
|
|
20 |
|
|
21 |
|
|
22 |
// This file defines the API for VideoBasePlaybackView.dll
|
|
23 |
|
|
24 |
#ifndef __VIDEOBASEPLAYBACKVIEW_H__
|
|
25 |
#define __VIDEOBASEPLAYBACKVIEW_H__
|
|
26 |
|
|
27 |
// Include Files
|
|
28 |
#include <e32base.h> // CBase
|
|
29 |
#include <e32std.h> // TBuf
|
|
30 |
#include <aknview.h>
|
|
31 |
#include <mpxplaybackobserver.h>
|
|
32 |
#include <mpxviewactivationobserver.h>
|
|
33 |
#include <mpxcollectionobserver.h>
|
|
34 |
|
|
35 |
#include "mpxvideoplaybackcontrol.hrh"
|
|
36 |
#include "mpxvideoplaybackdisplayhandler.h"
|
|
37 |
#include <mpxvideoplaybackdefs.h>
|
|
38 |
#include <AknWsEventObserver.h>
|
|
39 |
|
|
40 |
// Constants
|
|
41 |
|
|
42 |
// Forward Declarations
|
|
43 |
class CMPXVideoPlaybackContainer;
|
|
44 |
class MMPXPlaybackUtility;
|
|
45 |
class MMPXViewUtility;
|
|
46 |
class MMPXCollectionUtility;
|
|
47 |
class CMPFileDetailsDialog;
|
|
48 |
class CMPFileDetails;
|
|
49 |
|
|
50 |
class CMPXVideoPlaybackViewFileDetails;
|
|
51 |
|
|
52 |
// Class Definitions
|
|
53 |
|
|
54 |
class CMPXVideoBasePlaybackView : public CAknView,
|
|
55 |
public MMPXPlaybackObserver,
|
|
56 |
public MMPXViewActivationObserver,
|
|
57 |
public MMPXPlaybackCallback,
|
|
58 |
public MMPXCollectionObserver,
|
|
59 |
public MAknWsEventObserver
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
~CMPXVideoBasePlaybackView();
|
|
63 |
|
|
64 |
/**
|
|
65 |
* From CAknView
|
|
66 |
* Command handling function.
|
|
67 |
*
|
|
68 |
* @param aCommand Command which is handled
|
|
69 |
*/
|
|
70 |
virtual void HandleCommandL( TInt aCommand );
|
|
71 |
|
|
72 |
void RetrieveFileNameAndModeL( CMPXCommand* aCmd );
|
|
73 |
|
|
74 |
void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
|
|
75 |
|
|
76 |
protected:
|
|
77 |
|
|
78 |
/**
|
|
79 |
* From CAknView
|
|
80 |
* Processes user commands.
|
|
81 |
*
|
|
82 |
* @param aCommand ID of the command to respond to.
|
|
83 |
*/
|
|
84 |
virtual void ProcessCommandL( TInt aCommand );
|
|
85 |
|
|
86 |
/**
|
|
87 |
* From CAknView
|
|
88 |
* Event handler for status pane size changes.
|
|
89 |
*
|
|
90 |
*/
|
|
91 |
virtual void HandleStatusPaneSizeChange();
|
|
92 |
|
|
93 |
/**
|
|
94 |
* From CAknView
|
|
95 |
* Handles a view activation.
|
|
96 |
*
|
|
97 |
* @param aPrevViewId Specifies the view previously active.
|
|
98 |
* @param aCustomMessageId Specifies the message type.
|
|
99 |
* @param aCustomMessage The activation message.
|
|
100 |
*/
|
|
101 |
virtual void DoActivateL( const TVwsViewId& aPrevViewId,
|
|
102 |
TUid aCustomMessageId,
|
|
103 |
const TDesC8& aCustomMessage );
|
|
104 |
|
|
105 |
/**
|
|
106 |
* From CAknView
|
|
107 |
* View deactivation function.
|
|
108 |
*/
|
|
109 |
virtual void DoDeactivate();
|
|
110 |
|
|
111 |
/**
|
|
112 |
* From CAknView
|
|
113 |
* Foreground event handling function.
|
|
114 |
*
|
|
115 |
* @param aForeground Indicates the required focus state of the control.
|
|
116 |
*/
|
|
117 |
virtual void HandleForegroundEventL( TBool aForeground );
|
|
118 |
|
|
119 |
/**
|
|
120 |
* From MEikMenuObserver
|
|
121 |
*/
|
|
122 |
virtual void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
|
|
123 |
|
|
124 |
/**
|
|
125 |
* From MMPXPlaybackObserver
|
|
126 |
* Handle playback message
|
|
127 |
*
|
|
128 |
* @param aMessage Playback Message
|
|
129 |
* @param aErr system error code.
|
|
130 |
*/
|
|
131 |
virtual void HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError );
|
|
132 |
|
|
133 |
/*
|
|
134 |
* From MMPXViewActivationObserver
|
|
135 |
* Handle view activation.
|
|
136 |
*
|
|
137 |
* @param aCurrentViewType Current view type Uid.
|
|
138 |
* @param aPreviousViewType Previous view type Uid.
|
|
139 |
*/
|
|
140 |
void HandleViewActivation( const TUid& aCurrentViewType, const TUid& aPreviousViewType );
|
|
141 |
|
|
142 |
/**
|
|
143 |
* From MMPXPlaybackCallback
|
|
144 |
* Handle playback property
|
|
145 |
*
|
|
146 |
* @param aProperty the property
|
|
147 |
* @param aValue the value of the property
|
|
148 |
* @param aError error code
|
|
149 |
*/
|
|
150 |
void HandlePropertyL( TMPXPlaybackProperty aProperty,
|
|
151 |
TInt aValue,
|
|
152 |
TInt aError );
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Method is called continously until aComplete=ETrue, signifying that
|
|
156 |
* it is done and there will be no more callbacks
|
|
157 |
* Only new items are passed each time
|
|
158 |
*
|
|
159 |
* @param aPlayer UID of the subplayer
|
|
160 |
* @param aSubPlayers a list of sub players
|
|
161 |
* @param aComplete ETrue no more sub players. EFalse more subplayer
|
|
162 |
* expected
|
|
163 |
* @param aError error code
|
|
164 |
*/
|
|
165 |
inline void HandleSubPlayerNamesL( TUid /*aPlayer*/,
|
|
166 |
const MDesCArray* /*aSubPlayers*/,
|
|
167 |
TBool /*aComplete*/,
|
|
168 |
TInt /*aError*/ )
|
|
169 |
{}
|
|
170 |
|
|
171 |
/**
|
|
172 |
* Call back of media request
|
|
173 |
*
|
|
174 |
* @param aMedia media
|
|
175 |
* @param aError error code
|
|
176 |
*/
|
|
177 |
void HandleMediaL( const CMPXMedia& aProperties, TInt aError );
|
|
178 |
|
|
179 |
void UpdatePbPluginMediaL( TBool aSeek);
|
|
180 |
|
|
181 |
|
|
182 |
/**
|
|
183 |
* Handle completion of a asynchronous command
|
|
184 |
* @param aCommandResult result of the command, NULL if error
|
|
185 |
* @param aError error code
|
|
186 |
*/
|
|
187 |
void HandlePlaybackCommandComplete( CMPXCommand* /*aCommandResult*/,
|
|
188 |
TInt /*aError*/);
|
|
189 |
/*
|
|
190 |
* From base class MMPXCollectionMediaObserver
|
|
191 |
* (via MMPXCollectionObserver)
|
|
192 |
* Handle extended media properties
|
|
193 |
*
|
|
194 |
* @param aMedia media
|
|
195 |
* @param aError error code
|
|
196 |
*/
|
|
197 |
inline void HandleCollectionMediaL( const CMPXMedia& /*aMedia*/, TInt /*aError*/ ) {}
|
|
198 |
|
|
199 |
/*
|
|
200 |
* From base class MMPXCollectionObserver
|
|
201 |
*/
|
|
202 |
inline void HandleCollectionMessage( CMPXMessage* /*aMsg*/, TInt /*aErr*/ ) {}
|
|
203 |
|
|
204 |
inline void HandleOpenL( const CMPXMedia& /*aEntries*/,
|
|
205 |
TInt /*aIndex*/,
|
|
206 |
TBool /*aComplete*/,
|
|
207 |
TInt /*aError*/ ) {}
|
|
208 |
|
|
209 |
inline void HandleOpenL( const CMPXCollectionPlaylist& /*aPlaylist*/, TInt /*aError*/ ) {}
|
|
210 |
|
|
211 |
public:
|
|
212 |
/**
|
|
213 |
* Set property
|
|
214 |
*/
|
|
215 |
void SetPropertyL( TMPXPlaybackProperty aProperty, TInt aValue );
|
|
216 |
virtual void RetrievePdlInformationL();
|
|
217 |
|
|
218 |
protected:
|
|
219 |
|
|
220 |
virtual void CloseEmbeddedPlaybackViewL() = 0;
|
|
221 |
|
|
222 |
/*
|
|
223 |
* Handle Download State Change
|
|
224 |
* @param aState new state of the download
|
|
225 |
*/
|
|
226 |
virtual void HandlePdlStateChangeL( TInt aState ) = 0;
|
|
227 |
|
|
228 |
/*
|
|
229 |
* Handle transition to the stopped state
|
|
230 |
*/
|
|
231 |
virtual void HandleStoppedStateL() = 0;
|
|
232 |
|
|
233 |
virtual void HandleInitializingStateL( TMPXPlaybackState aLastState ) = 0;
|
|
234 |
|
|
235 |
virtual void HandlePluginErrorL( TInt aError );
|
|
236 |
|
|
237 |
virtual void ClosePlaybackViewL();
|
|
238 |
|
|
239 |
virtual void HandleBufferingStateL();
|
|
240 |
|
|
241 |
virtual void IssuePlayCommandL();
|
|
242 |
|
|
243 |
void InitializeVideoPlaybackViewL();
|
|
244 |
void DisplayInfoMessageL( TInt aResourceId, TBool aWaitingDialog = EFalse );
|
|
245 |
void DisplayErrorMessageL( TInt aResourceId );
|
|
246 |
|
|
247 |
CMPXVideoBasePlaybackView();
|
|
248 |
|
|
249 |
/*
|
|
250 |
* Activates an active object to close the player
|
|
251 |
* @since 5.0
|
|
252 |
*/
|
|
253 |
void ActivateClosePlayerActiveObject();
|
|
254 |
|
|
255 |
/*
|
|
256 |
* Provides the static function for the callback to close the player
|
|
257 |
* Called by CIdle iIdle
|
|
258 |
* @since 3.2
|
|
259 |
* @param aPtr Pointer to callback class
|
|
260 |
* @return KErrNone
|
|
261 |
*/
|
|
262 |
static TInt ClosePlayerL( TAny* aPtr );
|
|
263 |
|
|
264 |
/*
|
|
265 |
* Called to stop and exit the player
|
|
266 |
* @since 3.2
|
|
267 |
* @return void
|
|
268 |
*/
|
|
269 |
virtual void DoClosePlayerL();
|
|
270 |
|
|
271 |
|
|
272 |
virtual void HandleVideoPlaybackMessage( CMPXMessage* aMessage );
|
|
273 |
|
|
274 |
/**
|
|
275 |
* Returns views Implementation id.
|
|
276 |
* @return id for this view.
|
|
277 |
*/
|
|
278 |
virtual TUid ViewImplementationId() const = 0;
|
|
279 |
|
|
280 |
virtual void HandleClosePlaybackViewL();
|
|
281 |
|
|
282 |
TBool IsAppInFrontL();
|
|
283 |
|
|
284 |
TInt RetrieveBufferingPercentageL();
|
|
285 |
|
|
286 |
void DoHandleInitializingStateL( TMPXPlaybackState aLastState );
|
|
287 |
|
|
288 |
TBool IsMultiItemPlaylist();
|
|
289 |
|
|
290 |
virtual void SendWindowCommandL( TMPXVideoPlaybackCommand aCmd );
|
|
291 |
|
|
292 |
virtual void HandlePdlReloadComplete();
|
|
293 |
|
|
294 |
virtual void ResetPdlUserInputs();
|
|
295 |
|
|
296 |
private:
|
|
297 |
|
|
298 |
/**
|
|
299 |
* Handle playback message
|
|
300 |
*
|
|
301 |
* @param aMsg playback message
|
|
302 |
*/
|
|
303 |
virtual void DoHandlePlaybackMessageL( CMPXMessage* aMessage );
|
|
304 |
|
|
305 |
/**
|
|
306 |
* Handle playback error message
|
|
307 |
*
|
|
308 |
* @param aErr system error code.
|
|
309 |
*/
|
|
310 |
void DoHandleErrorPlaybackMessageL( TInt aError );
|
|
311 |
|
|
312 |
void SetDisplayWindowL();
|
|
313 |
|
|
314 |
void CreateGeneralPlaybackCommandL( TMPXPlaybackCommand aCmd, TBool aDoSync = ETrue );
|
|
315 |
|
|
316 |
void SetVideoRectL();
|
|
317 |
|
|
318 |
void DisplayFileDetailsDialogL();
|
|
319 |
|
|
320 |
/**
|
|
321 |
* Handle media properties.
|
|
322 |
*
|
|
323 |
* @param aMedia media properties
|
|
324 |
* @param aError error code
|
|
325 |
*/
|
|
326 |
virtual void DoHandleMediaL( const CMPXMedia& aMedia, TInt aError );
|
|
327 |
|
|
328 |
void CreateAbortDsaCmdL();
|
|
329 |
|
|
330 |
void CreateVideoSpecificCmdL( TMPXVideoPlaybackCommand aCmd );
|
|
331 |
|
|
332 |
void RestartDsaL();
|
|
333 |
|
|
334 |
void RequestMediaL();
|
|
335 |
void RequestCollectionMediaL();
|
|
336 |
void RequestPlaybackMediaL();
|
|
337 |
|
|
338 |
void ParseMetaDataL( const CMPXMedia& aMedia );
|
|
339 |
|
|
340 |
void DoHandleStateChangeL( TInt aNewState );
|
|
341 |
|
|
342 |
void HandleGeneralPlaybackMessageL( CMPXMessage* aMessage );
|
|
343 |
|
|
344 |
void SetAspectRatioL( TMPXVideoPlaybackCommand aCmd );
|
|
345 |
|
|
346 |
void HandleVolumeCmdL( TMPXPlaybackCommand aCmd );
|
|
347 |
|
|
348 |
void HandleShortPressBackwardL();
|
|
349 |
|
|
350 |
TInt AddDllPath( TDes& aFileName );
|
|
351 |
|
|
352 |
void ShowFileDetailsDialogL();
|
|
353 |
|
|
354 |
void HandleDrmErrorsL( TInt aError );
|
|
355 |
|
|
356 |
TInt OpenDrmFileHandleL( RFile& aFile );
|
|
357 |
void LaunchDRMDetailsL();
|
|
358 |
|
|
359 |
void HandleRealOneBitmapTimeoutL();
|
|
360 |
|
|
361 |
TBool IsInMemoryPlugin();
|
|
362 |
|
|
363 |
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
364 |
TInt OpenDrmFileHandle64L( RFile64& aFile );
|
|
365 |
#endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
|
|
366 |
|
|
367 |
protected: // data
|
|
368 |
MMPXPlaybackUtility* iPlaybackUtility;
|
|
369 |
MMPXViewUtility* iViewUtility;
|
|
370 |
MMPXCollectionUtility* iCollectionUtility;
|
|
371 |
CMPXVideoPlaybackDisplayHandler* iDisplayHandler;
|
|
372 |
CAknWsEventMonitor* iAknEventMonitor;
|
|
373 |
|
|
374 |
TMPXPlaybackState iPlaybackState;
|
|
375 |
|
|
376 |
CMPXVideoPlaybackContainer* iContainer;
|
|
377 |
|
|
378 |
TInt iVideoResourceOffset;
|
|
379 |
|
|
380 |
CMPFileDetailsDialog* iFileDetailsDialog;
|
|
381 |
CMPXVideoPlaybackViewFileDetails* iFileDetails;
|
|
382 |
CIdle* iCloseAO;
|
|
383 |
|
|
384 |
TBool iMediaRequested;
|
|
385 |
TBool iPlaylistView;
|
|
386 |
TBool iCollectionMediaRequested;
|
|
387 |
TBool iPdlReloading;
|
|
388 |
TBool iRealOneDelayedPlay;
|
|
389 |
TBool iKeyboardInFocus;
|
|
390 |
|
|
391 |
HBufC* iClipName;
|
|
392 |
|
|
393 |
TBool iSyncClose;
|
|
394 |
};
|
|
395 |
|
|
396 |
#endif // __VIDEOBASEPLAYBACKVIEW_H__
|
|
397 |
|
|
398 |
// EOF
|