devsound/devsoundpluginsupport/src/CustomInterfaces/eaacplusdecoderci.cpp
changeset 0 40261b775718
equal deleted inserted replaced
-1:000000000000 0:40261b775718
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <ecom/implementationproxy.h>
       
    17 #include <ecom/implementationproxy.h>
       
    18 #include <ecom/ecom.h>
       
    19 
       
    20 #include "eaacplusdecoderci.h"
       
    21 
       
    22 
       
    23 // MUX //
       
    24 /*****************************************************************************/
       
    25 
       
    26 TInt CMMFEAacPlusDecoderMux::OpenInterface(TUid /*aInterfaceId*/)
       
    27 	{
       
    28 	// attempt to open the interface link with the
       
    29 	// remote slave device
       
    30 	iRemoteHandle = -1;
       
    31 	TUid slaveId = {KMmfUidCustomInterfaceEAacPlusDecoderDeMux};
       
    32 		
       
    33 	TInt handle = iUtility->OpenSlave(slaveId, KNullDesC8);
       
    34 	if (handle >= 0)
       
    35 		{
       
    36 		iRemoteHandle = handle;
       
    37 		}
       
    38 		
       
    39 	return iRemoteHandle;
       
    40 	}
       
    41 
       
    42 /*****************************************************************************/
       
    43 void CMMFEAacPlusDecoderMux::Release()
       
    44 	{
       
    45 	// close the slave device if it exists
       
    46 	if (iRemoteHandle > 0)
       
    47 		{
       
    48 		// we assume the slave is closed correctly
       
    49 		iUtility->CloseSlave(iRemoteHandle);
       
    50 		}
       
    51 	
       
    52 	TUid key = iDestructorKey;
       
    53 	delete this;
       
    54 	
       
    55 	// tell ECom to destroy us
       
    56 	REComSession::DestroyedImplementation(key);
       
    57 	}
       
    58 
       
    59 /*****************************************************************************/	
       
    60 void CMMFEAacPlusDecoderMux::PassDestructorKey(TUid aDestructorKey)
       
    61 	{
       
    62 	// store the destructor key
       
    63 	iDestructorKey = aDestructorKey;
       
    64 	}
       
    65 
       
    66 /*****************************************************************************/
       
    67 void CMMFEAacPlusDecoderMux::CompleteConstructL(MMMFDevSoundCustomInterfaceMuxUtility* aCustomUtility)
       
    68 	{
       
    69 	// store a pointer to the utility
       
    70 	iUtility = aCustomUtility;
       
    71 	}
       
    72 
       
    73 /*****************************************************************************/	
       
    74 MMMFDevSoundCustomInterfaceMuxPlugin* CMMFEAacPlusDecoderMux::NewL()
       
    75 	{
       
    76 	CMMFEAacPlusDecoderMux* self = new (ELeave) CMMFEAacPlusDecoderMux;
       
    77 	return self;
       
    78 	}
       
    79 
       
    80 /*****************************************************************************/	
       
    81 TAny* CMMFEAacPlusDecoderMux::CustomInterface(TUid /*aInterfaceId*/)
       
    82 	{
       
    83 	MEAacPlusDecoderIntfc* interface = this;
       
    84 	return interface;
       
    85 	}
       
    86 	
       
    87 /*****************************************************************************/
       
    88 CMMFEAacPlusDecoderMux::CMMFEAacPlusDecoderMux() :
       
    89 	iRemoteHandle(-1)
       
    90 	{	
       
    91 	}
       
    92 
       
    93 /*****************************************************************************/
       
    94 CMMFEAacPlusDecoderMux::~CMMFEAacPlusDecoderMux()
       
    95 	{	
       
    96 	}
       
    97 
       
    98 /*****************************************************************************/
       
    99 // from MEAacPlusDecoderIntfc
       
   100 void CMMFEAacPlusDecoderMux::SetInputSamplingFrequency(TUint aInputSamplingFrequency)
       
   101 	{
       
   102 	if (iRemoteHandle > 0)
       
   103 		{
       
   104 		// send the frequency in the sync command
       
   105 		TPckgBuf<TUint> freqBuffer(aInputSamplingFrequency);
       
   106 		// No way of reporting an error message so ignore the return value from SendSlaveSyncCommand
       
   107 		iUtility->SendSlaveSyncCommand( iRemoteHandle,
       
   108 										EMMFDevSoundCIEAacPlusDecoderSetInputSamplingFrequency,
       
   109 										freqBuffer);
       
   110 		}
       
   111 	}
       
   112 
       
   113 void CMMFEAacPlusDecoderMux::SetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType aAudioObjectType)
       
   114 	{
       
   115 	if (iRemoteHandle > 0)
       
   116 		{
       
   117 		// send the object type in the sync command
       
   118 		TPckgBuf<MEAacPlusDecoderIntfc::TAudioObjectType> objTypeBuffer(aAudioObjectType);
       
   119 		// No way of reporting an error message so ignore the return value from SendSlaveSyncCommand
       
   120 		iUtility->SendSlaveSyncCommand( iRemoteHandle,
       
   121 										EMMFDevSoundCIEAacPlusDecoderSetAudioObjectType,
       
   122 										objTypeBuffer);
       
   123 		}
       
   124 	}
       
   125 
       
   126 void CMMFEAacPlusDecoderMux::SetNumOfChannels(TUint aNumOfChannels)
       
   127 	{
       
   128 	if (iRemoteHandle > 0)
       
   129 		{
       
   130 		// send the number of channels in the sync command
       
   131 		TPckgBuf<TUint> numBuffer(aNumOfChannels);
       
   132 		// No way of reporting an error message so ignore the return value from SendSlaveSyncCommand
       
   133 		iUtility->SendSlaveSyncCommand( iRemoteHandle,
       
   134 										EMMFDevSoundCIEAacPlusDecoderSetNumOfChannels,
       
   135 										numBuffer);
       
   136 		}
       
   137 	}
       
   138 
       
   139 void CMMFEAacPlusDecoderMux::SetSbr(TBool aSbrEnabled)
       
   140 	{
       
   141 	if (iRemoteHandle > 0)
       
   142 		{
       
   143 		// send the SBR enabled flag in the sync command
       
   144 		TPckgBuf<TBool> flagBuffer(aSbrEnabled);
       
   145 		// No way of reporting an error message so ignore the return value from SendSlaveSyncCommand
       
   146 		iUtility->SendSlaveSyncCommand( iRemoteHandle,
       
   147 										EMMFDevSoundCIEAacPlusDecoderSetSbr,
       
   148 										flagBuffer);
       
   149 		}
       
   150 	}
       
   151 
       
   152 void CMMFEAacPlusDecoderMux::SetDownSampledMode(TBool aDsmEnabled)
       
   153 	{
       
   154 	if (iRemoteHandle > 0)
       
   155 		{
       
   156 		// send the DSM enabled flag in the sync command
       
   157 		TPckgBuf<TBool> flagBuffer(aDsmEnabled);
       
   158 		// No way of reporting an error message so ignore the return value from SendSlaveSyncCommand
       
   159 		iUtility->SendSlaveSyncCommand( iRemoteHandle,
       
   160 										EMMFDevSoundCIEAacPlusDecoderSetDownSampledMode,
       
   161 										flagBuffer);
       
   162 		}
       
   163 	}
       
   164 
       
   165 TInt CMMFEAacPlusDecoderMux::ApplyConfig()
       
   166 	{
       
   167 	TInt retVal = KErrNotReady;
       
   168 	if (iRemoteHandle > 0)
       
   169 		{
       
   170 		retVal = iUtility->SendSlaveSyncCommand(iRemoteHandle,
       
   171 												EMMFDevSoundCIEAacPlusDecoderApplyConfig,
       
   172 												KNullDesC8);
       
   173 		}
       
   174 	return retVal;
       
   175 	}
       
   176 
       
   177 TInt CMMFEAacPlusDecoderMux::GetInputSamplingFrequency(TUint& aInputSamplingFrequency)
       
   178 	{
       
   179 	TInt result = KErrNotReady;
       
   180 
       
   181 	if (iRemoteHandle > 0)
       
   182 		{
       
   183 		TPckgBuf<TUint> freqBuffer;
       
   184 		result = iUtility->SendSlaveSyncCommandResult(iRemoteHandle,
       
   185 													  EMMFDevSoundCIEAacPlusDecoderGetInputSamplingFrequency,
       
   186 													  KNullDesC8,
       
   187 													  freqBuffer);
       
   188 		aInputSamplingFrequency = freqBuffer();
       
   189 		}
       
   190 		
       
   191 	return result;
       
   192 	}
       
   193 
       
   194 TInt CMMFEAacPlusDecoderMux::GetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType& aAudioObjectType)
       
   195 	{
       
   196 	TInt result = KErrNotReady;
       
   197 
       
   198 	if (iRemoteHandle > 0) 
       
   199 		{
       
   200 		TPckgBuf<MEAacPlusDecoderIntfc::TAudioObjectType> objTypeBuffer;
       
   201 		result = iUtility->SendSlaveSyncCommandResult(iRemoteHandle,
       
   202 													  EMMFDevSoundCIEAacPlusDecoderGetAudioObjectType,
       
   203 													  KNullDesC8,
       
   204 													  objTypeBuffer);
       
   205 		aAudioObjectType = objTypeBuffer();
       
   206 		}
       
   207 
       
   208 	return result;
       
   209 	}
       
   210 
       
   211 TInt CMMFEAacPlusDecoderMux::GetNumOfChannels(TUint& aNumOfChannels)
       
   212 	{
       
   213 	TInt result = KErrNotReady;
       
   214 	if (iRemoteHandle > 0)
       
   215 		{
       
   216 		TPckgBuf<TUint> channelsBuffer;
       
   217 		result = iUtility->SendSlaveSyncCommandResult(iRemoteHandle,
       
   218 													  EMMFDevSoundCIEAacPlusDecoderGetNumOfChannels,
       
   219 													  KNullDesC8,
       
   220 													  channelsBuffer);
       
   221 		aNumOfChannels = channelsBuffer();
       
   222 		}
       
   223 		
       
   224 	return result;
       
   225 	}
       
   226 
       
   227 TInt CMMFEAacPlusDecoderMux::GetSbr(TBool& aSbrEnabled)
       
   228 	{
       
   229 	TInt result = KErrNotReady;
       
   230 	if (iRemoteHandle > 0)
       
   231 		{
       
   232 		TPckgBuf<TBool> flagBuffer;
       
   233 		result = iUtility->SendSlaveSyncCommandResult(iRemoteHandle,
       
   234 													  EMMFDevSoundCIEAacPlusDecoderGetSbr,
       
   235 													  KNullDesC8,
       
   236 													  flagBuffer);
       
   237 		aSbrEnabled = flagBuffer();
       
   238 		}
       
   239 		
       
   240 	return result;
       
   241 	}
       
   242 
       
   243 TInt CMMFEAacPlusDecoderMux::GetDownSampledMode(TBool& aDsmEnabled)
       
   244 	{
       
   245 	TInt result = KErrNotReady;
       
   246 	if (iRemoteHandle > 0)
       
   247 		{
       
   248 		TPckgBuf<TBool> flagBuffer;
       
   249 		result = iUtility->SendSlaveSyncCommandResult(iRemoteHandle,
       
   250 													  EMMFDevSoundCIEAacPlusDecoderGetDownSampledMode,
       
   251 													  KNullDesC8,
       
   252 													  flagBuffer);
       
   253 		aDsmEnabled = flagBuffer();
       
   254 		}
       
   255 		
       
   256 	return result;
       
   257 	}
       
   258 
       
   259 // DEMUX //	
       
   260 /*****************************************************************************/
       
   261 TInt CMMFEAacPlusDecoderDeMux::OpenInterface(TUid /*aInterfaceId*/)
       
   262 	{
       
   263 	return KErrNone;
       
   264 	}
       
   265 
       
   266 /*****************************************************************************/	
       
   267 void CMMFEAacPlusDecoderDeMux::Release()
       
   268 	{
       
   269 	TUid key = iDestructorKey;
       
   270 	
       
   271 	delete this;
       
   272 	
       
   273 	// tell ECom to destroy us
       
   274 	REComSession::DestroyedImplementation(key);
       
   275 	}
       
   276 	
       
   277 /*****************************************************************************/	
       
   278 void CMMFEAacPlusDecoderDeMux::PassDestructorKey(TUid aDestructorKey)
       
   279 	{
       
   280 	// store the destructor key
       
   281 	iDestructorKey = aDestructorKey;
       
   282 	}
       
   283 	
       
   284 /*****************************************************************************/	
       
   285 void CMMFEAacPlusDecoderDeMux::SetInterfaceTarget(MMMFDevSoundCustomInterfaceTarget* aTarget)
       
   286 	{
       
   287 	iTarget = aTarget;
       
   288 	}
       
   289 
       
   290 /*****************************************************************************/	
       
   291 void CMMFEAacPlusDecoderDeMux::CompleteConstructL(MMMFDevSoundCustomInterfaceDeMuxUtility* aCustomUtility)
       
   292 	{
       
   293 	// store a pointer to the utility
       
   294 	iUtility = aCustomUtility;
       
   295 	}
       
   296 
       
   297 /*****************************************************************************/
       
   298 void CMMFEAacPlusDecoderDeMux::RefreshL()
       
   299 	{
       
   300 	// refetch the EAAC+ decoder custom interface if we already have a target
       
   301 	if (iTarget)
       
   302 		{
       
   303 		iInterfaceEAacPlusDecoder = static_cast <MEAacPlusDecoderIntfc*> (iTarget->CustomInterface(KUidEAacPlusDecoderIntfc));
       
   304 		if (!iInterfaceEAacPlusDecoder)
       
   305 			{
       
   306 			User::Leave(KErrNotSupported);
       
   307 			}
       
   308 		}
       
   309 	}
       
   310 
       
   311 /*****************************************************************************/
       
   312 MMMFDevSoundCustomInterfaceDeMuxPlugin* CMMFEAacPlusDecoderDeMux::NewL()
       
   313 	{
       
   314 	CMMFEAacPlusDecoderDeMux* self = new (ELeave) CMMFEAacPlusDecoderDeMux;
       
   315 	return self;
       
   316 	}
       
   317 
       
   318 /*****************************************************************************/	
       
   319 CMMFEAacPlusDecoderDeMux::CMMFEAacPlusDecoderDeMux()
       
   320 	{	
       
   321 	}
       
   322 
       
   323 /*****************************************************************************/
       
   324 CMMFEAacPlusDecoderDeMux::~CMMFEAacPlusDecoderDeMux()
       
   325 	{
       
   326 	}
       
   327 
       
   328 /*****************************************************************************/
       
   329 TInt CMMFEAacPlusDecoderDeMux::DoOpenSlaveL(TUid /*aInterface*/, const TDesC8& /*aPackageBuf*/)
       
   330 	{
       
   331 	// fetch the EAAC+ decoder Hw Device custom interface
       
   332 	iInterfaceEAacPlusDecoder = static_cast<MEAacPlusDecoderIntfc*> (iTarget->CustomInterface(KUidEAacPlusDecoderIntfc)); 
       
   333 	
       
   334 	if (!iInterfaceEAacPlusDecoder)
       
   335 		{
       
   336 		User::Leave(KErrNotSupported);
       
   337 		}
       
   338 
       
   339 	return KErrNone;
       
   340 	}
       
   341 	
       
   342 /*****************************************************************************/	
       
   343 void CMMFEAacPlusDecoderDeMux::DoCloseSlaveL(TInt /*aHandle*/)
       
   344 	{
       
   345 	// nothing to do
       
   346 	}
       
   347 
       
   348 /*****************************************************************************/
       
   349 // original RMessage is supplied so that remote demux plugin can extract necessary details
       
   350 // using DeMux utility
       
   351 TInt CMMFEAacPlusDecoderDeMux::DoSendSlaveSyncCommandL(const RMmfIpcMessage& aMessage)
       
   352 	{
       
   353 	TMMFDevSoundCIMessageData data;
       
   354 	
       
   355 	// decode message
       
   356 	iUtility->GetSyncMessageDataL(aMessage, data);
       
   357 	
       
   358 	TInt retVal = -1;
       
   359 	switch (data.iCommand)
       
   360 		{
       
   361 		case EMMFDevSoundCIEAacPlusDecoderSetInputSamplingFrequency:
       
   362 			{
       
   363 			TPckgBuf<TUint> freqBuffer;
       
   364 			iUtility->ReadFromInputDesL(aMessage, &freqBuffer);
       
   365 			DoSetInputSamplingFrequency(freqBuffer());
       
   366 			retVal = KErrNone;
       
   367 			break;
       
   368 			}
       
   369 		case EMMFDevSoundCIEAacPlusDecoderSetAudioObjectType:
       
   370 			{
       
   371 			TPckgBuf<MEAacPlusDecoderIntfc::TAudioObjectType> audioObjectTypeBuffer;
       
   372 			iUtility->ReadFromInputDesL(aMessage, &audioObjectTypeBuffer);
       
   373 			DoSetAudioObjectType(audioObjectTypeBuffer());
       
   374 			retVal = KErrNone;
       
   375 			break;
       
   376 			}
       
   377 		case EMMFDevSoundCIEAacPlusDecoderSetNumOfChannels:
       
   378 			{
       
   379 			TPckgBuf<TUint> numChannelsBuffer;
       
   380 			iUtility->ReadFromInputDesL(aMessage, &numChannelsBuffer);
       
   381 			DoSetNumOfChannels(numChannelsBuffer());
       
   382 			retVal = KErrNone;
       
   383 			break;
       
   384 			}
       
   385 		case EMMFDevSoundCIEAacPlusDecoderSetSbr:
       
   386 			{
       
   387 			TPckgBuf<TBool> flagBuffer;
       
   388 			iUtility->ReadFromInputDesL(aMessage, &flagBuffer);
       
   389 			DoSetSbr(flagBuffer());
       
   390 			retVal = KErrNone;
       
   391 			break;
       
   392 			}
       
   393 		case EMMFDevSoundCIEAacPlusDecoderSetDownSampledMode:
       
   394 			{
       
   395 			TPckgBuf<TBool> flagBuffer;
       
   396 			iUtility->ReadFromInputDesL(aMessage, &flagBuffer);
       
   397 			DoSetDownSampledMode(flagBuffer());
       
   398 			retVal = KErrNone;
       
   399 			break;
       
   400 			}
       
   401 		case EMMFDevSoundCIEAacPlusDecoderApplyConfig:
       
   402 			{
       
   403 			retVal = DoApplyConfig();
       
   404 			break;
       
   405 			}
       
   406 		default:
       
   407 			{
       
   408 			User::Leave(KErrNotSupported);
       
   409 			}		
       
   410 		};
       
   411 		
       
   412 	return retVal;
       
   413 	}
       
   414 	
       
   415 /*****************************************************************************/	
       
   416 TInt CMMFEAacPlusDecoderDeMux::DoSendSlaveSyncCommandResultL(const RMmfIpcMessage& aMessage)
       
   417 	{
       
   418 	TMMFDevSoundCIMessageData data;
       
   419 	
       
   420 	// decode message
       
   421 	iUtility->GetSyncMessageDataL(aMessage, data);
       
   422 	
       
   423 	TInt retVal = -1;
       
   424 	switch (data.iCommand)
       
   425 		{
       
   426 		case EMMFDevSoundCIEAacPlusDecoderGetInputSamplingFrequency:
       
   427 			{
       
   428 			TPckgBuf<TUint> freqBuf;
       
   429 			retVal = DoGetInputSamplingFrequency(freqBuf());
       
   430 			iUtility->WriteToOutputDesL(aMessage, freqBuf);		
       
   431 			break;
       
   432 			}
       
   433 		case EMMFDevSoundCIEAacPlusDecoderGetAudioObjectType:
       
   434 			{
       
   435 			TPckgBuf<MEAacPlusDecoderIntfc::TAudioObjectType> objTypeBuf;
       
   436 			retVal = DoGetAudioObjectType(objTypeBuf());
       
   437 			iUtility->WriteToOutputDesL(aMessage, objTypeBuf);		
       
   438 			break;
       
   439 			}
       
   440 		case EMMFDevSoundCIEAacPlusDecoderGetNumOfChannels:
       
   441 			{
       
   442 			TPckgBuf<TUint> channelsBuf;
       
   443 			retVal = DoGetNumOfChannels(channelsBuf());
       
   444 			iUtility->WriteToOutputDesL(aMessage, channelsBuf);		
       
   445 			break;
       
   446 			}
       
   447 		case EMMFDevSoundCIEAacPlusDecoderGetSbr:
       
   448 			{
       
   449 			TPckgBuf<TBool> flagBuf;
       
   450 			retVal = DoGetSbr(flagBuf());
       
   451 			iUtility->WriteToOutputDesL(aMessage, flagBuf);		
       
   452 			break;
       
   453 			}
       
   454 		case EMMFDevSoundCIEAacPlusDecoderGetDownSampledMode:
       
   455 			{
       
   456 			TPckgBuf<TBool> flagBuf;
       
   457 			retVal = DoGetDownSampledMode(flagBuf());
       
   458 			iUtility->WriteToOutputDesL(aMessage, flagBuf);		
       
   459 			break;
       
   460 			}
       
   461 		default:
       
   462 			{
       
   463 			User::Leave(KErrNotSupported);
       
   464 			}
       
   465 		}
       
   466 
       
   467 	return retVal;
       
   468 	}
       
   469 	
       
   470 /*****************************************************************************/	
       
   471 void CMMFEAacPlusDecoderDeMux::DoSendSlaveAsyncCommandL(const RMmfIpcMessage& /*aMessage*/)
       
   472 	{
       
   473 	// not used in this interface
       
   474 	}
       
   475 	
       
   476 /*****************************************************************************/	
       
   477 void CMMFEAacPlusDecoderDeMux::DoSendSlaveAsyncCommandResultL(const RMmfIpcMessage& /*aMessage*/)
       
   478 	{
       
   479 	// not used in this interface
       
   480 	}
       
   481 
       
   482 /*****************************************************************************/
       
   483 // EAAC+ Decoder custom interface implementation
       
   484 void CMMFEAacPlusDecoderDeMux::DoSetInputSamplingFrequency(TUint aInputSamplingFrequency)
       
   485 	{
       
   486 	if (iInterfaceEAacPlusDecoder)
       
   487 		{
       
   488 		iInterfaceEAacPlusDecoder->SetInputSamplingFrequency(aInputSamplingFrequency);
       
   489 		}
       
   490 	}
       
   491 	
       
   492 /*****************************************************************************/	
       
   493 void CMMFEAacPlusDecoderDeMux::DoSetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType aAudioObjectType)
       
   494 	{
       
   495 	if (iInterfaceEAacPlusDecoder)
       
   496 		{
       
   497 		iInterfaceEAacPlusDecoder->SetAudioObjectType(aAudioObjectType);
       
   498 		}		
       
   499 	}
       
   500 	
       
   501 /*****************************************************************************/	
       
   502 void CMMFEAacPlusDecoderDeMux::DoSetNumOfChannels(TUint aNumOfChannels)
       
   503 	{
       
   504 	if (iInterfaceEAacPlusDecoder)
       
   505 		{
       
   506 		iInterfaceEAacPlusDecoder->SetNumOfChannels(aNumOfChannels);
       
   507 		}		
       
   508 	}
       
   509 	
       
   510 /*****************************************************************************/	
       
   511 void CMMFEAacPlusDecoderDeMux::DoSetSbr(TBool aSbrEnabled)
       
   512 	{
       
   513 	if (iInterfaceEAacPlusDecoder)
       
   514 		{
       
   515 		iInterfaceEAacPlusDecoder->SetSbr(aSbrEnabled);
       
   516 		}		
       
   517 	}
       
   518 	
       
   519 /*****************************************************************************/	
       
   520 void CMMFEAacPlusDecoderDeMux::DoSetDownSampledMode(TBool aDsmEnabled)
       
   521 	{
       
   522 	if (iInterfaceEAacPlusDecoder)
       
   523 		{
       
   524 		iInterfaceEAacPlusDecoder->SetDownSampledMode(aDsmEnabled);
       
   525 		}		
       
   526 	}
       
   527 	
       
   528 /*****************************************************************************/	
       
   529 TInt CMMFEAacPlusDecoderDeMux::DoApplyConfig()
       
   530 	{
       
   531 	// Initialise the return value to an error that reflects the plugin's not ready
       
   532 	TInt retVal = KErrNotReady;
       
   533 	if (iInterfaceEAacPlusDecoder)
       
   534 		{
       
   535 		retVal = iInterfaceEAacPlusDecoder->ApplyConfig();
       
   536 		}
       
   537 	return retVal;
       
   538 	}
       
   539 	
       
   540 /*****************************************************************************/	
       
   541 TInt CMMFEAacPlusDecoderDeMux::DoGetInputSamplingFrequency(TUint& aInputSamplingFrequency)
       
   542 	{
       
   543 	TInt ret = KErrNotReady;
       
   544 	if (iInterfaceEAacPlusDecoder)
       
   545 		{
       
   546 		ret = iInterfaceEAacPlusDecoder->GetInputSamplingFrequency(aInputSamplingFrequency);
       
   547 		}
       
   548 	return ret;
       
   549 	}
       
   550 	
       
   551 /*****************************************************************************/	
       
   552 TInt CMMFEAacPlusDecoderDeMux::DoGetAudioObjectType(MEAacPlusDecoderIntfc::TAudioObjectType& aAudioObjectType)
       
   553 	{
       
   554 	TInt err = KErrNotReady;
       
   555 	if (iInterfaceEAacPlusDecoder)
       
   556 		{
       
   557 		err = iInterfaceEAacPlusDecoder->GetAudioObjectType(aAudioObjectType);
       
   558 		}
       
   559 	return err;
       
   560 	}
       
   561 
       
   562 /*****************************************************************************/	
       
   563 TInt CMMFEAacPlusDecoderDeMux::DoGetNumOfChannels(TUint& aNumOfChannels)
       
   564 	{
       
   565 	TInt err = KErrNotReady;
       
   566 	if (iInterfaceEAacPlusDecoder)
       
   567 		{
       
   568 		err = iInterfaceEAacPlusDecoder->GetNumOfChannels(aNumOfChannels);
       
   569 		}
       
   570 	return err;
       
   571 	}
       
   572 
       
   573 /*****************************************************************************/	
       
   574 TInt CMMFEAacPlusDecoderDeMux::DoGetSbr(TBool& aSbrEnabled)
       
   575 	{
       
   576 	TInt err = KErrNotReady;
       
   577 	if (iInterfaceEAacPlusDecoder)
       
   578 		{
       
   579 		err = iInterfaceEAacPlusDecoder->GetSbr(aSbrEnabled);
       
   580 		}
       
   581 	return err;
       
   582 	}
       
   583 	
       
   584 /*****************************************************************************/	
       
   585 TInt CMMFEAacPlusDecoderDeMux::DoGetDownSampledMode(TBool& aDsmEnabled)
       
   586 	{
       
   587 	TInt err = KErrNotReady;
       
   588 	if (iInterfaceEAacPlusDecoder)
       
   589 		{
       
   590 		err = iInterfaceEAacPlusDecoder->GetDownSampledMode(aDsmEnabled);
       
   591 		}
       
   592 	return err;
       
   593 	}
       
   594 	
       
   595 /*****************************************************************************/	
       
   596 	
       
   597 /*****************************************************************************/
       
   598 //
       
   599 // ImplementationTable
       
   600 //
       
   601 
       
   602 const TImplementationProxy ImplementationTable[] = 
       
   603 	{
       
   604 	IMPLEMENTATION_PROXY_ENTRY(KMmfUidCustomInterfaceEAacPlusDecoderMux, CMMFEAacPlusDecoderMux::NewL),
       
   605 	IMPLEMENTATION_PROXY_ENTRY(KMmfUidCustomInterfaceEAacPlusDecoderDeMux, CMMFEAacPlusDecoderDeMux::NewL),
       
   606 	};
       
   607 
       
   608 /*****************************************************************************/
       
   609 //
       
   610 // ImplementationGroupProxy
       
   611 //
       
   612 //
       
   613 
       
   614 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
       
   615 	{
       
   616 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
       
   617 
       
   618 	return ImplementationTable;
       
   619 	}
       
   620 
       
   621