33
|
1 |
#ifndef __OPMAX_PLAYER_WINDOW_H__
|
|
2 |
#define __OPMAX_PLAYER_WINDOW_H__
|
|
3 |
|
|
4 |
#include <e32base.h>
|
|
5 |
#ifdef __USE_VIDEOPLAYER_1__
|
|
6 |
#include <videoplayer.h>
|
|
7 |
#else
|
|
8 |
#include <videoplayer2.h>
|
|
9 |
#endif
|
|
10 |
#include "playerwindow.h"
|
|
11 |
#include "openmaxplayerutility.h"
|
|
12 |
|
|
13 |
class COpMaxPlayerWindow : public CPlayerWindow
|
|
14 |
, private MVideoPlayerUtilityObserver
|
|
15 |
{
|
|
16 |
public:
|
|
17 |
|
|
18 |
static COpMaxPlayerWindow* NewL( RFs& aFs,
|
|
19 |
RWsSession& aWs,
|
|
20 |
CWsScreenDevice& aScreenDevice,
|
|
21 |
const RWindowTreeNode &aParentWindow,
|
|
22 |
TPoint aTopRight,
|
|
23 |
TSize aSize,
|
|
24 |
bool aTransparent,
|
|
25 |
TRgb aBackgroundColor,
|
|
26 |
bool aSuppressGraphicsContext);
|
|
27 |
|
|
28 |
virtual ~COpMaxPlayerWindow();
|
|
29 |
|
|
30 |
// inherited from CPlayerWindow
|
|
31 |
virtual TTimeIntervalMicroSeconds Position();
|
|
32 |
virtual TInt SetVolume( TInt aVolume );
|
|
33 |
virtual TInt SetBalance( TInt aBalance );
|
|
34 |
virtual TInt RotationAngle();
|
|
35 |
virtual TInt NextRotationAngle();
|
|
36 |
virtual TInt ResetRotation();
|
|
37 |
virtual TInt NextAutoscaleMode();
|
|
38 |
virtual TInt ResetAutoscale();
|
|
39 |
virtual void AppendAutoscaleModeText( TDes& aString );
|
|
40 |
virtual TInt SetClipRectangle( TRect aRect );
|
|
41 |
virtual TInt SetVideoExtent( TRect aExtent );
|
|
42 |
virtual TInt SetScaleFactor( TReal aWidthScaleFactor, TReal aHeightScaleFactor );
|
|
43 |
virtual TInt Play();
|
|
44 |
virtual TInt Pause();
|
|
45 |
virtual TInt Stop();
|
|
46 |
virtual TInt SetPosition( TTimeIntervalMicroSeconds aPositionInMs );
|
|
47 |
virtual TInt StepForward();
|
|
48 |
virtual TInt StepBackward();
|
|
49 |
virtual TInt SetPlayVelocity( TInt aVelocity );
|
|
50 |
virtual TInt DoExecuteOperation( TInt aOperation );
|
|
51 |
virtual void InitializeParameters( TSize& aVideoSize,
|
|
52 |
TTimeIntervalMicroSeconds& aDuration,
|
|
53 |
TInt& aMaxVolume,
|
|
54 |
TInt& aCurrentVolume,
|
|
55 |
TInt& aBalanceCenter,
|
|
56 |
TInt& aBalanceMaxLeft,
|
|
57 |
TInt& aBalanceMaxRight,
|
|
58 |
TInt& aDefaultBalance,
|
|
59 |
TInt& aCurrentBalance );
|
|
60 |
virtual void SetDefaultAutoscaleMode( TAutoscaleMode aDefaultAutoscale );
|
|
61 |
virtual void PreparePlayerWithFile( RFile& aFile );
|
|
62 |
virtual void PreparePlayerWithUrl( const TDesC& aUrl );
|
|
63 |
|
|
64 |
|
|
65 |
private:
|
|
66 |
|
|
67 |
COpMaxPlayerWindow( RFs& aFs, RWsSession& aWs, CWsScreenDevice& aScreenDevice, bool aSuppressGraphicsContext );
|
|
68 |
|
|
69 |
void ConstructL( const RWindowTreeNode &aParentWindow, TPoint aTopRight, TSize aSize, bool aTransparent, TRgb aBackgroundColor );
|
|
70 |
|
|
71 |
// inherited from MVideoPlayerUtilityObserver
|
|
72 |
virtual void MvpuoOpenComplete(TInt aError);
|
|
73 |
virtual void MvpuoPrepareComplete(TInt aError);
|
|
74 |
virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
|
|
75 |
virtual void MvpuoPlayComplete(TInt aError);
|
|
76 |
virtual void MvpuoEvent(const TMMFEvent& aEvent);
|
|
77 |
|
|
78 |
COpenMaxPlayerUtility* iVideoPlayer;
|
|
79 |
TVideoRotation iRotation;
|
|
80 |
TAutoScaleType iDefaultAutoScale;
|
|
81 |
TAutoScaleType iAutoScale;
|
|
82 |
|
|
83 |
};
|
|
84 |
|
|
85 |
#endif
|