utilities/ariprocessengine/inc/aribasecodec.h
changeset 0 bb31fbe78861
equal deleted inserted replaced
-1:000000000000 0:bb31fbe78861
       
     1 /*
       
     2 * Copyright (c) 2009 Aricent and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "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 * Aricent - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Declares interface class MBaseCodec whose pure virtual functions should be
       
    16 * implemented by all video encoder/decoder wrappers
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef ARIBASECODEC_H
       
    22 #define ARIBASECODEC_H
       
    23 
       
    24 #include <E32def.h>
       
    25 
       
    26 class MBaseCodec
       
    27 	{
       
    28 	public:
       
    29 		/**
       
    30 		 * This enumeration should be used to indicate the result
       
    31 		 * of a call to DoProcessL
       
    32 		 */
       
    33 		enum TCodecState {
       
    34 			EInputConsumed,
       
    35 			EOutputConsumed,
       
    36 			EConsumed,
       
    37 			ENotConsumed
       
    38 			};
       
    39 	public:
       
    40 
       
    41 		/**
       
    42 		 * Processes an input buffer , returns one of the TCodecState
       
    43 		 * @param aInpBuf
       
    44 		 *    Coded input data
       
    45 		 * @param aOutBuf
       
    46 		 *    Decoded output data
       
    47 		 * @leave The method will leave if an error occurs
       
    48 		 * @return one of the TCodecState members
       
    49 		 */
       
    50 		virtual TInt DoProcessL( TAny *aInpBuf, TAny* aOutBuf = NULL ) = 0;
       
    51 
       
    52 		/**
       
    53 		 * Used to set codec parameteres
       
    54 		 * @param aCommand
       
    55 		 *    Indicates the encoder parameter to set
       
    56 		 * @param aCmdData
       
    57 		 *    The value to which the encoder parameter should be set
       
    58 		 * @return symbian wide error code
       
    59 		 */
       
    60 		virtual TInt SetParam( TInt aCommand, TAny* aCmdData ) = 0;
       
    61 
       
    62 		/**
       
    63 		 * Used to get codec parameteres
       
    64 		 * @param aCommand
       
    65 		 *    Indicates the encoder parameter to get
       
    66 		 * @param aCmdData
       
    67 		 *    The value of the encoder parameter (OUT)
       
    68 		 * @return symbian wide error code
       
    69 		 */
       
    70 		virtual TInt GetParam( TInt aCommand, TAny* aCmdData ) = 0;
       
    71 
       
    72 		/**
       
    73 		 * Cancels all processing of the commands
       
    74 		 */
       
    75 		virtual void Reset() = 0;
       
    76 
       
    77 	};
       
    78 
       
    79 #endif //ARIBASECODEC_H
       
    80 
       
    81