mmmw_plat/telephony_multimedia_service_api/inc/tmsilbcformat.h
changeset 0 71ca22bcf22a
child 12 2eb3b066cc7d
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TMS_ILBC_FORMAT_H
       
    19 #define TMS_ILBC_FORMAT_H
       
    20 
       
    21 #include <tms.h>
       
    22 #include <tmsformat.h>
       
    23 
       
    24 namespace TMS {
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class TMSILBCFormatBody;
       
    28 
       
    29 /**
       
    30  * TMSILBCFormat class
       
    31  *
       
    32  * This class provides access methods to configure and query iLBC codec
       
    33  * format settings.
       
    34  *
       
    35  * This format class can be used for both the encoder and decoder.
       
    36  *
       
    37  * @lib tmsapi.lib
       
    38  *
       
    39  */
       
    40 class TMSILBCFormat : public TMSFormat
       
    41     {
       
    42 public:
       
    43     /**
       
    44      * Destructor
       
    45      */
       
    46     IMPORT_C virtual ~TMSILBCFormat();
       
    47 
       
    48     /**
       
    49      * Set iLBC codec mode.
       
    50      *
       
    51      * This method is allowable when encoding is not active; i.e. anytime
       
    52      * before encoding is started or after it is stopped.
       
    53      *
       
    54      * Supported iLBC codec modes are:
       
    55      *  TMS_ILBC_CODEC_MODE_20MILLI_SEC_FRAME
       
    56      *  TMS_ILBC_CODEC_MODE_30MILLI_SEC_FRAME
       
    57      *
       
    58      * @param  mode
       
    59      *      Sets selected iLBC encoding or decoding mode.
       
    60      *
       
    61      * @return
       
    62      *      TMS_RESULT_SUCCESS if the operation was successful.
       
    63      *      TMS_RESULT_INVALID_STATE if this method is used during active
       
    64      *      encoding or decoding operation.
       
    65      *      TMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
    66      *      by the adaptation.
       
    67      *      TMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
       
    68      *      not exist.
       
    69      *
       
    70      */
       
    71     IMPORT_C gint SetMode(const TMSILBCCodecMode mode);
       
    72 
       
    73     /**
       
    74      * Return current iLBC codec mode.
       
    75      *
       
    76      * This method is allowable at all times, while actively encoding/decoding
       
    77      * or not.
       
    78      *
       
    79      * Supported iLBC codec modes are:
       
    80      *  TMS_ILBC_CODEC_MODE_20MILLI_SEC_FRAME
       
    81      *  TMS_ILBC_CODEC_MODE_30MILLI_SEC_FRAME
       
    82      *
       
    83      * @param  mode
       
    84      *      Returns current iLBC encoding or decoding mode.
       
    85      *
       
    86      * @return
       
    87      *      TMS_RESULT_SUCCESS if the operation was successful.
       
    88      *
       
    89      */
       
    90     IMPORT_C gint GetMode(TMSILBCCodecMode& mode);
       
    91 
       
    92     /**
       
    93      * Toggles on and off Comfort Noise Generator (CNG) for iLBC decoder.
       
    94      * Not supported by the encoder.
       
    95      *
       
    96      * This method is allowable when decoding is not active; i.e. anytime
       
    97      * before decoding is started or after it is stopped.
       
    98      *
       
    99      * @param  cng
       
   100      *      Sets CNG feature on or off.
       
   101      *
       
   102      * @return
       
   103      *      TMS_RESULT_SUCCESS if the operation was successful.
       
   104      *      TMS_RESULT_INVALID_STATE if this method is used during active
       
   105      *      decoding operation.
       
   106      *      TMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
   107      *      by the adaptation.
       
   108      *      TMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
       
   109      *      not exist.
       
   110      *
       
   111      */
       
   112     IMPORT_C gint SetCNG(const gboolean cng);
       
   113 
       
   114     /**
       
   115      * Returns current CNG setting of the iLBC decoder.
       
   116      *
       
   117      * This method is allowable when decoding is not active; i.e. anytime
       
   118      * before decoding is started or after it is stopped.
       
   119      *
       
   120      * @param  cng
       
   121      *      Current CNG setting of the decoder.
       
   122      *
       
   123      * @return
       
   124      *      TMS_RESULT_SUCCESS if the operation was successful.
       
   125      *
       
   126      */
       
   127     IMPORT_C gint GetCNG(gboolean& cng);
       
   128 
       
   129     /**
       
   130      * Toggles on and off Voice Activation Detection (VAD) for iLBC encoder.
       
   131      * Not supported by the decoder.
       
   132      *
       
   133      * This method is allowable at all times, while actively encoding or not.
       
   134      *
       
   135      * @param  vad
       
   136      *      Sets VAD feature on or off.
       
   137      *
       
   138      * @return
       
   139      *      TMS_RESULT_SUCCESS if the operation was successful.
       
   140      *      TMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
   141      *      by the adaptation.
       
   142      *      TMS_RESULT_DOES_NOT_EXIST if the custom interface handle does
       
   143      *      not exist.
       
   144      *
       
   145      */
       
   146     IMPORT_C gint SetVADMode(const gboolean vad);
       
   147 
       
   148     /**
       
   149      * Returns current VAD setting of the iLBC encoder.
       
   150      *
       
   151      * This method is allowable at all times, while actively encoding or not.
       
   152      *
       
   153      * @param  vad
       
   154      *      Current VAD setting of the encoder.
       
   155      *
       
   156      * @return
       
   157      *      TMS_RESULT_SUCCESS if the operation was successful.
       
   158      *
       
   159      */
       
   160     IMPORT_C gint GetVADMode(gboolean& vad);
       
   161 
       
   162 protected:
       
   163     /**
       
   164      * Constructor
       
   165      */
       
   166     IMPORT_C TMSILBCFormat();
       
   167 
       
   168 protected:
       
   169     TMSILBCFormatBody *iBody;
       
   170     };
       
   171 
       
   172 } //namespace TMS
       
   173 
       
   174 #endif //TMS_ILBC_FORMAT_H