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