| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2004-2011 Broadcom Corporation |
|---|
| 3 | * |
|---|
| 4 | * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | * |
|---|
| 14 | * Except as expressly set forth in the Authorized License, |
|---|
| 15 | * |
|---|
| 16 | * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | * |
|---|
| 20 | * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | * |
|---|
| 29 | * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | * ANY LIMITED REMEDY. |
|---|
| 37 | * |
|---|
| 38 | * $brcm_Workfile: nexus_audio_decoder.h $ |
|---|
| 39 | * $brcm_Revision: 62 $ |
|---|
| 40 | * $brcm_Date: 12/20/11 4:13p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: AudioDecoder |
|---|
| 44 | * API for audio decoder management. |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /nexus/modules/audio/7400/include/nexus_audio_decoder.h $ |
|---|
| 49 | * |
|---|
| 50 | * 62 12/20/11 4:13p jgarrett |
|---|
| 51 | * SW7425-1018: Adding initial A/85 implementation |
|---|
| 52 | * |
|---|
| 53 | * 61 12/2/11 4:01p jgarrett |
|---|
| 54 | * SW7420-2074: Adding MPEG conformance mode to AAC settings |
|---|
| 55 | * |
|---|
| 56 | * 60 10/11/11 8:24a erickson |
|---|
| 57 | * SW7420-1992: move types to nexus_audio_decoder_types.h |
|---|
| 58 | * |
|---|
| 59 | * 59 9/20/11 5:09p jgarrett |
|---|
| 60 | * SW7425-1045: Mapping additional settings and status between nexus and |
|---|
| 61 | * the audio FW |
|---|
| 62 | * |
|---|
| 63 | * 58 6/21/11 5:03p jgarrett |
|---|
| 64 | * SW7425-654: Adding Audio NRT APIs |
|---|
| 65 | * |
|---|
| 66 | * 57 5/25/11 5:16p jgarrett |
|---|
| 67 | * SW7425-408: Adding BDBG_OBJECT to input/output types and MS11 features |
|---|
| 68 | * |
|---|
| 69 | * 56 4/22/11 10:43a erickson |
|---|
| 70 | * SW7420-1148: remove attr{shutdown=NEXUS_AudioInput_Shutdown} |
|---|
| 71 | * |
|---|
| 72 | * 55 2/15/11 2:22p erickson |
|---|
| 73 | * SW7420-1135: refactor into nexus_audio_decoder_types.h |
|---|
| 74 | * |
|---|
| 75 | * 54 1/21/11 5:21p jhaberf |
|---|
| 76 | * SW35230-2819: Added AC3/EAC3 bit stream ID to the audio decoder status |
|---|
| 77 | * |
|---|
| 78 | * 53 12/14/10 3:18p erickson |
|---|
| 79 | * SW7420-1285: add null_allowed attribute |
|---|
| 80 | * |
|---|
| 81 | * 52 11/18/10 11:06a jhaberf |
|---|
| 82 | * SW35230-91: Added ADPCM audio decoder support |
|---|
| 83 | * |
|---|
| 84 | * 51 11/3/10 6:20p jgarrett |
|---|
| 85 | * SW7125-700: Adding new codec status |
|---|
| 86 | * |
|---|
| 87 | * 50 9/7/10 6:20p jgarrett |
|---|
| 88 | * SW7125-623: Adding programmable TSM GA and Discard thresholds. |
|---|
| 89 | * |
|---|
| 90 | * 49 9/1/10 5:39p jgarrett |
|---|
| 91 | * SW7405-4796: Adding streamStatusAvailable callback |
|---|
| 92 | * |
|---|
| 93 | * 48 8/18/10 10:06a jgarrett |
|---|
| 94 | * SW7420-790: Merging MS11 updates to main branch |
|---|
| 95 | * |
|---|
| 96 | * SW7420-790/2 8/16/10 5:07p jgarrett |
|---|
| 97 | * SW7420-790: Merge to latest baseline |
|---|
| 98 | * |
|---|
| 99 | * 47 8/5/10 2:39p erickson |
|---|
| 100 | * SWDEPRECATED-2425: update multichannel comments |
|---|
| 101 | * |
|---|
| 102 | * 46 7/28/10 11:20a jgarrett |
|---|
| 103 | * SW7405-4212: Adding MS10 substream ID for ac3/ac3+ |
|---|
| 104 | * |
|---|
| 105 | * SW7420-790/1 6/22/10 6:28p jgarrett |
|---|
| 106 | * SW7420-790: Adding new MS10/MS11 AC3/AC3Plus configuration data |
|---|
| 107 | * |
|---|
| 108 | * 45 6/10/10 6:54p jgarrett |
|---|
| 109 | * SW7405-4212: Adding fields required for MS10 certification |
|---|
| 110 | * |
|---|
| 111 | * 44 5/3/10 5:22p jgarrett |
|---|
| 112 | * SW7405-4212: Removing DolbyPulse as an explicit codec type |
|---|
| 113 | * |
|---|
| 114 | * SW7405-4212/2 4/28/10 2:52p jgarrett |
|---|
| 115 | * SW7405-4212: Adding support for DSP mixing |
|---|
| 116 | * |
|---|
| 117 | * SW7405-4212/1 4/26/10 5:23p jgarrett |
|---|
| 118 | * SW7405-4212: Adding MS10 changes for pulse/transcode |
|---|
| 119 | * |
|---|
| 120 | * 43 4/12/10 1:12p jgarrett |
|---|
| 121 | * SW7405-3972: Adding new versioning scheme for DTS and other algorithms |
|---|
| 122 | * |
|---|
| 123 | * 42 3/18/10 10:55a jgarrett |
|---|
| 124 | * SW7405-4030: Adding Dolby Pulse Support |
|---|
| 125 | * |
|---|
| 126 | * 41 2/8/10 3:17p jgarrett |
|---|
| 127 | * SW3556-1017: Merge to main branch |
|---|
| 128 | * |
|---|
| 129 | * SW3556-1017/2 2/2/10 2:02p jgarrett |
|---|
| 130 | * SW3556-983: Adding dialog normalization control for AC3/AC3+ |
|---|
| 131 | * |
|---|
| 132 | * SW3556-1017/1 2/2/10 1:41p jgarrett |
|---|
| 133 | * SW3556-1017: Adding descriptor ramp setting |
|---|
| 134 | * |
|---|
| 135 | * 40 12/31/09 11:13a jgarrett |
|---|
| 136 | * SW7405-3158: Renaming DTS config variables |
|---|
| 137 | * |
|---|
| 138 | * 39 12/2/09 4:43p vsilyaev |
|---|
| 139 | * SW7405-3158: Added DTS codec specific configuration |
|---|
| 140 | * |
|---|
| 141 | * 38 12/1/09 6:08p vsilyaev |
|---|
| 142 | * SW7405-3515: Added left/right AAC downmix |
|---|
| 143 | * |
|---|
| 144 | * 37 11/25/09 2:19p vsilyaev |
|---|
| 145 | * SW7405-2740: Added WMA Pro codec configuration |
|---|
| 146 | * |
|---|
| 147 | * 36 11/24/09 2:24p vsilyaev |
|---|
| 148 | * SW7405-3419: Added flag to control decoding of 96KHz audio streams |
|---|
| 149 | * |
|---|
| 150 | * 35 11/2/09 11:16a erickson |
|---|
| 151 | * SW7405-3315: remove playbackOverride. use NEXUS_StcChannelMode instead. |
|---|
| 152 | * |
|---|
| 153 | * 34 10/15/09 11:52a jgarrett |
|---|
| 154 | * SW7405-2352: Adding CDB overflow and underflow status values |
|---|
| 155 | * |
|---|
| 156 | * 33 10/15/09 11:39a jgarrett |
|---|
| 157 | * SW7405-2352: Adding CDB overflow and underflow callbacks |
|---|
| 158 | * |
|---|
| 159 | * 32 9/11/09 3:14p jgarrett |
|---|
| 160 | * SW7405-3006: Adding ptsError callback and additional status |
|---|
| 161 | * |
|---|
| 162 | * 31 6/30/09 10:50a jgarrett |
|---|
| 163 | * PR 52051: Adding dialog normalization for AC3/AC3+ |
|---|
| 164 | * |
|---|
| 165 | * 30 6/3/09 10:39a erickson |
|---|
| 166 | * PR55648: change type and clarify meaning of |
|---|
| 167 | * NEXUS_AudioDecoderStatus.timebase |
|---|
| 168 | * |
|---|
| 169 | * PR52051/1 6/23/09 6:44p mward |
|---|
| 170 | * PR 52051: Add dialog normalization enable setting. |
|---|
| 171 | * |
|---|
| 172 | * 29 5/14/09 3:54p jgarrett |
|---|
| 173 | * PR 54786: Adding lock status |
|---|
| 174 | * |
|---|
| 175 | * 28 4/6/09 5:25p jgarrett |
|---|
| 176 | * PR 53393: Adding memory configuration options |
|---|
| 177 | * |
|---|
| 178 | * 26 4/3/09 6:48p jgarrett |
|---|
| 179 | * PR 52821: Switching GFX enums to new values |
|---|
| 180 | * |
|---|
| 181 | * 25 3/3/09 12:23p jgarrett |
|---|
| 182 | * PR 52687: Adding AAC downmix and codec settings and wideGaThreshold |
|---|
| 183 | * options |
|---|
| 184 | * |
|---|
| 185 | * 24 2/9/09 5:56p jgarrett |
|---|
| 186 | * PR 51309: Changing the AAC Acmod dual mono name |
|---|
| 187 | * |
|---|
| 188 | * 23 2/9/09 5:49p jgarrett |
|---|
| 189 | * PR 51309: Changing AAC Acmod to include dual mono value |
|---|
| 190 | * |
|---|
| 191 | * 22 1/29/09 4:24p jgarrett |
|---|
| 192 | * PR 51692: Adding ptsStcDifference |
|---|
| 193 | * |
|---|
| 194 | * 21 12/11/08 4:16p jgarrett |
|---|
| 195 | * PR 49886: Adding word length and max word length for SPDIF/HDMI sources |
|---|
| 196 | * |
|---|
| 197 | * 20 12/4/08 10:42a jgarrett |
|---|
| 198 | * PR 49975: Adding NEXUS_AudioDecoderStatus.tsm |
|---|
| 199 | * |
|---|
| 200 | * 19 9/26/08 6:47p jgarrett |
|---|
| 201 | * PR 47226: Converting LFE enable to auto/manual option |
|---|
| 202 | * |
|---|
| 203 | * 18 9/22/08 6:12p jgarrett |
|---|
| 204 | * PR 47189: Adding independent delay flag |
|---|
| 205 | * |
|---|
| 206 | * 17 9/11/08 6:02p jgarrett |
|---|
| 207 | * PR 46557: Revamping codec-specifics |
|---|
| 208 | * |
|---|
| 209 | * 16 8/22/08 4:49p jgarrett |
|---|
| 210 | * PR 44766: PR 44767: Reworking downmix and dual-mono logic |
|---|
| 211 | * |
|---|
| 212 | * 15 7/23/08 3:01p jgarrett |
|---|
| 213 | * PR 39452: Merging to main branch |
|---|
| 214 | * |
|---|
| 215 | * 14 7/21/08 1:59p erickson |
|---|
| 216 | * PR40222: change ptsOffset to signed int |
|---|
| 217 | * |
|---|
| 218 | * 13 7/17/08 5:24p jgarrett |
|---|
| 219 | * PR 42642: Adding fifoThreshold |
|---|
| 220 | * |
|---|
| 221 | * 12 7/17/08 3:29p jgarrett |
|---|
| 222 | * PR 44509: Adding AudioDecoderOpenSettings for fifoSize |
|---|
| 223 | * |
|---|
| 224 | * 11 7/14/08 12:14p erickson |
|---|
| 225 | * PR42739: added playbackOverride option for IPTV |
|---|
| 226 | * |
|---|
| 227 | * 10 6/19/08 3:16p jgarrett |
|---|
| 228 | * PR 42243: Moving input volume control to specific inputs and out of |
|---|
| 229 | * mixer |
|---|
| 230 | * |
|---|
| 231 | * Nexus_Audio_Descriptors/1 5/15/08 5:35p jgarrett |
|---|
| 232 | * PR 42360: Adding AudioDescriptor interface |
|---|
| 233 | * |
|---|
| 234 | * 9 5/13/08 7:16p jgarrett |
|---|
| 235 | * PR 42221: Adding frame queue |
|---|
| 236 | * |
|---|
| 237 | * 8 4/22/08 3:47p jgarrett |
|---|
| 238 | * PR 40118: Removing duplicate stereo mode setting |
|---|
| 239 | * |
|---|
| 240 | * 7 3/11/08 2:12p erickson |
|---|
| 241 | * PR40222: add ptsOffset |
|---|
| 242 | * |
|---|
| 243 | * 6 2/7/08 12:11p vsilyaev |
|---|
| 244 | * PR 38692: Added attributes for shutdown functions |
|---|
| 245 | * |
|---|
| 246 | * 5 2/6/08 4:28p vsilyaev |
|---|
| 247 | * PR 38682: Added attributes for the linux kernel/user proxy mode |
|---|
| 248 | * |
|---|
| 249 | * 4 1/23/08 8:37p vobadm |
|---|
| 250 | * PR35457: update docs |
|---|
| 251 | * |
|---|
| 252 | * 3 1/23/08 5:16p erickson |
|---|
| 253 | * PR35457: update docs |
|---|
| 254 | * |
|---|
| 255 | * 2 1/23/08 2:39p erickson |
|---|
| 256 | * PR35457: update docs |
|---|
| 257 | * |
|---|
| 258 | * 1 1/18/08 2:15p jgarrett |
|---|
| 259 | * PR 38808: Merging to main branch |
|---|
| 260 | * |
|---|
| 261 | * Nexus_Devel/16 1/9/08 5:56p jgarrett |
|---|
| 262 | * PR 38535: Adding additional dolby settings and status values |
|---|
| 263 | * |
|---|
| 264 | * Nexus_Devel/15 11/30/07 1:18p erickson |
|---|
| 265 | * PR34925: rename to nexus_stc_channel.h |
|---|
| 266 | * |
|---|
| 267 | * Nexus_Devel/14 11/29/07 2:32p erickson |
|---|
| 268 | * PR35457: doc update |
|---|
| 269 | * |
|---|
| 270 | * Nexus_Devel/13 11/29/07 10:32a jgarrett |
|---|
| 271 | * PR 37471: Adding non-transport sources |
|---|
| 272 | * |
|---|
| 273 | * Nexus_Devel/12 11/19/07 1:20p erickson |
|---|
| 274 | * PR34925: split demux.h into separate interface files |
|---|
| 275 | * |
|---|
| 276 | * Nexus_Devel/11 11/6/07 4:22p jgarrett |
|---|
| 277 | * PR 34954: Migrating to audio connector model |
|---|
| 278 | * |
|---|
| 279 | * Nexus_Devel/10 10/24/07 3:00p vsilyaev |
|---|
| 280 | * PR 36404: Trick mode extension |
|---|
| 281 | * |
|---|
| 282 | * Nexus_Devel/9 10/9/07 3:49p erickson |
|---|
| 283 | * PR35824: change Params to StartSettings |
|---|
| 284 | * |
|---|
| 285 | * Nexus_Devel/8 10/4/07 2:25p erickson |
|---|
| 286 | * PR34594: removed audio descriptors |
|---|
| 287 | * |
|---|
| 288 | * Nexus_Devel/7 10/4/07 12:33p erickson |
|---|
| 289 | * PR34594: change to NEXUS_AudioDecoder_GetDefaultSettings |
|---|
| 290 | * |
|---|
| 291 | * Nexus_Devel/6 9/27/07 7:51p jgarrett |
|---|
| 292 | * PR 34594: Moving downmix type to audio_types.h |
|---|
| 293 | * |
|---|
| 294 | * Nexus_Devel/5 9/17/07 1:32p jgarrett |
|---|
| 295 | * PR 34954: Implementing naming convention changes |
|---|
| 296 | * |
|---|
| 297 | * Nexus_Devel/4 9/11/07 10:03a erickson |
|---|
| 298 | * PR34254: update |
|---|
| 299 | * |
|---|
| 300 | * Nexus_Devel/4 9/11/07 10:01a erickson |
|---|
| 301 | * PR34254: update |
|---|
| 302 | * |
|---|
| 303 | * Nexus_Devel/3 9/10/07 11:30a jgarrett |
|---|
| 304 | * PR 34254: Changing to NEXUS_Error |
|---|
| 305 | * |
|---|
| 306 | * Nexus_Devel/2 9/6/07 2:57p jgarrett |
|---|
| 307 | * PR 34254: Fixing Timebase and StcChannel |
|---|
| 308 | * |
|---|
| 309 | * Nexus_Devel/4 8/28/07 1:30p erickson |
|---|
| 310 | * PR34254: added stcChannel, rework api |
|---|
| 311 | * |
|---|
| 312 | * Nexus_Devel/3 8/24/07 11:57a jgarrett |
|---|
| 313 | * PR 34254: Implementing Source -> Input name changes |
|---|
| 314 | * |
|---|
| 315 | ***************************************************************************/ |
|---|
| 316 | #ifndef NEXUS_AUDIO_DECODER_H__ |
|---|
| 317 | #define NEXUS_AUDIO_DECODER_H__ |
|---|
| 318 | |
|---|
| 319 | #include "nexus_types.h" |
|---|
| 320 | #include "nexus_audio_types.h" |
|---|
| 321 | #include "nexus_audio_decoder_types.h" |
|---|
| 322 | |
|---|
| 323 | #ifdef __cplusplus |
|---|
| 324 | extern "C" { |
|---|
| 325 | #endif |
|---|
| 326 | |
|---|
| 327 | /*=************************************ |
|---|
| 328 | Interface: AudioDecoder |
|---|
| 329 | |
|---|
| 330 | Header file: nexus_audio_decoder.h |
|---|
| 331 | |
|---|
| 332 | Module: Audio |
|---|
| 333 | |
|---|
| 334 | Description: Decode compressed audio from a NEXUS_PidChannel |
|---|
| 335 | |
|---|
| 336 | **************************************/ |
|---|
| 337 | |
|---|
| 338 | /** |
|---|
| 339 | Summary: |
|---|
| 340 | Handle for audio decoder |
|---|
| 341 | **/ |
|---|
| 342 | typedef struct NEXUS_AudioDecoder *NEXUS_AudioDecoderHandle; |
|---|
| 343 | |
|---|
| 344 | /*************************************************************************** |
|---|
| 345 | Summary: |
|---|
| 346 | Dual Mono Mode |
|---|
| 347 | Description: |
|---|
| 348 | Selects the output mode for a dual-mono stream. These settings have no effect for other streams. |
|---|
| 349 | ***************************************************************************/ |
|---|
| 350 | typedef enum NEXUS_AudioDecoderDualMonoMode |
|---|
| 351 | { |
|---|
| 352 | NEXUS_AudioDecoderDualMonoMode_eStereo, |
|---|
| 353 | NEXUS_AudioDecoderDualMonoMode_eLeft, |
|---|
| 354 | NEXUS_AudioDecoderDualMonoMode_eRight, |
|---|
| 355 | NEXUS_AudioDecoderDualMonoMode_eMix, |
|---|
| 356 | NEXUS_AudioDecoderDualMonoMode_eMax |
|---|
| 357 | } NEXUS_AudioDecoderDualMonoMode; |
|---|
| 358 | |
|---|
| 359 | /*************************************************************************** |
|---|
| 360 | Summary: |
|---|
| 361 | Audio Output Mode |
|---|
| 362 | Description: |
|---|
| 363 | Selects the output mode from the audio decoder. |
|---|
| 364 | ***************************************************************************/ |
|---|
| 365 | typedef enum NEXUS_AudioDecoderOutputMode |
|---|
| 366 | { |
|---|
| 367 | NEXUS_AudioDecoderOutputMode_eAuto, /* Automatic, based on stereo/multichannel output configuration */ |
|---|
| 368 | NEXUS_AudioDecoderOutputMode_e1_0, |
|---|
| 369 | NEXUS_AudioDecoderOutputMode_e1_1, |
|---|
| 370 | NEXUS_AudioDecoderOutputMode_e2_0, |
|---|
| 371 | NEXUS_AudioDecoderOutputMode_e3_0, |
|---|
| 372 | NEXUS_AudioDecoderOutputMode_e2_1, |
|---|
| 373 | NEXUS_AudioDecoderOutputMode_e3_1, |
|---|
| 374 | NEXUS_AudioDecoderOutputMode_e2_2, |
|---|
| 375 | NEXUS_AudioDecoderOutputMode_e3_2, |
|---|
| 376 | NEXUS_AudioDecoderOutputMode_e3_4, |
|---|
| 377 | NEXUS_AudioDecoderOutputMode_eMax |
|---|
| 378 | } NEXUS_AudioDecoderOutputMode; |
|---|
| 379 | |
|---|
| 380 | /*************************************************************************** |
|---|
| 381 | Summary: |
|---|
| 382 | Audio LFE Output Mode |
|---|
| 383 | Description: |
|---|
| 384 | Selects the LFE output mode from the audio decoder. |
|---|
| 385 | ***************************************************************************/ |
|---|
| 386 | typedef enum NEXUS_AudioDecoderOutputLfeMode |
|---|
| 387 | { |
|---|
| 388 | NEXUS_AudioDecoderOutputLfeMode_eAuto, /* Automatic, based on stereo/multichannel output configuration */ |
|---|
| 389 | NEXUS_AudioDecoderOutputLfeMode_eOff, |
|---|
| 390 | NEXUS_AudioDecoderOutputLfeMode_eOn, |
|---|
| 391 | NEXUS_AudioDecoderOutputLfeMode_eMax |
|---|
| 392 | } NEXUS_AudioDecoderOutputLfeMode; |
|---|
| 393 | |
|---|
| 394 | /*************************************************************************** |
|---|
| 395 | Summary: |
|---|
| 396 | Audio decoder settings |
|---|
| 397 | ***************************************************************************/ |
|---|
| 398 | typedef struct NEXUS_AudioDecoderSettings |
|---|
| 399 | { |
|---|
| 400 | NEXUS_AudioDecoderDualMonoMode dualMonoMode; /* Dual-Mono output mode. Only applies if the input stream is dual-mono. */ |
|---|
| 401 | |
|---|
| 402 | NEXUS_AudioDecoderOutputMode outputMode; /* Decoder output mode. In general, eAuto is correct, but this may be overridden |
|---|
| 403 | for testing and/or certification purposes. */ |
|---|
| 404 | NEXUS_AudioDecoderOutputLfeMode outputLfeMode; /* LFE output flag. In general, eAuto is correct, but this may be overridden |
|---|
| 405 | for testing and/or certification purposes. */ |
|---|
| 406 | |
|---|
| 407 | unsigned fifoThreshold; /* If set, this can limit the maximum FIFO depth to a value <= the value specified |
|---|
| 408 | in NEXUS_AudioDecoderOpenSettings.fifoSize. If 0, the entire FIFO can fill. */ |
|---|
| 409 | |
|---|
| 410 | int ptsOffset; /* Add an offset used in the decoder's TSM equation. Measured in PTS units (45KHz for MPEG2TS, 27MHz for DSS). |
|---|
| 411 | This is added to any PTS offset also set by SyncChannel. */ |
|---|
| 412 | |
|---|
| 413 | unsigned discardThreshold; /* If non-zero, specifies the TSM discard threshold in ms. If zero (default), values will be selected based upon |
|---|
| 414 | live vs. playback mode of operation. If PTS-STC is greater than this threshold, the frame will be dropped. */ |
|---|
| 415 | unsigned gaThreshold; /* If non-zero, specifies the TSM Gross Adjustment threshold in ms. If zero (default), values will be selected based upon |
|---|
| 416 | live vs. playback mode of operation and codec/container formats. If PTS-STC is greater than this threshold but less than |
|---|
| 417 | the discardThreshold, partial frame fills will be used to achieve lipsync better than a frame boundary. */ |
|---|
| 418 | bool wideGaThreshold; /* If true, set the GA threshold wider, in order to tolerate up to +/- 1 AAU of PTS error. Default = false. |
|---|
| 419 | Only used if gaThreshold = 0. */ |
|---|
| 420 | |
|---|
| 421 | bool loudnessEquivalenceEnabled; /* If true, loudness equivalence will be enabled based on the mode specified |
|---|
| 422 | in NEXUS_AudioModuleSettings.loudnessMode. Ignored if NEXUS_AudioModuleSettings.loudnessMode |
|---|
| 423 | is set to NEXUS_AudioLoudnessEquivalenceMode_eNone. Default is true. */ |
|---|
| 424 | |
|---|
| 425 | NEXUS_CallbackDesc sourceChanged; /* This callback fires whenever specifics such as sample rate, layer, or bitrate change. |
|---|
| 426 | It also fires when decoding HDMI/SPDIF input if the input codec changes. */ |
|---|
| 427 | NEXUS_CallbackDesc lockChanged; /* This callback fires whenever NEXUS_AudioDecoderStatus.locked changes */ |
|---|
| 428 | NEXUS_CallbackDesc ptsError; /* Fires on any PTS discontinuity. This callback is used for application notification. No response is required for TSM. */ |
|---|
| 429 | NEXUS_CallbackDesc firstPts; /* Fires when the decoder receives the first PTS after Start. |
|---|
| 430 | This event is also called "request STC" because the decoder needs StcChannel to set the STC in Auto mode. |
|---|
| 431 | This callback is used for application notification. No response is required for TSM. */ |
|---|
| 432 | NEXUS_CallbackDesc fifoOverflow; /* This callback fires when the input FIFO overflows */ |
|---|
| 433 | NEXUS_CallbackDesc fifoUnderflow; /* This callback fires when the input FIFO underflows */ |
|---|
| 434 | NEXUS_CallbackDesc streamStatusAvailable; /* This callback fires when the decoder first acquires the detailed codec status information such as channel coding, etc. */ |
|---|
| 435 | |
|---|
| 436 | int32_t volumeMatrix[NEXUS_AudioChannel_eMax][NEXUS_AudioChannel_eMax]; /* Volume matrix. This allows customization of channel volume |
|---|
| 437 | output. Default is [Left][Left] = Normal, [Right][Right] = Normal, |
|---|
| 438 | [Center][Center] = Normal, etc. All other volumes are zero by default. |
|---|
| 439 | This will affect stereo and multichannel PCM outputs only, not compressed. */ |
|---|
| 440 | bool muted; /* This will affect stereo and multichannel PCM outputs only, not compressed. */ |
|---|
| 441 | |
|---|
| 442 | NEXUS_AudioDecoderHandle descriptionDecoder; /* Optional. If specified, the channel handle provided will be used to decode audio descriptor |
|---|
| 443 | data (as described in DTG D-Book section 4.5). Outputs attached to the current channel will |
|---|
| 444 | receive only the primary channel audio. To mix the description program with the primary |
|---|
| 445 | program, both decoders should be connected to an AudioMixer object. Outputs connected to the |
|---|
| 446 | mixer will receive audio containing the mixed result with the appropriate panning and fading |
|---|
| 447 | applied to the streams. The descriptionDecoder must be started, stopped, and have trickmodes |
|---|
| 448 | controlled by the application in addition to the current channel. This value can not be |
|---|
| 449 | changed while either decoder is running. */ |
|---|
| 450 | unsigned descriptionRampTime; /* Audio descriptor volume ramp time in ms. Default is 1000ms. The value for the decoder handling the |
|---|
| 451 | description will be used. */ |
|---|
| 452 | } NEXUS_AudioDecoderSettings; |
|---|
| 453 | |
|---|
| 454 | /*************************************************************************** |
|---|
| 455 | Summary: |
|---|
| 456 | Audio decoder type |
|---|
| 457 | ***************************************************************************/ |
|---|
| 458 | typedef enum NEXUS_AudioDecoderType |
|---|
| 459 | { |
|---|
| 460 | NEXUS_AudioDecoderType_eDecode, |
|---|
| 461 | NEXUS_AudioDecoderType_eAudioDescriptor, |
|---|
| 462 | NEXUS_AudioDecoderType_ePassthrough, |
|---|
| 463 | NEXUS_AudioDecoderType_eMax |
|---|
| 464 | } NEXUS_AudioDecoderType; |
|---|
| 465 | |
|---|
| 466 | /*************************************************************************** |
|---|
| 467 | Summary: |
|---|
| 468 | Audio decoder open settings |
|---|
| 469 | ***************************************************************************/ |
|---|
| 470 | typedef struct NEXUS_AudioDecoderOpenSettings |
|---|
| 471 | { |
|---|
| 472 | NEXUS_AudioDecoderType type; |
|---|
| 473 | |
|---|
| 474 | unsigned fifoSize; /* Audio FIFO size in bytes */ |
|---|
| 475 | |
|---|
| 476 | bool independentDelay; /* Set to true to enable independent output delay */ |
|---|
| 477 | |
|---|
| 478 | NEXUS_AudioMultichannelFormat multichannelFormat; /* |
|---|
| 479 | Allocate resources at Open-time so that NEXUS_AudioOutput_AddInput with NEXUS_AudioDecoderConnectorType_eMultichannel can do multichannel output. |
|---|
| 480 | If you set multichannelFormat = NEXUS_AudioMultichannelFormat_eNone, then NEXUS_AudioDecoderConnectorType_eMultichannel will simply result in stereo. |
|---|
| 481 | If you set multichannelFormat to something other than eNone, then NEXUS_AudioDecoderConnectorType_eMultichannel will result in the specified multichannel format. |
|---|
| 482 | This setting has no effect on connector types other than NEXUS_AudioDecoderConnectorType_eMultichannel. |
|---|
| 483 | Default is NEXUS_AudioMultichannelFormat_eNone to save resources. */ |
|---|
| 484 | } NEXUS_AudioDecoderOpenSettings; |
|---|
| 485 | |
|---|
| 486 | /*************************************************************************** |
|---|
| 487 | Summary: |
|---|
| 488 | Get default open settings for an audio decoder |
|---|
| 489 | ***************************************************************************/ |
|---|
| 490 | void NEXUS_AudioDecoder_GetDefaultOpenSettings( |
|---|
| 491 | NEXUS_AudioDecoderOpenSettings *pSettings /* [out] default settings */ |
|---|
| 492 | ); |
|---|
| 493 | |
|---|
| 494 | /*************************************************************************** |
|---|
| 495 | Summary: |
|---|
| 496 | Open an audio decoder of the specified type |
|---|
| 497 | ***************************************************************************/ |
|---|
| 498 | NEXUS_AudioDecoderHandle NEXUS_AudioDecoder_Open( /* attr{destructor=NEXUS_AudioDecoder_Close} */ |
|---|
| 499 | unsigned index, |
|---|
| 500 | const NEXUS_AudioDecoderOpenSettings *pSettings /* attr{null_allowed=y} */ |
|---|
| 501 | ); |
|---|
| 502 | |
|---|
| 503 | /*************************************************************************** |
|---|
| 504 | Summary: |
|---|
| 505 | Close an audio decoder of the specified type |
|---|
| 506 | ***************************************************************************/ |
|---|
| 507 | void NEXUS_AudioDecoder_Close( |
|---|
| 508 | NEXUS_AudioDecoderHandle handle |
|---|
| 509 | ); |
|---|
| 510 | |
|---|
| 511 | /*************************************************************************** |
|---|
| 512 | Summary: |
|---|
| 513 | Get Settings for an audio decoder |
|---|
| 514 | ***************************************************************************/ |
|---|
| 515 | void NEXUS_AudioDecoder_GetSettings( |
|---|
| 516 | NEXUS_AudioDecoderHandle handle, |
|---|
| 517 | NEXUS_AudioDecoderSettings *pSettings /* [out] Settings */ |
|---|
| 518 | ); |
|---|
| 519 | |
|---|
| 520 | /*************************************************************************** |
|---|
| 521 | Summary: |
|---|
| 522 | Set Settings for an audio decoder |
|---|
| 523 | ***************************************************************************/ |
|---|
| 524 | NEXUS_Error NEXUS_AudioDecoder_SetSettings( |
|---|
| 525 | NEXUS_AudioDecoderHandle handle, |
|---|
| 526 | const NEXUS_AudioDecoderSettings *pSettings /* Settings */ |
|---|
| 527 | ); |
|---|
| 528 | |
|---|
| 529 | /*************************************************************************** |
|---|
| 530 | Summary: |
|---|
| 531 | Initialize an audio decoder program structure |
|---|
| 532 | ***************************************************************************/ |
|---|
| 533 | void NEXUS_AudioDecoder_GetDefaultStartSettings( |
|---|
| 534 | NEXUS_AudioDecoderStartSettings *pSettings /* [out] Program Defaults */ |
|---|
| 535 | ); |
|---|
| 536 | |
|---|
| 537 | /*************************************************************************** |
|---|
| 538 | Summary: |
|---|
| 539 | Start deocding the specified program |
|---|
| 540 | ***************************************************************************/ |
|---|
| 541 | NEXUS_Error NEXUS_AudioDecoder_Start( |
|---|
| 542 | NEXUS_AudioDecoderHandle handle, |
|---|
| 543 | const NEXUS_AudioDecoderStartSettings *pSettings /* What to start decoding */ |
|---|
| 544 | ); |
|---|
| 545 | |
|---|
| 546 | /*************************************************************************** |
|---|
| 547 | Summary: |
|---|
| 548 | Stop deocding the current program |
|---|
| 549 | ***************************************************************************/ |
|---|
| 550 | void NEXUS_AudioDecoder_Stop( |
|---|
| 551 | NEXUS_AudioDecoderHandle handle |
|---|
| 552 | ); |
|---|
| 553 | |
|---|
| 554 | /*************************************************************************** |
|---|
| 555 | Summary: |
|---|
| 556 | Discards all data accumulated in the decoder buffer |
|---|
| 557 | ***************************************************************************/ |
|---|
| 558 | NEXUS_Error NEXUS_AudioDecoder_Flush( |
|---|
| 559 | NEXUS_AudioDecoderHandle handle |
|---|
| 560 | ); |
|---|
| 561 | |
|---|
| 562 | /*************************************************************************** |
|---|
| 563 | Summary: |
|---|
| 564 | Dynamic Range Compression Mode |
|---|
| 565 | |
|---|
| 566 | Description: |
|---|
| 567 | This corresponds to the eCompMode field of BRAP_DSPCHN_Ac3*ConfigParams. The |
|---|
| 568 | original is an enum with four possibilities: Custom A, Custom D, Rf, and Line. |
|---|
| 569 | All four values can cause changes in the output volume level. The most |
|---|
| 570 | noticeable change is the difference between Line and Rf. With the compression |
|---|
| 571 | mode set to Rf, input PCM samples are scaled up by 12 dB. In Line mode, input |
|---|
| 572 | PCM samples are not scaled up at all. The two most commonly used modes are line |
|---|
| 573 | and Rf, in that order. |
|---|
| 574 | ***************************************************************************/ |
|---|
| 575 | typedef enum NEXUS_AudioDecoderDolbyDrcMode |
|---|
| 576 | { |
|---|
| 577 | NEXUS_AudioDecoderDolbyDrcMode_eLine, |
|---|
| 578 | NEXUS_AudioDecoderDolbyDrcMode_eRf, |
|---|
| 579 | NEXUS_AudioDecoderDolbyDrcMode_eCustomA, |
|---|
| 580 | NEXUS_AudioDecoderDolbyDrcMode_eCustomD, |
|---|
| 581 | NEXUS_AudioDecoderDolbyDrcMode_eOff, |
|---|
| 582 | NEXUS_AudioDecoderDolbyDrcMode_eMax |
|---|
| 583 | } NEXUS_AudioDecoderDolbyDrcMode; |
|---|
| 584 | |
|---|
| 585 | /*************************************************************************** |
|---|
| 586 | Summary: |
|---|
| 587 | Stereo Downmix Mode |
|---|
| 588 | |
|---|
| 589 | Description: |
|---|
| 590 | This enum represents the formulas available for doing stereo downmixing. It |
|---|
| 591 | only applies when the downmix mode is stereo. The enum corresponds to the |
|---|
| 592 | eStereoMode field of BRAP_DSPCHN_Ac3*ConfigParams. It is an enum with three |
|---|
| 593 | possibilities: Automatic, LtRt, and LoRo. LoRo is the standard stereo downmix |
|---|
| 594 | formula. LtRt is a Dolby Surround compatible stereo downmix formula. Automatic |
|---|
| 595 | means that which stereo downmix formula chosen is determined by parameters |
|---|
| 596 | in the stream (as specified by Annex D of the AC-3 specification). |
|---|
| 597 | ***************************************************************************/ |
|---|
| 598 | typedef enum NEXUS_AudioDecoderDolbyStereoDownmixMode |
|---|
| 599 | { |
|---|
| 600 | NEXUS_AudioDecoderDolbyStereoDownmixMode_eAutomatic, |
|---|
| 601 | NEXUS_AudioDecoderDolbyStereoDownmixMode_eDolbySurroundCompatible, |
|---|
| 602 | NEXUS_AudioDecoderDolbyStereoDownmixMode_eStandard, |
|---|
| 603 | NEXUS_AudioDecoderDolbyStereoDownmixMode_eMax |
|---|
| 604 | } NEXUS_AudioDecoderDolbyStereoDownmixMode; |
|---|
| 605 | |
|---|
| 606 | /*************************************************************************** |
|---|
| 607 | Summary: |
|---|
| 608 | Dolby audio decoder settings |
|---|
| 609 | |
|---|
| 610 | Description: |
|---|
| 611 | These settings control the parameters involved in the decode of Dolby-based |
|---|
| 612 | streams. They only apply when the audio type is Dolby Digital (AC3) or Dolby |
|---|
| 613 | Digital Plus (AC3Plus). The variable "cut" determines the percentage cut of |
|---|
| 614 | louder sounds from the normal value. The variable "boost" determines the |
|---|
| 615 | percentage boost of quiter sounds from the normal value. |
|---|
| 616 | ***************************************************************************/ |
|---|
| 617 | typedef struct NEXUS_AudioDecoderDolbySettings |
|---|
| 618 | { |
|---|
| 619 | NEXUS_AudioDecoderDolbyDrcMode drcMode; |
|---|
| 620 | NEXUS_AudioDecoderDolbyDrcMode drcModeDownmix; /* DRC mode for stereo downmixed data only. Applicable to MS11 Licensed decoder only. */ |
|---|
| 621 | NEXUS_AudioDecoderDolbyStereoDownmixMode stereoDownmixMode; |
|---|
| 622 | |
|---|
| 623 | uint16_t cut; /* Cut factor */ |
|---|
| 624 | uint16_t boost; /* Boost factor */ |
|---|
| 625 | uint16_t cutDownmix; /* Cut factor for stereo downmixed data only. Applicable to MS11 licensed decoder only. */ |
|---|
| 626 | uint16_t boostDownmix; /* Boost factor for stereo downmixed data only. Applicable to MS11 licensed decoder only. */ |
|---|
| 627 | uint16_t scale; /* PCM Scale factor */ |
|---|
| 628 | uint16_t scaleDownmix; /* PCM Scale factor for stereo downmixed data only. Applicable to MS11 licensed decoder only. */ |
|---|
| 629 | |
|---|
| 630 | bool dialogNormalization; /* Use dialog normalization values from the stream. This should be true for normal operation. */ |
|---|
| 631 | unsigned dialogNormalizationValue; /* User-specified dialog normalization value. Used only if dialogNormalization = false. Specified in dB, 0..31 */ |
|---|
| 632 | |
|---|
| 633 | unsigned substreamId; /* Applicable only to MS10/MS11 licensed decoders */ |
|---|
| 634 | } NEXUS_AudioDecoderDolbySettings; |
|---|
| 635 | |
|---|
| 636 | /*************************************************************************** |
|---|
| 637 | Summary: |
|---|
| 638 | Downmix type for the AAC decoder |
|---|
| 639 | ***************************************************************************/ |
|---|
| 640 | typedef enum NEXUS_AudioDecoderAacDownmixMode |
|---|
| 641 | { |
|---|
| 642 | NEXUS_AudioDecoderAacDownmixMode_eMatrix, /* Not supported for Dolby Pulse (MS10) */ |
|---|
| 643 | NEXUS_AudioDecoderAacDownmixMode_eArib, /* Not supported for Dolby Pulse (MS10) */ |
|---|
| 644 | NEXUS_AudioDecoderAacDownmixMode_eLtRt, |
|---|
| 645 | NEXUS_AudioDecoderAacDownmixMode_eLoRo, |
|---|
| 646 | NEXUS_AudioDecoderAacDownmixMode_eMax |
|---|
| 647 | } NEXUS_AudioDecoderAacDownmixMode; |
|---|
| 648 | |
|---|
| 649 | /*************************************************************************** |
|---|
| 650 | Summary: |
|---|
| 651 | Dolby Pulse audio decoder dynamic range compression mode |
|---|
| 652 | ***************************************************************************/ |
|---|
| 653 | typedef enum NEXUS_AudioDecoderDolbyPulseDrcMode |
|---|
| 654 | { |
|---|
| 655 | NEXUS_AudioDecoderDolbyPulseDrcMode_eLine, |
|---|
| 656 | NEXUS_AudioDecoderDolbyPulseDrcMode_eRf, |
|---|
| 657 | NEXUS_AudioDecoderDolbyPulseDrcMode_eMax |
|---|
| 658 | }NEXUS_AudioDecoderDolbyPulseDrcMode; |
|---|
| 659 | |
|---|
| 660 | /*************************************************************************** |
|---|
| 661 | Summary: |
|---|
| 662 | AAC audio decoder settings |
|---|
| 663 | |
|---|
| 664 | Description: |
|---|
| 665 | These settings control the parameters involved in the decode of AAC and |
|---|
| 666 | AAC-Plus streams. They only apply when the audio type is AAC or AAC-Plus |
|---|
| 667 | ***************************************************************************/ |
|---|
| 668 | typedef struct NEXUS_AudioDecoderAacSettings |
|---|
| 669 | { |
|---|
| 670 | uint16_t cut; /* Dynamic range compression cut scale factor (in %). |
|---|
| 671 | Input value range = 0% to 100%. 100% corresponds to |
|---|
| 672 | a value of unity. Any value above 100% is considered |
|---|
| 673 | as unity */ |
|---|
| 674 | |
|---|
| 675 | uint16_t boost; /* Dynamic range compression boost scale factor (in %). |
|---|
| 676 | Input value range = 0% to 100%. 100% corresponds to |
|---|
| 677 | a value of unity. Any value above 100% is considered |
|---|
| 678 | as unity */ |
|---|
| 679 | |
|---|
| 680 | uint16_t drcTargetLevel; /* Dynamic range compression target level. |
|---|
| 681 | Input value range = 0 to 127. |
|---|
| 682 | Not supported for Dolby Pulse (MS10). */ |
|---|
| 683 | |
|---|
| 684 | bool decode96Khz; /* Enable decoding of 96Kz audio. |
|---|
| 685 | Not supported for Dolby Pulse (MS10). */ |
|---|
| 686 | |
|---|
| 687 | bool mpegConformanceMode; /* Enable MPEG Conformance mode. This should |
|---|
| 688 | only be set for Dolby Pulse (MS10) |
|---|
| 689 | certification testing */ |
|---|
| 690 | |
|---|
| 691 | NEXUS_AudioDecoderAacDownmixMode downmixMode; /* Downmix mode */ |
|---|
| 692 | NEXUS_AudioDecoderDolbyPulseDrcMode drcMode; /* DRC mode. |
|---|
| 693 | Only supported for Dolby Pulse (MS10). */ |
|---|
| 694 | } NEXUS_AudioDecoderAacSettings; |
|---|
| 695 | |
|---|
| 696 | /*************************************************************************** |
|---|
| 697 | Summary: |
|---|
| 698 | WMA pro audio decoder settings |
|---|
| 699 | |
|---|
| 700 | Description: |
|---|
| 701 | These settings control the parameters involved in the decode of WMA-pro streams |
|---|
| 702 | ***************************************************************************/ |
|---|
| 703 | typedef struct NEXUS_AudioDecoderWmaProSettings |
|---|
| 704 | { |
|---|
| 705 | bool dynamicRangeControlValid; |
|---|
| 706 | struct { |
|---|
| 707 | unsigned peakReference; |
|---|
| 708 | unsigned peakTarget; |
|---|
| 709 | unsigned averageReference; |
|---|
| 710 | unsigned averageTarget; |
|---|
| 711 | } dynamicRangeControl; |
|---|
| 712 | |
|---|
| 713 | }NEXUS_AudioDecoderWmaProSettings; |
|---|
| 714 | |
|---|
| 715 | |
|---|
| 716 | /*************************************************************************** |
|---|
| 717 | Summary: |
|---|
| 718 | This enumeration defines configuration parameter values for |
|---|
| 719 | DTS stereo mode. This eum is effective only when stream is |
|---|
| 720 | Annex-D compliant and |
|---|
| 721 | BRAP_DEC_AudioParams.eOutputMode = BRAP_OutputMode_eStereo. |
|---|
| 722 | This is also used for DTS-HD. |
|---|
| 723 | ***************************************************************************/ |
|---|
| 724 | typedef enum NEXUS_AudioDecoderDtsStereoDownmixMode |
|---|
| 725 | { |
|---|
| 726 | NEXUS_AudioDecoderDtsDownmixMode_eAuto, |
|---|
| 727 | NEXUS_AudioDecoderDtsDownmixMode_eLtRt, |
|---|
| 728 | NEXUS_AudioDecoderDtsDownmixMode_eLoRo, |
|---|
| 729 | NEXUS_AudioDecoderDtsDownmixMode_eMax |
|---|
| 730 | } NEXUS_AudioDecoderDtsStereoDownmixMode; |
|---|
| 731 | |
|---|
| 732 | /*************************************************************************** |
|---|
| 733 | Summary: |
|---|
| 734 | DTS audio decoder settings |
|---|
| 735 | |
|---|
| 736 | Description: |
|---|
| 737 | These settings control the parameters involved in the decode of DTS and |
|---|
| 738 | DTS-HD streams. They only apply when the audio type is DTS or DTS-HD |
|---|
| 739 | ***************************************************************************/ |
|---|
| 740 | typedef struct NEXUS_AudioDecoderDtsSettings |
|---|
| 741 | { |
|---|
| 742 | bool mixLfeToPrimary; /* Mix LFE to primary while downmixing, when Lfe output is disabled */ |
|---|
| 743 | bool enableDrc; /* Dynamic Range Compression is enabled if true, disabled if false */ |
|---|
| 744 | uint16_t cut; /* Dynamic range compression cut scale factor (in %). |
|---|
| 745 | Input value range = 0% to 100%. 100% corresponds to |
|---|
| 746 | a value of unity. Any value above 100% is considered |
|---|
| 747 | as unity */ |
|---|
| 748 | |
|---|
| 749 | uint16_t boost; /* Dynamic range compression boost scale factor (in %). |
|---|
| 750 | Input value range = 0% to 100%. 100% corresponds to |
|---|
| 751 | a value of unity. Any value above 100% is considered |
|---|
| 752 | as unity */ |
|---|
| 753 | NEXUS_AudioDecoderDtsStereoDownmixMode stereoDownmixMode; |
|---|
| 754 | } NEXUS_AudioDecoderDtsSettings; |
|---|
| 755 | |
|---|
| 756 | |
|---|
| 757 | /*************************************************************************** |
|---|
| 758 | Summary: |
|---|
| 759 | ADPCM audio decoder settings |
|---|
| 760 | |
|---|
| 761 | Description: |
|---|
| 762 | These settings control the parameters involved in the decode of ADPCM. |
|---|
| 763 | They only apply when the audio type is ADPCM |
|---|
| 764 | ***************************************************************************/ |
|---|
| 765 | typedef struct NEXUS_AudioDecoderAdpcmSettings |
|---|
| 766 | { |
|---|
| 767 | bool enableGain; /* True to apply the gain factor below */ |
|---|
| 768 | unsigned gainFactor; /* Similar to Volume Gain in 8.24 format. |
|---|
| 769 | E.g. 0x00800000: unity |
|---|
| 770 | 0x016A09E6: +3dB */ |
|---|
| 771 | } NEXUS_AudioDecoderAdpcmSettings; |
|---|
| 772 | |
|---|
| 773 | |
|---|
| 774 | /*************************************************************************** |
|---|
| 775 | Summary: |
|---|
| 776 | Codec-specific decoder settings |
|---|
| 777 | ***************************************************************************/ |
|---|
| 778 | typedef struct NEXUS_AudioDecoderCodecSettings |
|---|
| 779 | { |
|---|
| 780 | NEXUS_AudioCodec codec; |
|---|
| 781 | union |
|---|
| 782 | { |
|---|
| 783 | NEXUS_AudioDecoderDolbySettings ac3; |
|---|
| 784 | NEXUS_AudioDecoderDolbySettings ac3Plus; |
|---|
| 785 | NEXUS_AudioDecoderAacSettings aac; |
|---|
| 786 | NEXUS_AudioDecoderAacSettings aacPlus; |
|---|
| 787 | NEXUS_AudioDecoderWmaProSettings wmaPro; |
|---|
| 788 | NEXUS_AudioDecoderDtsSettings dts; |
|---|
| 789 | NEXUS_AudioDecoderAdpcmSettings adpcm; |
|---|
| 790 | } codecSettings; |
|---|
| 791 | } NEXUS_AudioDecoderCodecSettings; |
|---|
| 792 | |
|---|
| 793 | /*************************************************************************** |
|---|
| 794 | Summary: |
|---|
| 795 | Get codec-specific decoder settings |
|---|
| 796 | ***************************************************************************/ |
|---|
| 797 | void NEXUS_AudioDecoder_GetCodecSettings( |
|---|
| 798 | NEXUS_AudioDecoderHandle handle, |
|---|
| 799 | NEXUS_AudioCodec codec, |
|---|
| 800 | NEXUS_AudioDecoderCodecSettings *pSettings /* [out] settings for specified codec */ |
|---|
| 801 | ); |
|---|
| 802 | |
|---|
| 803 | /*************************************************************************** |
|---|
| 804 | Summary: |
|---|
| 805 | Set codec-specific decoder settings |
|---|
| 806 | ***************************************************************************/ |
|---|
| 807 | NEXUS_Error NEXUS_AudioDecoder_SetCodecSettings( |
|---|
| 808 | NEXUS_AudioDecoderHandle handle, |
|---|
| 809 | const NEXUS_AudioDecoderCodecSettings *pSettings |
|---|
| 810 | ); |
|---|
| 811 | |
|---|
| 812 | /*************************************************************************** |
|---|
| 813 | Summary: |
|---|
| 814 | Get the current audio decoder status |
|---|
| 815 | ***************************************************************************/ |
|---|
| 816 | NEXUS_Error NEXUS_AudioDecoder_GetStatus( |
|---|
| 817 | NEXUS_AudioDecoderHandle handle, |
|---|
| 818 | NEXUS_AudioDecoderStatus *pStatus /* [out] current status */ |
|---|
| 819 | ); |
|---|
| 820 | |
|---|
| 821 | /*************************************************************************** |
|---|
| 822 | Summary: |
|---|
| 823 | Get raw channel status information from the decoder |
|---|
| 824 | |
|---|
| 825 | Description: |
|---|
| 826 | When the decoder is connected to a digital input, this routine can |
|---|
| 827 | return the raw channel status bit information from the input device. |
|---|
| 828 | Currently, this applies to HDMI or SPDIF inputs only. This routine |
|---|
| 829 | will return an error if not connected to a digital input. |
|---|
| 830 | |
|---|
| 831 | See Also: |
|---|
| 832 | NEXUS_SpdifOutput_SetRawChannelStatus |
|---|
| 833 | ***************************************************************************/ |
|---|
| 834 | NEXUS_Error NEXUS_AudioDecoder_GetRawChannelStatus( |
|---|
| 835 | NEXUS_AudioDecoderHandle handle, |
|---|
| 836 | NEXUS_AudioRawChannelStatus *pStatus /* [out] current status */ |
|---|
| 837 | ); |
|---|
| 838 | |
|---|
| 839 | /*************************************************************************** |
|---|
| 840 | Summary: |
|---|
| 841 | Audio decoder connection type |
|---|
| 842 | ***************************************************************************/ |
|---|
| 843 | #define NEXUS_AudioDecoderConnectorType NEXUS_AudioConnectorType |
|---|
| 844 | #define NEXUS_AudioDecoderConnectorType_eStereo NEXUS_AudioConnectorType_eStereo /* two channel PCM audio */ |
|---|
| 845 | #define NEXUS_AudioDecoderConnectorType_eMultichannel NEXUS_AudioConnectorType_eMultichannel /* multichannel PCM audio |
|---|
| 846 | (e.g. 5.1 or 7.1). see NEXUS_AudioDecoderOpenSettings.multichannelFormat for |
|---|
| 847 | required open-time settings to enable multichannel output. */ |
|---|
| 848 | #define NEXUS_AudioDecoderConnectorType_eCompressed NEXUS_AudioConnectorType_eCompressed /* compressed audio (may be stereo or multichannel) */ |
|---|
| 849 | #define NEXUS_AudioDecoderConnectorType_eMax NEXUS_AudioConnectorType_eMax |
|---|
| 850 | |
|---|
| 851 | /*************************************************************************** |
|---|
| 852 | Summary: |
|---|
| 853 | Get an audio connector for use in the audio mixer |
|---|
| 854 | ***************************************************************************/ |
|---|
| 855 | NEXUS_AudioInput NEXUS_AudioDecoder_GetConnector( |
|---|
| 856 | NEXUS_AudioDecoderHandle handle, |
|---|
| 857 | NEXUS_AudioConnectorType type |
|---|
| 858 | ); |
|---|
| 859 | |
|---|
| 860 | #ifdef __cplusplus |
|---|
| 861 | } |
|---|
| 862 | #endif |
|---|
| 863 | |
|---|
| 864 | #endif |
|---|
| 865 | |
|---|