mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsg711format.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_G711_FORMAT_H
       
    19 #define QTMS_G711_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  * QTMSG711Format class
       
    35  *
       
    36  * This class provides access methods to configure and query G.711 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 QTMSG711Format : public QObject,
       
    45                                                public QTMSFormat
       
    46     {
       
    47     Q_OBJECT
       
    48 public:
       
    49     /**
       
    50      * Destructor
       
    51      */
       
    52     virtual ~QTMSG711Format();
       
    53 
       
    54     /**
       
    55      * Set G.711 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 G.711 codec modes are:
       
    61      *  QTMS_G711_CODEC_MODE_ALAW
       
    62      *  QTMS_G711_CODEC_MODE_MULAW
       
    63      *
       
    64      * @param  mode
       
    65      *      Sets selected G.711 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      *
       
    74      */
       
    75     gint SetMode(const QTMSG711CodecMode mode);
       
    76 
       
    77     /**
       
    78      * Return current G.711 codec mode.
       
    79      *
       
    80      * This method is allowable at all times, while actively encoding/decoding
       
    81      * or not.
       
    82      *
       
    83      * Supported G.711 codec modes are:
       
    84      *  QTMS_G711_CODEC_MODE_ALAW
       
    85      *  QTMS_G711_CODEC_MODE_MULAW
       
    86      *
       
    87      * @param  mode
       
    88      *      Returns current G.711 encoding or decoding mode.
       
    89 
       
    90      * @return
       
    91      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    92      *
       
    93      */
       
    94     gint GetMode(QTMSG711CodecMode& mode);
       
    95 
       
    96     /**
       
    97      * Toggles on and off Comfort Noise Generator (CNG) for G.711 decoder.
       
    98      * Not supported by the encoder.
       
    99      *
       
   100      * This method is allowable when decoding is not active; i.e. anytime
       
   101      * before decoding is started or after it is stopped.
       
   102      *
       
   103      * @param  cng
       
   104      *      Sets CNG feature on or off.
       
   105      *
       
   106      * @return
       
   107      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   108      *      QTMS_RESULT_INVALID_STATE if this method is used during active
       
   109      *      decoding operation.
       
   110      *      QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
   111      *      by the adaptation.
       
   112      *
       
   113      */
       
   114     gint SetCNG(const gboolean cng);
       
   115 
       
   116     /**
       
   117      * Returns current CNG setting of the G.711 decoder.
       
   118      *
       
   119      * This method is allowable when decoding is not active; i.e. anytime
       
   120      * before decoding is started or after it is stopped.
       
   121      *
       
   122      * @param  cng
       
   123      *      Current CNG setting of the decoder.
       
   124      *
       
   125      * @return gint
       
   126      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   127      *
       
   128      */
       
   129     gint GetCNG(gboolean& cng);
       
   130 
       
   131     /**
       
   132      * Toggles on and off Packet Loss Concealment (PLC) for G.711 decoder.
       
   133      * Not supported by the encoder.
       
   134      *
       
   135      * This method is allowable when decoding is not active; i.e. anytime
       
   136      * before decoding is started or after it is stopped.
       
   137      *
       
   138      * @param  plc
       
   139      *      Sets PLC feature on or off.
       
   140      *
       
   141      * @return
       
   142      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   143      *      QTMS_RESULT_INVALID_STATE if this method is used during active
       
   144      *      decoding operation.
       
   145      *      QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
   146      *      by the adaptation.
       
   147      *
       
   148      */
       
   149     gint SetPlc(const gboolean plc);
       
   150 
       
   151     /**
       
   152      * Returns current PLC setting of the G.711 decoder.
       
   153      *
       
   154      * This method is allowable at all times, while actively decoding or not.
       
   155      *
       
   156      * @param  plc
       
   157      *      Current CNG setting of the decoder.
       
   158      *
       
   159      * @return
       
   160      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   161      *
       
   162      */
       
   163     gint GetPlc(gboolean& plc);
       
   164 
       
   165     /**
       
   166      * Toggles on and off Voice Activation Detection (VAD) for G.711 encoder.
       
   167      * Not supported by the decoder.
       
   168      *
       
   169      * This method is allowable at all times, while actively encoding or not.
       
   170      *
       
   171      * @param  vad
       
   172      *      Sets VAD feature on or off.
       
   173      *
       
   174      * @return
       
   175      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   176      *      QTMS_RESULT_FEATURE_NOT_SUPPORTED if this method is not implemented
       
   177      *      by the adaptation.
       
   178      *
       
   179      */
       
   180     gint SetVADMode(const gboolean vad);
       
   181 
       
   182     /**
       
   183      * Returns current VAD setting of the G.711 encoder.
       
   184      *
       
   185      * This method is allowable at all times, while actively encoding or not.
       
   186      *
       
   187      * @param  vad
       
   188      *      Current VAD setting of the encoder.
       
   189      *
       
   190      * @return
       
   191      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   192      *
       
   193      */
       
   194     gint GetVADMode(gboolean& vad);
       
   195 
       
   196 protected:
       
   197     /**
       
   198      * Constructor
       
   199      */
       
   200     QTMSG711Format();
       
   201     };
       
   202 
       
   203 } //namespace QTMS
       
   204 
       
   205 #endif //QTMS_G711_FORMAT_H