mp3_dec/arimp3decwrapper/export_hdr/arimp3decwrapper.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
* Export header file for Wrapper APIs.Interface class for 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
* Mp3 Decoder Wrapper.The member functions are pure virtual functions which     
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
* are to be implemented by the derived class.
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 ARIMP3DECWRAPPER_H	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#define ARIMP3DECWRAPPER_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 includes
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <E32Base.h>
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
// Class declaration
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
class TMp3FrameInfo
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
    {
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
		
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
public:  
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
    TInt iSamplingFrequency;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
	TInt iNumberOfChannels;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
	TInt iBufferSize;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
	TInt iBitRate;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
	
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
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
// Class declaration
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
class CAriMp3DecWrapper : public CBase
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
    {
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
public:
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
    /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
     * Two-phased constructor.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
     * @return pointer to an instance of CAriMp3DecWrapper
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
	IMPORT_C static CAriMp3DecWrapper* NewL();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
	/**> Destructor */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
	virtual ~CAriMp3DecWrapper();
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
	/**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
	 * The function resets the decoder.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
	 * @param   
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
	 * @return return status         
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
	 */
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
    virtual TInt Reset() = 0 ;
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
	 * The function Gets frame information for the given source.
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
	 * @param aBuf
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
	 *    	Pointer to buffer containing the header of input stream data
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
	 * @param aBufLen
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
	 * 		Size of Buffer in bytes
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
	 * @param aFrameLen 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
	 * 		Length of the frame
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
	 * @param aInfo
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
	 * 		Reference to the structure TMp3FrameInfo 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
	 * @return return status         
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
    virtual TInt GetFrameInfo( const TUint8* aBuf, TInt aBufLen,
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
								TInt &aFrameLen, TMp3FrameInfo& aInfo ) = 0 ;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
    /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
	 * The function Gets maximum out put frame length with the information 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
	 * @param aFrameLen 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
	 * 		Length of the maximum out put frame
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
	 * @param aInfo
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
	 * 		Reference to the structure TMp3FrameInfo 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
	 * @return return status         
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
	 */ 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
    virtual TInt GetMaxFrameInfo( TInt &aFrameLen, 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
									TMp3FrameInfo& aInfo ) = 0 ;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
    /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
	 * The function gives the offset value of the buffer from where frame 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
	 * starts. 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
	 * @param aBuf 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
	 * 		Pointer to the input buffer 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
	 * @param aBufLen
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
	 * 		Length of the input buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
	 * @param aSyncPos
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
	 * 		Offset value of the buffer from where frame starts	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
	 * @return return status         
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
	 */ 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
    virtual TInt SeekSync( const TUint8* aBuf, TInt aBufLen, 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
														TInt &aSyncPos ) = 0 ;
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
    /**
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
	 * The function decodes the aSrc buffer. 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
	 * @param aSrc 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
	 * 		Pointer to the source buffer 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
	 * @param aSrcUsed
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
	 * 		Size of the source buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
	 * @param aDst
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
	 * 		Pointer to the destination buffer
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
	 * @param aDstLen
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
	 * 		Size of the destination buffer	
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
	 * @return return status         
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
	 */ 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
    virtual TInt Decode( TUint8* aSrc, TInt& aSrcUsed, TUint8* aDst, 
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
														TInt& aDstLen ) = 0 ;    
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
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
#endif //ARIMP3DECWRAPPER_H
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
//-----------------------------------------------------------------------------
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
//  End of File
bb31fbe78861 Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
//-----------------------------------------------------------------------------