30
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 |
*
|
44
|
14 |
* Description: Implementation of VideoPlayerEngine
|
30
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
58
|
18 |
// Version : %version: ou1cpsw#22 %
|
30
|
19 |
|
|
20 |
#ifndef VIDEOPLAYERENGINE_H
|
|
21 |
#define VIDEOPLAYERENGINE_H
|
|
22 |
|
|
23 |
#include <qobject.h>
|
|
24 |
#include <mpxviewpluginqt.h>
|
|
25 |
|
36
|
26 |
#include <f32file.h>
|
|
27 |
|
30
|
28 |
#include "mpxhbvideocommondefs.h"
|
|
29 |
#include "videoplayerappexport.h"
|
|
30 |
|
|
31 |
//FORWARD CLASS DECLARATION
|
|
32 |
|
|
33 |
class MpxViewPlugin;
|
|
34 |
class VideoServices;
|
44
|
35 |
class VideoPlaybackWrapper;
|
58
|
36 |
class AfActivityStorage;
|
30
|
37 |
|
|
38 |
/**
|
44
|
39 |
* VideoPlayerEngine
|
30
|
40 |
*
|
|
41 |
*/
|
44
|
42 |
class VIDEOPLAYERAPP_DLL_EXPORT VideoPlayerEngine : public QObject
|
30
|
43 |
{
|
|
44 |
Q_OBJECT
|
|
45 |
|
|
46 |
public:
|
|
47 |
/**
|
|
48 |
* Constructor
|
|
49 |
*/
|
44
|
50 |
VideoPlayerEngine( bool isService = false );
|
30
|
51 |
|
|
52 |
/**
|
|
53 |
* Destructor.
|
|
54 |
*/
|
44
|
55 |
virtual ~VideoPlayerEngine();
|
30
|
56 |
|
|
57 |
public:
|
|
58 |
void initialize();
|
|
59 |
void playMedia( QString filePath );
|
50
|
60 |
void playURI( QString uri );
|
36
|
61 |
void playMedia( RFile file );
|
30
|
62 |
void setEmbedded();
|
49
|
63 |
signals:
|
|
64 |
void applicationReady();
|
|
65 |
|
30
|
66 |
public slots:
|
|
67 |
void handleCommand( int commandCode );
|
|
68 |
|
|
69 |
private slots:
|
|
70 |
void handleQuit();
|
55
|
71 |
void serviceQuit();
|
30
|
72 |
|
|
73 |
private:
|
|
74 |
void activateView( MpxHbVideoCommon::MpxHbVideoViewType viewType );
|
|
75 |
|
|
76 |
void connectView();
|
|
77 |
void disconnectView();
|
|
78 |
|
|
79 |
void switchView();
|
|
80 |
|
36
|
81 |
void loadPluginAndCreateView( MpxHbVideoCommon::MpxHbVideoViewType viewType );
|
35
|
82 |
|
|
83 |
void doDelayedLoad();
|
36
|
84 |
|
40
|
85 |
void createMissingViews();
|
|
86 |
|
|
87 |
void createPlaybackView();
|
36
|
88 |
|
|
89 |
void setCurrentView();
|
38
|
90 |
|
39
|
91 |
bool isPlayServiceInvoked();
|
|
92 |
|
|
93 |
bool shouldExit();
|
|
94 |
|
|
95 |
bool shouldActivateCollectionView();
|
50
|
96 |
|
|
97 |
void handlePlaybackFailure(int errorCode);
|
30
|
98 |
|
|
99 |
private:
|
|
100 |
bool mIsService;
|
35
|
101 |
bool mEmbedded;
|
44
|
102 |
bool mDelayedLoadDone;
|
38
|
103 |
bool mIsPlayService;
|
30
|
104 |
|
|
105 |
MpxViewPlugin* mCurrentViewPlugin;
|
|
106 |
MpxViewPlugin* mPlaybackViewPlugin;
|
|
107 |
MpxViewPlugin* mCollectionViewPlugin;
|
|
108 |
MpxViewPlugin* mFileDetailsViewPlugin;
|
|
109 |
|
|
110 |
|
44
|
111 |
VideoPlaybackWrapper *mPlaybackWrapper;
|
30
|
112 |
|
|
113 |
VideoServices* mVideoServices;
|
58
|
114 |
|
|
115 |
AfActivityStorage* mActivityStorage;
|
30
|
116 |
|
|
117 |
};
|
|
118 |
|
|
119 |
#endif // VIDEOPLAYERENGINE_H
|
|
120 |
|
|
121 |
// EOF
|