multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp
branchRCL_3
changeset 46 4da1f672912e
parent 45 3f7c7e6eea8a
equal deleted inserted replaced
45:3f7c7e6eea8a 46:4da1f672912e
   298 // CMceComAMRWbCodec::DoMccValidateL
   298 // CMceComAMRWbCodec::DoMccValidateL
   299 // -----------------------------------------------------------------------------
   299 // -----------------------------------------------------------------------------
   300 //
   300 //
   301 CMceComCodec* CMceComAMRWbCodec::DoMccValidateL( CMccCodecInformation& aMccCodec,
   301 CMceComCodec* CMceComAMRWbCodec::DoMccValidateL( CMccCodecInformation& aMccCodec,
   302                                                CMceSrvStream& /*aStream*/,
   302                                                CMceSrvStream& /*aStream*/,
   303                                                TMceNegotiationRole aRole )
   303                                                TMceNegotiationRole /*aRole */)
   304     {
   304     {
   305     //if answerer mcc codec represents the received offer and codec the answer
       
   306     //if offerer codec represents the sent offer and mcc codec the answer
       
   307     
       
   308     // Bitrates field contains also additional information, mask it away
       
   309 	/*
       
   310     TUint mccBitrates = ( aMccCodec.AllowedBitrates() & KMceAllowedAmrWbBitrateAll );
       
   311     TUint mceBitrates = ( iAllowedBitrates & KMceAllowedAmrWbBitrateAll );
       
   312     
       
   313     TBool notValid = aRole == EMceRoleAnswerer ?
       
   314                   ( mceBitrates && mccBitrates == 0 ||
       
   315 	                mceBitrates > mccBitrates ) :
       
   316                   ( mceBitrates && mccBitrates == 0 ||
       
   317 	                mceBitrates < mccBitrates );
       
   318 	                
       
   319 	*/
       
   320 //	User::LeaveIfError( notValid ? KErrNotSupported : KErrNone );
       
   321 	if ( aMccCodec.CodecMode() != (TCodecMode)iCodecMode )
   305 	if ( aMccCodec.CodecMode() != (TCodecMode)iCodecMode )
   322 		{
   306 		{
   323 		// codec-mode was different, fail.
   307 		// codec-mode was different, fail.
   324 		User::Leave(KErrNotSupported);
   308 		User::Leave(KErrNotSupported);
   325 		}
   309 		}