eaacplusutil_stub/src/eaacplusutil_stub.cpp
changeset 34 31d6e1ae5283
child 54 b68f3e90dca1
equal deleted inserted replaced
33:0267baa9dea9 34:31d6e1ae5283
       
     1 /*
       
     2 
       
     3 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     4 
       
     5 * All rights reserved.
       
     6 
       
     7 * This component and the accompanying materials are made available
       
     8 
       
     9 * under the terms of "Eclipse Public License v1.0"
       
    10 
       
    11 * which accompanies this distribution, and is available
       
    12 
       
    13 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    14 
       
    15 *
       
    16 
       
    17 * Initial Contributors:
       
    18 
       
    19 * Nokia Corporation - initial contribution.
       
    20 
       
    21 *
       
    22 
       
    23 * Contributors:
       
    24 
       
    25 *
       
    26 
       
    27 * Description:  Class definition for the frame table functions.
       
    28 
       
    29  *
       
    30 
       
    31 */
       
    32 
       
    33 
       
    34 
       
    35 
       
    36 
       
    37 
       
    38 
       
    39 
       
    40 // INCLUDE FILES
       
    41 
       
    42 #include	<e32debug.h>
       
    43 #include	<eaacplusutil.h>
       
    44 #include    "mcc_eaacputil_aaccodec.h"
       
    45 
       
    46 
       
    47 
       
    48 // ============================ MEMBER FUNCTIONS ===============================
       
    49 
       
    50 
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 
       
    54 // CEAacPlusUtil::CEAacPlusUtil
       
    55 
       
    56 // C++ default constructor can NOT contain any code, that
       
    57 
       
    58 // might leave.
       
    59 
       
    60 // -----------------------------------------------------------------------------
       
    61 
       
    62 //
       
    63 
       
    64 CEAacPlusUtil::CEAacPlusUtil()
       
    65 
       
    66     {
       
    67 
       
    68     }
       
    69 
       
    70 
       
    71 
       
    72 // -----------------------------------------------------------------------------
       
    73 
       
    74 // CEAacPlusUtil::ConstructL
       
    75 
       
    76 // Symbian 2nd phase constructor can leave.
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 
       
    80 //
       
    81 
       
    82 void CEAacPlusUtil::ConstructL()
       
    83 
       
    84     {
       
    85 
       
    86 	    iInitialized = EFalse;
       
    87 
       
    88     iGetFrameLenParam = new(ELeave)CEAacpAudioFrameInfo;
       
    89 
       
    90     }
       
    91 
       
    92 
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 
       
    96 // CEAacPlusUtil::NewL
       
    97 
       
    98 // Two-phased constructor.
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 
       
   102 //
       
   103 
       
   104 EXPORT_C CEAacPlusUtil* CEAacPlusUtil::NewL()
       
   105 
       
   106 	{
       
   107 
       
   108 	
       
   109     CEAacPlusUtil* self = new( ELeave ) CEAacPlusUtil;
       
   110 
       
   111     CleanupStack::PushL( self );
       
   112 
       
   113     self->ConstructL();
       
   114 
       
   115     CleanupStack::Pop(self);
       
   116 
       
   117     return self;
       
   118 
       
   119     }
       
   120 
       
   121 
       
   122 
       
   123 // Destructor
       
   124 
       
   125 EXPORT_C CEAacPlusUtil::~CEAacPlusUtil()
       
   126 
       
   127     {
       
   128 
       
   129     }
       
   130 
       
   131 
       
   132 
       
   133 // -----------------------------------------------------------------------------
       
   134 
       
   135 // CEAacPlusUtil::GetAacFormatType
       
   136 
       
   137 // Used to get the format type.
       
   138 
       
   139 // -----------------------------------------------------------------------------
       
   140 
       
   141 //
       
   142 
       
   143 
       
   144 
       
   145 EXPORT_C TInt CEAacPlusUtil::GetAacFormatType(const TUint8* aBuf, TInt aBufLen, TEAacPlusFormatType& aFormatType)
       
   146 
       
   147 	{
       
   148 
       
   149 	RDebug::Print(_L("CFrameTable::InitFrameTable aBuf[%d], aBufLen[%d], aFormatType[%d]"), aBuf, aBufLen, aFormatType);
       
   150     	return KErrNone;
       
   151 	}
       
   152 
       
   153 
       
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 
       
   157 // CEAacPlusUtil::GetAacFrameInfo
       
   158 
       
   159 // Used to get the format information.
       
   160 
       
   161 // -----------------------------------------------------------------------------
       
   162 
       
   163 //
       
   164 
       
   165 EXPORT_C TInt CEAacPlusUtil::GetAacFrameInfo(const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo)
       
   166 
       
   167     {
       
   168 
       
   169 	RDebug::Print(_L("CFrameTable::InitFrameTable aHdrBuf[%d], aHdrLen[%d], aFrameInfo[%d]"), aHdrBuf, aHdrLen, aFrameInfo);
       
   170     	return KErrNone;
       
   171 
       
   172     }
       
   173 
       
   174 
       
   175 
       
   176 
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 
       
   180 // CEAacPlusUtil::GetAacFrameInfo
       
   181 
       
   182 // Used to get the format information.
       
   183 
       
   184 // -----------------------------------------------------------------------------
       
   185 
       
   186 //
       
   187 
       
   188 EXPORT_C TInt CEAacPlusUtil::GetAacFrameInfo (const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo, 
       
   189 
       
   190                                                     TUint8* aDataBuf, TInt aDataBufLen)
       
   191 
       
   192     {
       
   193 
       
   194 	RDebug::Print(_L("CFrameTable::InitFrameTable aHdrBuf[%d], aHdrLen[%d], aFrameInfo[%d], aDataBuf[%d], aDataBufLen[%d]"), aHdrBuf, aHdrLen, aFrameInfo, aDataBuf, aDataBufLen);
       
   195     	return KErrNone;
       
   196 
       
   197     }
       
   198 
       
   199 
       
   200 
       
   201 // -----------------------------------------------------------------------------
       
   202 
       
   203 // CEAacPlusUtil::GetAacFrameLength
       
   204 
       
   205 // Used to get the size (in bytes) of the frame found at the start of aBuf.
       
   206 
       
   207 // -----------------------------------------------------------------------------
       
   208 
       
   209 //
       
   210 
       
   211 EXPORT_C TInt CEAacPlusUtil::GetAacFrameLength(const TUint8* aBuf,	TInt aBufLen, TInt& aFrameLen)
       
   212 
       
   213 	{	
       
   214 RDebug::Print(_L("CFrameTable::InitFrameTable aBuf[%d], aBufLen[%d], aFrameLen[%d]"), aBuf, aBufLen, aFrameLen);
       
   215     	return KErrNone;
       
   216 	}
       
   217 
       
   218 
       
   219 
       
   220 // -----------------------------------------------------------------------------
       
   221 
       
   222 // CEAacPlusUtil::Config
       
   223 
       
   224 // Used to initialize the util if FrameInfo is not used to do it.
       
   225 
       
   226 // -----------------------------------------------------------------------------
       
   227 
       
   228 //
       
   229 
       
   230 EXPORT_C TInt CEAacPlusUtil::Config(TEAacPlusFrameLenConfig& aFrameLenConfig)
       
   231 
       
   232 	{
       
   233 
       
   234 	RDebug::Print(_L("CFrameTable::InitFrameTable aFrameLenConfig[%d]"), aFrameLenConfig);
       
   235     	return KErrNone;
       
   236 	}
       
   237 
       
   238 
       
   239 
       
   240 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
   241 
       
   242 
       
   243 
       
   244 //  End of File
       
   245