33
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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:
|
|
15 |
* Header file specifing the interface for the MMF Player Window.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __MMF_PLAYER_WINDOW_H__
|
|
20 |
#define __MMF_PLAYER_WINDOW_H__
|
|
21 |
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
#ifdef __USE_VIDEOPLAYER_1__
|
|
25 |
#include <videoplayer.h>
|
|
26 |
#else
|
|
27 |
#include <videoplayer2.h>
|
|
28 |
#endif
|
|
29 |
|
|
30 |
#include "playerwindow.h"
|
|
31 |
|
|
32 |
const TUint32 KUidVideoController = { 0x101f8514 };
|
|
33 |
|
|
34 |
class CMmfPlayerWindow : public CPlayerWindow,
|
|
35 |
private MVideoPlayerUtilityObserver
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
|
|
39 |
static CMmfPlayerWindow* NewL( RFs& aFs,
|
|
40 |
RWsSession& aWs,
|
|
41 |
CWsScreenDevice& aScreenDevice,
|
|
42 |
const RWindowTreeNode &aParentWindow,
|
|
43 |
TPoint aTopRight,
|
|
44 |
TSize aSize,
|
|
45 |
bool aTransparent,
|
|
46 |
TRgb aBackgroundColor,
|
|
47 |
bool aSuppressGraphicsContext,
|
|
48 |
TUint32 aControllerUid = KUidVideoController );
|
|
49 |
|
|
50 |
virtual ~CMmfPlayerWindow();
|
|
51 |
|
|
52 |
// inherited from CPlayerWindow
|
|
53 |
virtual TTimeIntervalMicroSeconds Position();
|
|
54 |
virtual TInt SetVolume( TInt aVolume );
|
|
55 |
virtual TInt SetBalance( TInt aBalance );
|
|
56 |
virtual TInt RotationAngle();
|
|
57 |
virtual TInt NextRotationAngle();
|
|
58 |
virtual TInt ResetRotation();
|
|
59 |
virtual TInt NextAutoscaleMode();
|
|
60 |
virtual TInt ResetAutoscale();
|
|
61 |
virtual void AppendAutoscaleModeText( TDes& aString );
|
|
62 |
virtual TInt SetClipRectangle( TRect aRect );
|
|
63 |
virtual TInt SetVideoExtent( TRect aExtent );
|
|
64 |
virtual TInt SetScaleFactor( TReal aWidthScaleFactor, TReal aHeightScaleFactor );
|
|
65 |
virtual TInt Play();
|
|
66 |
virtual TInt Pause();
|
|
67 |
virtual TInt Stop();
|
|
68 |
virtual TInt SetPosition( TTimeIntervalMicroSeconds aPositionInMs );
|
|
69 |
virtual TInt StepForward();
|
|
70 |
virtual TInt StepBackward();
|
|
71 |
virtual TInt SetPlayVelocity( TInt aVelocity );
|
|
72 |
virtual TInt DoExecuteOperation( TInt aOperation );
|
|
73 |
virtual void InitializeParameters( TSize& aVideoSize,
|
|
74 |
TTimeIntervalMicroSeconds& aDuration,
|
|
75 |
TInt& aMaxVolume,
|
|
76 |
TInt& aCurrentVolume,
|
|
77 |
TInt& aBalanceCenter,
|
|
78 |
TInt& aBalanceMaxLeft,
|
|
79 |
TInt& aBalanceMaxRight,
|
|
80 |
TInt& aDefaultBalance,
|
|
81 |
TInt& aCurrentBalance );
|
|
82 |
virtual void SetDefaultAutoscaleMode( TAutoscaleMode aDefaultAutoscale );
|
|
83 |
virtual void PreparePlayerWithFile( RFile& aFile );
|
|
84 |
virtual void PreparePlayerWithUrl( const TDesC& aUrl );
|
|
85 |
|
|
86 |
private:
|
|
87 |
|
|
88 |
CMmfPlayerWindow( RFs& aFs, RWsSession& aWs, CWsScreenDevice& aScreenDevice, bool aSuppressGraphicsContext, TUint32 aControllerUid );
|
|
89 |
|
|
90 |
void ConstructL( const RWindowTreeNode &aParentWindow, TPoint aTopRight, TSize aSize, bool aTransparent, TRgb aBackgroundColor );
|
|
91 |
|
|
92 |
// inherited from MVideoPlayerUtilityObserver
|
|
93 |
virtual void MvpuoOpenComplete(TInt aError);
|
|
94 |
virtual void MvpuoPrepareComplete(TInt aError);
|
|
95 |
virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
|
|
96 |
virtual void MvpuoPlayComplete(TInt aError);
|
|
97 |
virtual void MvpuoEvent(const TMMFEvent& aEvent);
|
|
98 |
|
|
99 |
#ifdef __USE_VIDEOPLAYER_1__
|
|
100 |
CVideoPlayerUtility* iVideoPlayer;
|
|
101 |
#else
|
|
102 |
CVideoPlayerUtility2* iVideoPlayer;
|
|
103 |
#endif
|
|
104 |
|
|
105 |
TVideoRotation iRotation;
|
|
106 |
TAutoScaleType iDefaultAutoScale;
|
|
107 |
TAutoScaleType iAutoScale;
|
|
108 |
TUint32 iControllerUid;
|
|
109 |
|
|
110 |
};
|
|
111 |
|
|
112 |
#endif
|