sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Part of the MVS Agents for TechView
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
#ifndef MVSVIDEOPLAYAGENT_H
|
sl@0
|
18 |
#define MVSVIDEOPLAYAGENT_H
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <f32file.h>
|
sl@0
|
21 |
#include <flogger.h>
|
sl@0
|
22 |
#include <ecam.h>
|
sl@0
|
23 |
|
sl@0
|
24 |
#include <mmf/common/mmffourcc.h>
|
sl@0
|
25 |
#include <mmf/common/mmfstandardcustomcommands.h>
|
sl@0
|
26 |
#include <mmf/common/mmfvideo.h>
|
sl@0
|
27 |
#include <mmf/server/mmfdes.h>
|
sl@0
|
28 |
#include <mmf/server/mmffile.h>
|
sl@0
|
29 |
#include <mmf/common/mmfcontroller.h>
|
sl@0
|
30 |
|
sl@0
|
31 |
#include <videorecorder.h>
|
sl@0
|
32 |
#include <videoplayer.h>
|
sl@0
|
33 |
|
sl@0
|
34 |
#include <mvs/agentsutility.h>
|
sl@0
|
35 |
|
sl@0
|
36 |
|
sl@0
|
37 |
// forward declaration
|
sl@0
|
38 |
#ifdef SYMBIAN_BUILD_GCE
|
sl@0
|
39 |
class CVideoPlayerUtility2;
|
sl@0
|
40 |
class MMMFSurfaceEventHandler;
|
sl@0
|
41 |
#endif
|
sl@0
|
42 |
|
sl@0
|
43 |
/**
|
sl@0
|
44 |
@publishedPartner
|
sl@0
|
45 |
@prototype
|
sl@0
|
46 |
@test
|
sl@0
|
47 |
|
sl@0
|
48 |
Provides Video playing functionality for the UI
|
sl@0
|
49 |
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
class CMVSVideoPlayAgent : public CBase, MVideoPlayerUtilityObserver, MMMFAudioResourceNotificationCallback
|
sl@0
|
52 |
{
|
sl@0
|
53 |
public:
|
sl@0
|
54 |
IMPORT_C static CMVSVideoPlayAgent* NewL(MMVSClientObserver& aObserver);
|
sl@0
|
55 |
IMPORT_C ~CMVSVideoPlayAgent();
|
sl@0
|
56 |
|
sl@0
|
57 |
//opens an video clip for playback
|
sl@0
|
58 |
IMPORT_C void OpenFileL(const TDesC& aFileName);
|
sl@0
|
59 |
IMPORT_C void OpenFileL(const TDesC& aFileName, TUid aControllerUid);
|
sl@0
|
60 |
|
sl@0
|
61 |
//opens DRM protected source
|
sl@0
|
62 |
IMPORT_C void OpenFileL(TMMSource &aSource);
|
sl@0
|
63 |
|
sl@0
|
64 |
IMPORT_C void OpenDesL(const TDesC8 &aDescriptor); //For future support
|
sl@0
|
65 |
|
sl@0
|
66 |
IMPORT_C void Prepare();
|
sl@0
|
67 |
IMPORT_C void Close();
|
sl@0
|
68 |
IMPORT_C void Play();
|
sl@0
|
69 |
IMPORT_C void Play(const TTimeIntervalMicroSeconds &aStartPoint, const TTimeIntervalMicroSeconds &aEndPoint);
|
sl@0
|
70 |
IMPORT_C TInt Stop();
|
sl@0
|
71 |
IMPORT_C void PauseL();
|
sl@0
|
72 |
|
sl@0
|
73 |
//Setter Functions
|
sl@0
|
74 |
IMPORT_C void SetDisplayWindowL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindow &aWindow, const TRect &aWindowRect, const TRect &aClipRect);
|
sl@0
|
75 |
IMPORT_C void SetVideoFrameRateL(TReal32 aFramesPerSecond);
|
sl@0
|
76 |
IMPORT_C void SetVolumeL(TInt aVolume);
|
sl@0
|
77 |
IMPORT_C void SetBalanceL(TInt aBalance);
|
sl@0
|
78 |
IMPORT_C void SetPriorityL(TInt aPriority, TMdaPriorityPreference aPref);
|
sl@0
|
79 |
IMPORT_C void SetPositionL(const TTimeIntervalMicroSeconds &aPosition);
|
sl@0
|
80 |
IMPORT_C void SetRotationL(TVideoRotation aRotation);
|
sl@0
|
81 |
IMPORT_C void SetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering);
|
sl@0
|
82 |
IMPORT_C void SetCropRegionL(const TRect &aCropRegion);
|
sl@0
|
83 |
IMPORT_C void SetVideoExtentL(const TRect& aVideoExtent);
|
sl@0
|
84 |
IMPORT_C void SetWindowClipRectL(const TRect& aWindowClipRect);
|
sl@0
|
85 |
|
sl@0
|
86 |
IMPORT_C void GetFrameL(TDisplayMode aDisplayMode);
|
sl@0
|
87 |
IMPORT_C void GetFrameL(TDisplayMode aDisplayMode, ContentAccess::TIntent aIntent);
|
sl@0
|
88 |
IMPORT_C TReal32 VideoFrameRateL();
|
sl@0
|
89 |
IMPORT_C void VideoFrameSizeL(TSize &aSize) ;
|
sl@0
|
90 |
IMPORT_C const TDesC8 &VideoFormatMimeType() ;
|
sl@0
|
91 |
IMPORT_C TInt VideoBitRateL() ; //No way to seek this information in HwDevice.
|
sl@0
|
92 |
IMPORT_C TInt AudioBitRateL() ; //This is done in devsound using the custom interface.
|
sl@0
|
93 |
IMPORT_C TFourCC AudioTypeL() ;
|
sl@0
|
94 |
IMPORT_C TBool AudioEnabledL() ;
|
sl@0
|
95 |
IMPORT_C TTimeIntervalMicroSeconds PositionL() ;
|
sl@0
|
96 |
IMPORT_C TTimeIntervalMicroSeconds DurationL() ;
|
sl@0
|
97 |
|
sl@0
|
98 |
IMPORT_C TInt Volume() ;
|
sl@0
|
99 |
IMPORT_C void PriorityL(TInt &aPriority, TMdaPriorityPreference &aPref) ;
|
sl@0
|
100 |
IMPORT_C TInt Balance() ;
|
sl@0
|
101 |
|
sl@0
|
102 |
IMPORT_C TVideoRotation RotationL() ;
|
sl@0
|
103 |
IMPORT_C void GetScaleFactorL(TReal32 &aWidthPercentage, TReal32 &aHeightPercentage, TBool &aAntiAliasFiltering) ;
|
sl@0
|
104 |
IMPORT_C void GetCropRegionL(TRect &aCropRegion) ;
|
sl@0
|
105 |
|
sl@0
|
106 |
IMPORT_C TInt NumberOfMetaDataEntriesL();
|
sl@0
|
107 |
IMPORT_C void GetMetaDataArrayL(RPointerArray<CMMFMetaDataEntry>& aMetaData);
|
sl@0
|
108 |
IMPORT_C const CMMFControllerImplementationInformation &ControllerImplementationInformationL();
|
sl@0
|
109 |
|
sl@0
|
110 |
IMPORT_C TMVSState GetState();
|
sl@0
|
111 |
|
sl@0
|
112 |
IMPORT_C void SetVideoOutputL(RWsSession& aWs,
|
sl@0
|
113 |
CWsScreenDevice& aScreenDevice,
|
sl@0
|
114 |
RWindow& aWindow,
|
sl@0
|
115 |
TRect& aScreenRect,
|
sl@0
|
116 |
TRect& aClipRect);
|
sl@0
|
117 |
|
sl@0
|
118 |
IMPORT_C void AddDisplayWindowL(RWsSession& aWs,
|
sl@0
|
119 |
CWsScreenDevice& aScreenDevice,
|
sl@0
|
120 |
RWindow& aWindow,
|
sl@0
|
121 |
const TRect& aScreenRect,
|
sl@0
|
122 |
const TRect& aClipRect);
|
sl@0
|
123 |
|
sl@0
|
124 |
IMPORT_C void AddDisplayWindowL(RWsSession& aWs,
|
sl@0
|
125 |
CWsScreenDevice& aScreenDevice,
|
sl@0
|
126 |
RWindow& aWindow);
|
sl@0
|
127 |
|
sl@0
|
128 |
IMPORT_C void AddDisplayL(RWsSession& aWs, TInt aDisplay, MMMFSurfaceEventHandler& aEventHandler);
|
sl@0
|
129 |
|
sl@0
|
130 |
IMPORT_C void RemoveDisplayWindowL(RWindow& aWindow);
|
sl@0
|
131 |
IMPORT_C void RemoveDisplay(TInt aDisplay);
|
sl@0
|
132 |
|
sl@0
|
133 |
IMPORT_C TInt MaxVolume();
|
sl@0
|
134 |
IMPORT_C TInt SetScreenNumber(TInt aScreenNumber);
|
sl@0
|
135 |
IMPORT_C TInt RegisterForNotification();
|
sl@0
|
136 |
IMPORT_C TInt CancelNotification();
|
sl@0
|
137 |
IMPORT_C TInt WillResumePlay();
|
sl@0
|
138 |
IMPORT_C TBool SupportVideoPlayerUtility2() const;
|
sl@0
|
139 |
|
sl@0
|
140 |
IMPORT_C void SetAutoScaleL(RWindow& aWindow, TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
|
sl@0
|
141 |
IMPORT_C void SetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
|
sl@0
|
142 |
|
sl@0
|
143 |
#ifdef SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
|
sl@0
|
144 |
IMPORT_C void DisableSubtitlesL();
|
sl@0
|
145 |
IMPORT_C void EnableSubtitlesL();
|
sl@0
|
146 |
IMPORT_C void RenderSubtitle(const TRect& aRect);
|
sl@0
|
147 |
IMPORT_C TBool SubtitlesAvailable();
|
sl@0
|
148 |
#endif //SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
|
sl@0
|
149 |
|
sl@0
|
150 |
public:
|
sl@0
|
151 |
void MvpuoOpenComplete(TInt aError);
|
sl@0
|
152 |
void MvpuoPrepareComplete(TInt aError);
|
sl@0
|
153 |
void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
|
sl@0
|
154 |
void MvpuoPlayComplete(TInt aError);
|
sl@0
|
155 |
void MvpuoEvent(const TMMFEvent& aEvent);
|
sl@0
|
156 |
|
sl@0
|
157 |
//From MMMFAudioResourceNotificationCallback
|
sl@0
|
158 |
void MarncResourceAvailable(TUid aNotificationEventId, const TDesC8& aNotificationData);
|
sl@0
|
159 |
private:
|
sl@0
|
160 |
void ConstructL();
|
sl@0
|
161 |
CMVSVideoPlayAgent(MMVSClientObserver& aObserver);
|
sl@0
|
162 |
|
sl@0
|
163 |
private:
|
sl@0
|
164 |
CVideoPlayerUtility* iVideoPlayer;
|
sl@0
|
165 |
#ifdef SYMBIAN_BUILD_GCE
|
sl@0
|
166 |
CVideoPlayerUtility2* iVideoPlayer2;
|
sl@0
|
167 |
#endif
|
sl@0
|
168 |
|
sl@0
|
169 |
MMVSClientObserver& iObserver;
|
sl@0
|
170 |
TMVSState iState;
|
sl@0
|
171 |
TMMFEvent iEvent;
|
sl@0
|
172 |
RFs iFs;
|
sl@0
|
173 |
RFile iFile;
|
sl@0
|
174 |
CWsScreenDevice* iScreen;
|
sl@0
|
175 |
RWindow* iWindow;
|
sl@0
|
176 |
RWsSession iWs;
|
sl@0
|
177 |
RWindowGroup iRootWindow;
|
sl@0
|
178 |
RFileLogger iFileLogger;
|
sl@0
|
179 |
TInt iScreenNumber;
|
sl@0
|
180 |
TBool iSupportVideoPlayerUtility2;
|
sl@0
|
181 |
CVideoPlayerUtility* iCurrentVideoPlayer;
|
sl@0
|
182 |
RBuf iFileName;
|
sl@0
|
183 |
TUid iControllerUid;
|
sl@0
|
184 |
TBool iRequestNotify;
|
sl@0
|
185 |
#ifdef SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
|
sl@0
|
186 |
TBool iEnableSubtitlesOnAdd;
|
sl@0
|
187 |
#endif //SYMBIAN_MULTIMEDIA_SUBTITLE_SUPPORT
|
sl@0
|
188 |
};
|
sl@0
|
189 |
|
sl@0
|
190 |
|
sl@0
|
191 |
|
sl@0
|
192 |
|
sl@0
|
193 |
#endif // MVSVIDEOPLAYAGENT_H
|