multimediacommsengine/tsrc/MMCTestDriver/MCETester/src/TCmdGetVideoCodecInfo.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "MCEConstants.h"
       
    21 #include "TCmdGetVideoCodecInfo.h"
       
    22 #include "CTcMCEContext.h"
       
    23 #include <MCEvideoCodec.h>
       
    24 
       
    25 void TCmdGetVideoCodecInfo::ExecuteL()
       
    26 	{	
       
    27 	// ---------- Setup --------------------------------------------------------
       
    28 
       
    29 	// Get video codec 
       
    30 
       
    31 	CMceVideoCodec* codec = 
       
    32 		reinterpret_cast<CMceVideoCodec*>(GetObjectForIdL(KCodecId, ETrue));	
       
    33 
       
    34 	// ---------- Execution ----------------------------------------------------
       
    35 
       
    36 
       
    37 	// ---------- Response creation --------------------------------------------
       
    38  
       
    39  	AddIdResponseL( KCodecId, *codec );
       
    40  	
       
    41  	AddTextResponseL( KResponseCodecName, codec->SdpName() );
       
    42  	
       
    43  	AddIntegerResponseL( _L8("MaxBitRate"), codec->MaxBitRate() );
       
    44  	
       
    45  	AddIntegerResponseL( _L8("AllowedFrameRates"), codec->AllowedFrameRates() );
       
    46 
       
    47  	AddIntegerResponseL( _L8("FrameRate"), codec->FrameRate() );
       
    48  	
       
    49  	AddIntegerResponseL( _L8("FrameSize"), codec->FrameSize() );
       
    50  	
       
    51  	AddIntegerResponseL( KResponseCodecMode, codec->CodecMode() );
       
    52  	
       
    53   	AddIntegerResponseL( KResponsePayloadType, codec->PayloadType() );
       
    54 
       
    55 	}
       
    56 	
       
    57 TBool TCmdGetVideoCodecInfo::Match( const TTcIdentifier& aId )
       
    58 	{
       
    59 	return TTcMceCommandBase::Match( aId, _L8("GetVideoCodecInfo") );
       
    60 	}
       
    61 
       
    62 TTcCommandBase* TCmdGetVideoCodecInfo::CreateL( MTcTestContext& aContext )
       
    63 	{
       
    64 	return new( ELeave ) TCmdGetVideoCodecInfo( aContext );
       
    65 	}