mp3_dec/arimp3decmmfcodec/inc/arimp3decmmfcodec.h
author Pat Downey <patd@symbian.org>
Fri, 23 Jul 2010 16:58:44 +0100
changeset 0 bb31fbe78861
permissions -rw-r--r--
Initial commit of Aricent codec contribution.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2009 Aricent and/or its subsidiary(-ies).
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Aricent - initial contribution.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description: 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
* Plugin class for Mp3 decoder. This class inherits CMMFCodec 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
* class and implements the pure virtual functions of CMMFCodec.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
* The class also has a few private funtions.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
*
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
*/
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#ifndef ARIMP3DECMMFCODEC_H
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#define ARIMP3DECMMFCODEC_H
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
// system include files
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <MmfCodec.h>
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
// user include files
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
#include "arimp3decmmfcodec_uid.hrh"
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
// Forward Declaration
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
class CAriMp3DecWrapper;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
// Class declaration
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
class CAriMp3DecMmfCodec :public CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
	{
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
public: //constructors and destructors
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
	 * Two-phased constructor.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
	 * @return Pointer to an instance of CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
	static CMMFCodec* NewL();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
	/**> Destructor */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
	~CAriMp3DecMmfCodec();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
public: // From CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
	 * From CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
	 * Sets codec configuration.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
	 * The configuration data is passed in as a descriptor of type TDesC8.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
	 * @param aConfigType
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
	 * The UID of the configuration data. 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
	 * @param aParam
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
	 * Descriptor with frame info parameters in the form of RArray
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
	 virtual void ConfigureL( TUid aConfigType, const TDesC8& aParam );
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
	 /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
	  * From CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
	  * Codec reset function used to flush out status information when a 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
	  *	reposition occurs. 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
	  *	This is used if the codec requires resetting prior to use.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
	  */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
	 virtual void ResetL();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
	 /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
	  * From CMMFCodec
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
	  * Processes the data in the specified source buffer and writes the 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
	  * processed data to the specified destination buffer.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
	  * This function is synchronous, when the function returns the data 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
	  * has been processed. The source buffer is converted to the appropriate 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
	  * coding type in the destination buffer. The buffers can be of any 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
	  * size, therefore there is no guarantee that all the source buffer can 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
	  * be processed to fill the destination buffer or that all the source 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
	  * buffer may be processed before the destination is full. This function
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
	  * therefore returns the number of source, and destination, bytes 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
	  * processed along with a process result code indicating completion 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
	  * status.This function is synchronous, when the function returns the 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
	  * data has been processed. The source buffer is converted to the 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
	  * appropriate coding type in the destination buffer. The buffers can be
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
	  * of any size, therefore there is no guarantee that all the source 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
	  * buffer can be processed to fill the destination buffer or that all 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
	  * the source buffer may be processed before the destination is full. 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
	  * This function therefore returns the number of source,and destination,
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
	  * bytes processed along with a process result code indicating completion
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
	  * status.The aSource and aSink buffers passed in are derived from 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
	  * CMMFBuffer. The buffer type (e.g. a CMMFDataBuffer) passed in should 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
	  * be supported by the codec otherwise this function should leave with 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
	  * KErrNotSupported. The position of the source buffer should be checked
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
	  * by calling the source buffer's Position() member which indicates the 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
	  * current source read position in bytes. The codec should start 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
	  * processing from the current source buffer read position. The position
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
	  * of the destination buffer should be checked by calling the destination
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
	  * buffer's Position() method which indicates the current destination 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
	  * write position in bytes. The codec should start writing to the 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
	  * destination buffer at the current destination buffer write position.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
	  * This is a virtual function that each derived class must implement.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
	  * @see enum TCodecProcessResult 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
	  * @param  aSource
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
	  *         The source buffer containing data to encode or decode.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
	  *	@param  aDestination 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
	  *         The destination buffer to hold the data after encoding or 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
	  *         decoding.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
	  * @return The result of the processing.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
	  * @pre    The function ConfigureL() should have been called.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
	  */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
	 virtual TCodecProcessResult ProcessL( const CMMFBuffer& aSource, 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
										 CMMFBuffer& aDestination );
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
private:
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
	 *  Default Constructor
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
	CAriMp3DecMmfCodec();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
	 *  Symbian 2nd phase constructor .
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
	void ConstructL();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
	 * Update the result with result status, source bytes consumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
	 * and destination bytes added.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
	 * @param 	aStatus
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
	 * 		  	status of the result like EProcessComplete
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
	 * @param 	aSrcBytesConsumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
	 * 			total bytes consumed from the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
	 * @param	aDstBytesAdded
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
	 * 			total bytes added to the destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
	 * @return	result of the processing
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
	 */	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
	TCodecProcessResult Result(
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
			TCodecProcessResult::TCodecProcessResultStatus aStatus,
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
			TInt aSrcBytesConsumed,TInt aDstBytesAdded);
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
	 * Copy the bytes from internal output buffer to destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
	 * @param	aDst
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
	 * 			pointer to the destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
	 * @param	aDstBytesConsumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
	 * 			total bytes added to the destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
	 * @return 	number of bytes copied to the destination buffer.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
	TInt CopyToDstBuffer( CMMFDataBuffer* aDst, TInt& aDstBytesConsumed);
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
	 * Copy the bytes from the source buffer to the internal input burrer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
	 * @param	aSrc
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
	 * 			pointer to the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
	 * @param	aSrcBytesConsumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
	 * 			total bytes consumed from the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
	 * @return 	number bytes copied from the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
	TInt CopyFromSrcBuffer(const CMMFDataBuffer* aSrc,
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
						TInt& aSrcBytesConsumed);
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
	 * Shifts the data in the input internal buffer to start position
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
	 * @param	aFromPos
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
	 * 			position from where data has to shift
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
	 * @param	aToPos
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
	 * 			position to where data has to shift
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
	void ShiftData( TInt aFromPos, TInt aToPos );
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
	 * Gets the new data from the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
	 * @param	aSrc
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
	 * 			pointer to the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
	 * @param	aDstBytesConsumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
	 * 			total number bytes added to the destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
	 * @param	aSrcBytesConsumed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
	 * 			total number bytes consumed from the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
	 * @return	returns the processin result
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
	TCodecProcessResult GetNewData(const CMMFDataBuffer* aSrc,
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
				TInt &aDstBytesConsumed, TInt &aSrcBytesConsumed);
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
private: //Data
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
	// handle to the wrapper instance
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
	CAriMp3DecWrapper* 	iCodec;		
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
	// Residue input buffer length
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
	TInt				iInternalInputBufferResidueLen;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
	// Residue output buffer length
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
	TInt				iInternalOutputBufferResidueLen;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
	// max output buffer size
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
	TInt				iOutFrameSize;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
  	// Input internal buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
	TUint8 				*iInternalInputBuffer;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
  	// Output internal buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
	TUint8 				*iInternalOutputBuffer;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
	// internal output buffer position
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
	TInt 				iInternalOutputBufferPos;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
	};
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
#endif \\ ARIMP3DECMMFCODEC_H \\
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
//-----------------------------------------------------------------------------
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
//  End of File
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
//-----------------------------------------------------------------------------