h264_enc/arih264encwrapper/export_hdr/arih264encwrapper.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 * Export header file for wrapper APIs.Interface class for
       
    16 * H264 encoder wrapper.The member functions are pure virtual functions which
       
    17 * are to be implemented by the derived class.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef ARIH264ENCWRAPPER_H
       
    23 #define ARIH264ENCWRAPPER_H
       
    24 
       
    25 //	INCLUDES
       
    26 #include <e32def.h>
       
    27 #include <e32base.h>
       
    28 #include <devvideoconstants.h>
       
    29 #include "aribasecodec.h"
       
    30 
       
    31 //Uncomment to generate debug information useful for tracking bitrate problems
       
    32 //#define STORETOLOG
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class MBaseCodecObserver;
       
    36 class TH264EncInitParams;
       
    37 
       
    38 
       
    39 class CAriH264encWrapper: public CBase, public MBaseCodec
       
    40 	{
       
    41 
       
    42 	public:
       
    43 
       
    44 		/** 
       
    45 		 * Two-phased constructor.	
       
    46 		 * @param aEncoderParams
       
    47 		 *    Encoder params used to create the encoder.
       
    48 		 * @return pointer to an instance of CAriH264encWrapper
       
    49 		 */
       
    50 		IMPORT_C static CAriH264encWrapper* NewL(
       
    51 										TH264EncInitParams &aEncoderParams );
       
    52 
       
    53 		/**> Destructor */
       
    54 		virtual ~CAriH264encWrapper();
       
    55 
       
    56 	
       
    57 	public:
       
    58 
       
    59 
       
    60 		/** 
       
    61 		 * From MBaseCodec
       
    62 		 * Encodes an input buffer
       
    63 		 * @param	aInpBuf
       
    64 		 *    Coded input data passed by Engine.
       
    65 		 * @param	aOutBuf
       
    66 		 *	  Encoded output data
       
    67 		 * @leave	"The method will leave if an error occurs".
       
    68 		 * @return	one of the TCodecState
       
    69 		 */
       
    70 
       
    71 		virtual TInt DoProcessL ( TAny *aInpBuf, TAny* aOutBuf ) = 0;
       
    72 
       
    73 		/**
       
    74 		 * From MBaseCodec
       
    75 		 * Encodes an input buffer
       
    76 		 * @param	aCommand
       
    77 		 *    The command passed - indicates encoder parameter to be set.
       
    78 		 * @param	aOutBuf
       
    79 		 *	  The value used to set the parameter.
       
    80 		 * @leave	"The method will leave if an error occurs".
       
    81 		 * @return	one of the TCodecState
       
    82 		*/
       
    83 
       
    84 		virtual TInt SetParam (TInt aCommand, TAny* aCmdData) = 0;
       
    85 		
       
    86 		/**
       
    87 		 * Used to get codec parameteres
       
    88 		 * @param aCommand
       
    89 		 *    Indicates the encoder parameter to get
       
    90 		 * @param aCmdData
       
    91 		 *    The value of the encoder parameter (OUT)
       
    92 		 * @return symbian wide error code
       
    93 		 */
       
    94 
       
    95 		virtual TInt GetParam(TInt aCommand, TAny* aCmdData) = 0;
       
    96 
       
    97 
       
    98 		/**
       
    99 		 * Cancels all processing of the commands
       
   100 		 * @return None
       
   101 		 */
       
   102 		virtual void Reset () = 0;
       
   103 
       
   104 		/**
       
   105 		 * Sets the clocksource.
       
   106 		 * @param aClockSource
       
   107    		 *    The clocksource which will be used by wrapper.
       
   108    		 * @param aProcessingTime
       
   109    		 *    Not used currently.
       
   110 		 * @return TInt KErrArgument if clocksource is NULL
       
   111 		 *              else returns KErrNone
       
   112 		 */
       
   113 
       
   114 		virtual TInt SetSyncOptions( TAny* aClockSource,
       
   115 									TInt aProcessingTime = 0 ) = 0;
       
   116 
       
   117 		/**
       
   118 		 * Sets the reference time to be used by wrapper.
       
   119 		 * @param aReferenceTime
       
   120 		 *    The reference time passed by the plugin
       
   121 		 * @return None
       
   122 		 */
       
   123 
       
   124 		virtual void SetUpdatedRefernceTime( TInt64 &aReferenceTime ) = 0;
       
   125 
       
   126 		/**
       
   127 		 * Indicates whether current picture has been encoded or not.
       
   128 		 * @return TBool ETrue if ppicture is skipped.
       
   129 		 */
       
   130 		
       
   131 		virtual TBool IsCurrentPictureSkipped() = 0;
       
   132 
       
   133 #ifdef STORETOLOG
       
   134      public:
       
   135  	TInt 	iRemainingFramesInSecLog;
       
   136  	TInt	iRemainingBitsInSecLog;
       
   137  	TInt	iTargetLog;
       
   138  	TInt    iRemainingBitsInSecBHLog;
       
   139 	TInt    iFrameSkipHappenedLog;
       
   140 	TInt	iTimeStampEncLog;
       
   141 	TInt	iCheckingForDropLog;
       
   142 	TInt	iAbsFrameCntLog;
       
   143 	TInt	iFrameCntLog;
       
   144 	TInt	iRCLevelLog;
       
   145 	TInt	iScarceBitsLog;
       
   146 	TInt	iExcessCountLog;
       
   147 #endif
       
   148 
       
   149 	};
       
   150 
       
   151 #endif //ARIH264ENCWRAPPER_H