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