vtprotocolplugins/DisplaySink/inc/CDisplaySinkNGA.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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:  Displaysink implementation for NGA.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CDISPLAYSINKNGA_H
       
    19 #define CDISPLAYSINKNGA_H
       
    20 
       
    21 //  INCLUDE FILES
       
    22 #include "CDisplaySink.h"
       
    23 #include "TDisplaySinkParamsNGA.h"
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  Displaysink implementation for NGA.
       
    29 *
       
    30 *  @lib displaysink.lib
       
    31 *  @since Series 60 3.1
       
    32 */
       
    33 NONSHARABLE_CLASS( CDisplaySinkNGA ) : public CDisplaySink
       
    34     {
       
    35 public: // static constructor
       
    36 
       
    37     /**
       
    38     * Static constructor that may leave.
       
    39     */
       
    40     static CDisplaySinkNGA* NewL( TDisplaySinkParams& aParams,
       
    41         const TDesC8& aInitData );
       
    42 
       
    43 private: // constructors and destructor
       
    44 
       
    45     /**
       
    46     * C++ default constructor.
       
    47     */
       
    48     CDisplaySinkNGA();
       
    49 
       
    50     /**
       
    51     * destructor
       
    52     */
       
    53     ~CDisplaySinkNGA();
       
    54 
       
    55 private: // from CDisplaySink
       
    56 
       
    57 
       
    58     /**
       
    59     * @see CDisplaySink::BaseConstructL
       
    60     */
       
    61     void BaseConstructL( TDisplaySinkParams& aParams,
       
    62         const TDesC8& aInitData );
       
    63 
       
    64     /**
       
    65     * @see CDisplaySink::BaseConvert
       
    66     */
       
    67     TBool BaseConvert( const TVtMMFDataBuffer& aBuffer );
       
    68 
       
    69     /**
       
    70     * @see CDisplaySink::BaseSinkThreadLogonL
       
    71     */
       
    72     void BaseSinkThreadLogonL();
       
    73 
       
    74     /**
       
    75     * @see CDisplaySink::BaseSinkThreadLogoff
       
    76     */
       
    77     void BaseSinkThreadLogoff();
       
    78 
       
    79     /**
       
    80     * @see CDisplaySink::BaseUpdateSinkParamsL
       
    81     */
       
    82     void BaseUpdateSinkParamsL( const TDisplaySinkParams& aParams );
       
    83 
       
    84     /**
       
    85     * @see CDisplaySink::BaseDoUpdateParamsL
       
    86     */
       
    87     void BaseDoUpdateParamsL();
       
    88 
       
    89     /**
       
    90     * @see CDisplaySink::BaseDoUpdateParamsL
       
    91     */
       
    92     void BaseSetVideoFrameSizeL( const TSize& aSize );
       
    93 
       
    94     /**
       
    95     * @see CDisplaySink::BaseSizesMatch
       
    96     */
       
    97     TBool BaseSizesMatch( const TSize& aSize );
       
    98 
       
    99     /**
       
   100     * @see CDisplaySink::BitmapEntry
       
   101     */
       
   102     TBitmapEntry& BitmapEntry( TInt aIndex );
       
   103 
       
   104     /**
       
   105     * @see CDisplaySink::BaseEmptyBufferL
       
   106     */
       
   107     void BaseEmptyBufferL( TVtMMFDataBuffer& aVTMMFBuffer );
       
   108 
       
   109     /**
       
   110     * @see CDisplaySink::BaseSetBitmapAvailable
       
   111     */
       
   112     void BaseSetBitmapAvailable( TBitmapNo aBitmapNo );
       
   113 
       
   114     /**
       
   115     * @see CDisplaySink::BaseVideoFrameSizeChangedL
       
   116     */
       
   117     void BaseVideoFrameSizeChangedL( const TSize& aNewSize );
       
   118 
       
   119 private: // MDisplaySink
       
   120 
       
   121     /**
       
   122     * @see MDisplaySink::NextFrame
       
   123     */
       
   124     void NextFrame();
       
   125 
       
   126 private: // new methods
       
   127 
       
   128     /**
       
   129     * Updates expected frame size.
       
   130     * @exception May leave with KErrNotSupported, if bitmap sizes do not match.
       
   131     */
       
   132     void UpdateExpectedFrameSizeL();
       
   133 
       
   134 private: // new classes
       
   135 
       
   136     // Class submit buffer related data
       
   137     class TBitmapEntryNGA : public TBitmapEntry
       
   138         {
       
   139     public: // data
       
   140 
       
   141         // Pointer to Surface Buffer pointer
       
   142         //TVideoFrameBuffer** iBuffer;
       
   143         TUint8**  iBuffer;
       
   144         };
       
   145 
       
   146 private: // data
       
   147 
       
   148     // Array of bitmap related structures
       
   149     TBitmapEntryNGA iBitmapTable[ KBitmapTableCount ];
       
   150 
       
   151     // Store for saving new parameters in UpdateSinkParamsL() call
       
   152     TDisplaySinkParamsNGA iNewParams;
       
   153     };
       
   154 
       
   155 #endif // CDISPLAYSINKNGA_H
       
   156 
       
   157 // End of File