tsrc/consoleplayer/player/src/openmax_al/opmaxplayerwindow.h
changeset 37 36c0918edf90
parent 35 b0f0be18af85
equal deleted inserted replaced
35:b0f0be18af85 37:36c0918edf90
       
     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  * Source file for the main class of the ConsolePlayer test app.
       
    16  *
       
    17  */
       
    18 
     1 #ifndef __OPMAX_PLAYER_WINDOW_H__
    19 #ifndef __OPMAX_PLAYER_WINDOW_H__
     2 #define __OPMAX_PLAYER_WINDOW_H__
    20 #define __OPMAX_PLAYER_WINDOW_H__
     3 
    21 
     4 #include <e32base.h>
    22 #include <e32base.h>
     5 #ifdef __USE_VIDEOPLAYER_1__
    23 #ifdef __USE_VIDEOPLAYER_1__
    13 class COpMaxPlayerWindow : public CPlayerWindow
    31 class COpMaxPlayerWindow : public CPlayerWindow
    14                          , private MVideoPlayerUtilityObserver
    32                          , private MVideoPlayerUtilityObserver
    15     {
    33     {
    16 public:
    34 public:
    17 
    35 
    18     static COpMaxPlayerWindow* NewL( RFs& aFs, 
    36     static COpMaxPlayerWindow* NewL( RFs& aFs,
    19                                    RWsSession& aWs,
    37                                    RWsSession& aWs,
    20                                    CWsScreenDevice& aScreenDevice,
    38                                    CWsScreenDevice& aScreenDevice,
    21                                    const RWindowTreeNode &aParentWindow,
    39                                    const RWindowTreeNode &aParentWindow,
    22                                    TPoint aTopRight,
    40                                    TPoint aTopRight,
    23                                    TSize aSize,
    41                                    TSize aSize,
    24                                    bool aTransparent,
    42                                    bool aTransparent,
    25                                    TRgb aBackgroundColor,
    43                                    TRgb aBackgroundColor,
    26                                    bool aSuppressGraphicsContext);
    44                                    bool aSuppressGraphicsContext);
    27     
    45 
    28     virtual ~COpMaxPlayerWindow();
    46     virtual ~COpMaxPlayerWindow();
    29 
    47 
    30     // inherited from CPlayerWindow
    48     // inherited from CPlayerWindow
    31     virtual TTimeIntervalMicroSeconds Position();
    49     virtual TTimeIntervalMicroSeconds Position();
    32     virtual TInt SetVolume( TInt aVolume );
    50     virtual TInt SetVolume( TInt aVolume );
    46     virtual TInt SetPosition( TTimeIntervalMicroSeconds aPositionInMs );
    64     virtual TInt SetPosition( TTimeIntervalMicroSeconds aPositionInMs );
    47     virtual TInt StepForward();
    65     virtual TInt StepForward();
    48     virtual TInt StepBackward();
    66     virtual TInt StepBackward();
    49     virtual TInt SetPlayVelocity( TInt aVelocity );
    67     virtual TInt SetPlayVelocity( TInt aVelocity );
    50     virtual TInt DoExecuteOperation( TInt aOperation );
    68     virtual TInt DoExecuteOperation( TInt aOperation );
    51     virtual void InitializeParameters( TSize& aVideoSize, 
    69     virtual void InitializeParameters( TSize& aVideoSize,
    52                                        TTimeIntervalMicroSeconds& aDuration, 
    70                                        TTimeIntervalMicroSeconds& aDuration,
    53                                        TInt& aMaxVolume, 
    71                                        TInt& aMaxVolume,
    54                                        TInt& aCurrentVolume,
    72                                        TInt& aCurrentVolume,
    55                                        TInt& aBalanceCenter,
    73                                        TInt& aBalanceCenter,
    56                                        TInt& aBalanceMaxLeft,
    74                                        TInt& aBalanceMaxLeft,
    57                                        TInt& aBalanceMaxRight,
    75                                        TInt& aBalanceMaxRight,
    58                                        TInt& aDefaultBalance, 
    76                                        TInt& aDefaultBalance,
    59                                        TInt& aCurrentBalance );
    77                                        TInt& aCurrentBalance );
    60     virtual void SetDefaultAutoscaleMode( TAutoscaleMode aDefaultAutoscale );    
    78     virtual void SetDefaultAutoscaleMode( TAutoscaleMode aDefaultAutoscale );
    61     virtual void PreparePlayerWithFile( RFile& aFile );
    79     virtual void PreparePlayerWithFile( RFile& aFile );
    62     virtual void PreparePlayerWithUrl( const TDesC& aUrl );
    80     virtual void PreparePlayerWithUrl( const TDesC& aUrl );
    63     
    81 
    64     
    82 
    65 private:
    83 private:
    66     
    84 
    67     COpMaxPlayerWindow( RFs& aFs, RWsSession& aWs, CWsScreenDevice& aScreenDevice, bool aSuppressGraphicsContext );
    85     COpMaxPlayerWindow( RFs& aFs, RWsSession& aWs, CWsScreenDevice& aScreenDevice, bool aSuppressGraphicsContext );
    68     
    86 
    69     void ConstructL( const RWindowTreeNode &aParentWindow, TPoint aTopRight, TSize aSize, bool aTransparent, TRgb aBackgroundColor );
    87     void ConstructL( const RWindowTreeNode &aParentWindow, TPoint aTopRight, TSize aSize, bool aTransparent, TRgb aBackgroundColor );
    70     
    88 
    71     // inherited from MVideoPlayerUtilityObserver
    89     // inherited from MVideoPlayerUtilityObserver
    72     virtual void MvpuoOpenComplete(TInt aError);
    90     virtual void MvpuoOpenComplete(TInt aError);
    73     virtual void MvpuoPrepareComplete(TInt aError);
    91     virtual void MvpuoPrepareComplete(TInt aError);
    74     virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
    92     virtual void MvpuoFrameReady(CFbsBitmap& aFrame,TInt aError);
    75     virtual void MvpuoPlayComplete(TInt aError);
    93     virtual void MvpuoPlayComplete(TInt aError);
    76     virtual void MvpuoEvent(const TMMFEvent& aEvent);
    94     virtual void MvpuoEvent(const TMMFEvent& aEvent);
    77     
    95 
    78     COpenMaxPlayerUtility*   iVideoPlayer;    
    96     COpenMaxPlayerUtility*   iVideoPlayer;
    79     TVideoRotation          iRotation;
    97     TVideoRotation          iRotation;
    80     TAutoScaleType          iDefaultAutoScale;    
    98     TAutoScaleType          iDefaultAutoScale;
    81     TAutoScaleType          iAutoScale;    
    99     TAutoScaleType          iAutoScale;
    82   
   100 
    83     };
   101     };
    84 
   102 
    85 #endif 
   103 #endif