|
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 * |
|
14 * Description: This class is the interface between the playback plugin and RMMFController |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 8 % |
|
19 |
|
20 |
|
21 #ifndef __MPXVIDEOPLAYERUTILITY__ |
|
22 #define __MPXVIDEOPLAYERUTILITY__ |
|
23 |
|
24 // |
|
25 // INCLUDES |
|
26 // |
|
27 #include <mmf/common/mmfcontroller.h> |
|
28 |
|
29 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
30 #include <mmf/common/mmfstandardcustomcommandsimpl.h> |
|
31 #else |
|
32 #include <mmf/common/mmfstandardcustomcommands.h> |
|
33 #endif |
|
34 |
|
35 #include <mmf/common/mmfdrmcustomcommands.h> |
|
36 |
|
37 #ifdef SYMBIAN_BUILD_GCE |
|
38 #include <mmf/common/mmfvideosurfacecustomcommands.h> |
|
39 #endif |
|
40 |
|
41 // |
|
42 // FORWARD DECLARATIONS |
|
43 // |
|
44 class CMPXVideoPlaybackController; |
|
45 |
|
46 // |
|
47 // CLASS DECLARATION |
|
48 // |
|
49 |
|
50 NONSHARABLE_CLASS( CMpxVideoPlayerUtility ) : public CBase, |
|
51 public MMMFControllerEventMonitorObserver |
|
52 { |
|
53 public: |
|
54 |
|
55 static CMpxVideoPlayerUtility* NewL( CMPXVideoPlaybackController* aVideoPlaybackCtrl ); |
|
56 ~CMpxVideoPlayerUtility(); |
|
57 |
|
58 void Reset(); |
|
59 |
|
60 void OpenFileL( const TDesC& aFileName ); |
|
61 void OpenFileL( const RFile& aFile ); |
|
62 void OpenUrlL( const TDesC& aUrl, TInt aApId ); |
|
63 |
|
64 TTimeIntervalMicroSeconds PositionL() const; |
|
65 TTimeIntervalMicroSeconds DurationL() const; |
|
66 |
|
67 TInt NumberOfMetaDataEntriesL() const; |
|
68 CMMFMetaDataEntry* MetaDataEntryL( TInt aIndex ) const; |
|
69 |
|
70 TBool AudioEnabledL() const; |
|
71 void SetVolumeL( TInt aVolume ); |
|
72 TInt Volume() const; |
|
73 TInt MaxVolume() const; |
|
74 |
|
75 void VideoFrameSizeL( TSize& aSize ) const; |
|
76 TInt VideoBitRateL() const; |
|
77 TInt AudioBitRateL() const; |
|
78 TInt VideoFormatMimeType( TDes8& aMimeType ) const; |
|
79 TUint32 FourCCCode() const; |
|
80 void RefreshFrameL(); |
|
81 |
|
82 void RestartDsa( const TRegion& aRegion ); |
|
83 void AbortDsa(); |
|
84 void SetDisplayWindowL( const TRect& aScreenRect, |
|
85 const TRect& aClipRect, |
|
86 const TRegion& aDrawingRegion ); |
|
87 |
|
88 TInt CustomCommandSync( const TMMFMessageDestinationPckg& aDestination, |
|
89 TInt aFunction, |
|
90 const TDesC8& aDataTo1, |
|
91 const TDesC8& aDataTo2 ); |
|
92 |
|
93 void Prepare(); |
|
94 void Play(); |
|
95 void PauseL(); |
|
96 void Close(); |
|
97 TInt Stop(); |
|
98 |
|
99 void SetPositionL( const TTimeIntervalMicroSeconds& aPosition ); |
|
100 |
|
101 void SetPlayVelocityL( TInt aVelocity ); |
|
102 |
|
103 void GetVideoLoadingProgressL( TInt& aPercentageProgress ); |
|
104 |
|
105 // |
|
106 // MMMFControllerEventMonitorObserver Implementation |
|
107 // |
|
108 void HandleEvent( const TMMFEvent& aEvent ); |
|
109 |
|
110 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
111 void OpenFile64L( const RFile64& aFile ); |
|
112 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
113 |
|
114 #ifdef SYMBIAN_BUILD_GCE |
|
115 |
|
116 TInt VideoSurfaceCreated(); |
|
117 TInt SurfaceParametersChanged(); |
|
118 TInt RemoveSurface(); |
|
119 |
|
120 void SendSurfaceCommandL( TInt aCmd ); |
|
121 |
|
122 void SendSurfaceCommandL( TInt aCmd, |
|
123 const TSurfaceId& aSurfaceId, |
|
124 const TRect& aCropRect, |
|
125 TVideoAspectRatio aAspectRatio ); |
|
126 |
|
127 #endif |
|
128 |
|
129 private: |
|
130 |
|
131 void ConstructL(); |
|
132 CMpxVideoPlayerUtility( CMPXVideoPlaybackController* aVideoPlaybackCtrl ); |
|
133 void OpenControllerL(); |
|
134 |
|
135 private: |
|
136 |
|
137 // |
|
138 // Data |
|
139 // |
|
140 CMPXVideoPlaybackController* iVideoPlaybackController; |
|
141 |
|
142 RMMFController iController; |
|
143 RMMFVideoControllerCustomCommands iVideoControllerCustomCommands; |
|
144 RMMFVideoPlayControllerCustomCommands iVideoPlayControllerCustomCommands; |
|
145 RMMFAudioPlayDeviceCustomCommands iAudioPlayDeviceCustomCommands; |
|
146 RMMFDRMCustomCommands iDrmCustomCommands; |
|
147 RMMFVideoPlayControllerExtCustomCommands iVideoPlayControllerExtCustomCommands; |
|
148 |
|
149 #ifdef SYMBIAN_BUILD_GCE |
|
150 RMMFVideoPlaySurfaceSupportCustomCommands iVideoPlaySurfaceSupportCustomCommands; |
|
151 |
|
152 TSurfaceId iSurfaceId; |
|
153 #endif |
|
154 |
|
155 CMMFControllerEventMonitor* iControllerEventMonitor; |
|
156 |
|
157 TBool iDirectScreenAccessAbort; |
|
158 }; |
|
159 |
|
160 #endif /* __MPXVIDEOPLAYERUTILITY__ */ |