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