vtprotocolsstub/src/cvideoconfighandler.cpp
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Video configuration implementation
       
    15 *
       
    16 */
       
    17 
       
    18 #include "mvtprotocolhandler.h"
       
    19 #include "cvideoconfighandler.h"
       
    20 
       
    21 #ifdef _DEBUG
       
    22 #    define __IF_DEBUG(t) {RDebug::t;}
       
    23 #else
       
    24 #    define __IF_DEBUG(t)
       
    25 #endif
       
    26 
       
    27 // -----------------------------------------------------------------------------
       
    28 // TVideoConfigHandler::TVideoConfigHandler
       
    29 // Constructor.
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 TVideoConfigHandler::TVideoConfigHandler(MVtProtocolHandler* aProtocolHandler) : iProtocolHandler(aProtocolHandler)
       
    33     {
       
    34     __IF_DEBUG(Print(_L("VTProto: TVideoConfigHandler::TVideoConfigHandler<")));
       
    35     __IF_DEBUG(Print(_L("VTProto: TVideoConfigHandler::TVideoConfigHandler>")));	
       
    36     }
       
    37     
       
    38 // -----------------------------------------------------------------------------
       
    39 // CVideoConfigCommand::SetObserverL
       
    40 // This API allows the user to specify separate observers for the extension interface.
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 void CVideoConfigCommand::SetObserverL(MVtProtocolHandler* aHandler)
       
    44     {
       
    45     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetObserverL<")));	
       
    46     iVideoConfigHandler = new (ELeave)TVideoConfigHandler(aHandler);
       
    47     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetObserverL>")));
       
    48     }
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CVideoConfigCommand::SetIntraFrameInterval
       
    52 // Sets the I-Frame refresh rate of the encoded output.
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 TInt CVideoConfigCommand::SetIntraFrameInterval(TUint32 aIFrameInterval)
       
    56     {
       
    57     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetIntraFrameInterval")));
       
    58     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetIntraFrameInterval aIFrameInterval %d"), aIFrameInterval));			
       
    59     return KErrNone;
       
    60     }
       
    61 
       
    62 // -----------------------------------------------------------------------------
       
    63 // CVideoConfigCommand::RequestNextIntraFrame
       
    64 // Requests the encoder to encode the next frame as an I-Frame.
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 TInt CVideoConfigCommand::RequestNextIntraFrame()
       
    68     {
       
    69     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::RequestNextIntraFrame")));
       
    70     return KErrNone;
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CVideoConfigCommand::SetVideoFrameRate
       
    75 // Sets the frame rate of encoded output for the specified layer.
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 TInt CVideoConfigCommand::SetVideoFrameRate(TUint32 aFrameRate)
       
    79     {
       
    80     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetVideoFrameRate")));
       
    81     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::SetVideoFrameRate aFrameRate %d"), aFrameRate));		
       
    82     return KErrNone;
       
    83     }
       
    84     
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // CVideoConfigCommand::~CVideoConfigCommand
       
    88 // Destructor.
       
    89 // -----------------------------------------------------------------------------
       
    90 //
       
    91 CVideoConfigCommand::~CVideoConfigCommand()
       
    92     {
       
    93     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::~CVideoConfigCommand")));	
       
    94     delete iVideoConfigHandler;
       
    95     __IF_DEBUG(Print(_L("VTProto: CVideoConfigCommand::~CVideoConfigCommand")));
       
    96     }
       
    97 
       
    98 // end of file