1 /* 2 * Copyright (c) 2010 The Khronos Group Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining 5 * a copy of this software and associated documentation files (the 6 * "Software"), to deal in the Software without restriction, including 7 * without limitation the rights to use, copy, modify, merge, publish, 8 * distribute, sublicense, and/or sell copies of the Software, and to 9 * permit persons to whom the Software is furnished to do so, subject 10 * to the following conditions: 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 * 22 */ 23 24 /** OMX_AudioExt.h - OpenMax IL version 1.1.2 25 * The OMX_AudioExt header file contains extensions to the 26 * definitions used by both the application and the component to 27 * access video items. 28 */ 29 30 #ifndef OMX_AudioExt_h 31 #define OMX_AudioExt_h 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif /* __cplusplus */ 36 37 /* Each OMX header shall include all required header files to allow the 38 * header to compile without errors. The includes below are required 39 * for this header file to compile successfully 40 */ 41 #include <OMX_Core.h> 42 43 #define OMX_AUDIO_AACToolAndroidSSBR (OMX_AUDIO_AACToolVendor << 0) /**< SSBR: MPEG-4 Single-rate (downsampled) Spectral Band Replication tool allowed or active */ 44 #define OMX_AUDIO_AACToolAndroidDSBR (OMX_AUDIO_AACToolVendor << 1) /**< DSBR: MPEG-4 Dual-rate Spectral Band Replication tool allowed or active */ 45 46 typedef enum OMX_AUDIO_CODINGEXTTYPE { 47 OMX_AUDIO_CodingAndroidUnused = OMX_AUDIO_CodingKhronosExtensions + 0x00100000, 48 OMX_AUDIO_CodingAndroidAC3, /**< AC3 encoded data */ 49 OMX_AUDIO_CodingAndroidOPUS, /**< OPUS encoded data */ 50 OMX_AUDIO_CodingAndroidEAC3, /**< EAC3 encoded data */ 51 OMX_AUDIO_CodingAndroidAC4, /**< AC4 encoded data */ 52 } OMX_AUDIO_CODINGEXTTYPE; 53 54 typedef struct OMX_AUDIO_PARAM_ANDROID_AC3TYPE { 55 OMX_U32 nSize; /**< size of the structure in bytes */ 56 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 57 OMX_U32 nPortIndex; /**< port that this structure applies to */ 58 OMX_U32 nChannels; /**< Number of channels */ 59 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for 60 variable or unknown sampling rate. */ 61 } OMX_AUDIO_PARAM_ANDROID_AC3TYPE; 62 63 typedef struct OMX_AUDIO_PARAM_ANDROID_EAC3TYPE { 64 OMX_U32 nSize; /**< size of the structure in bytes */ 65 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 66 OMX_U32 nPortIndex; /**< port that this structure applies to */ 67 OMX_U32 nChannels; /**< Number of channels */ 68 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for 69 variable or unknown sampling rate. */ 70 } OMX_AUDIO_PARAM_ANDROID_EAC3TYPE; 71 72 typedef struct OMX_AUDIO_PARAM_ANDROID_AC4TYPE { 73 OMX_U32 nSize; /**< size of the structure in bytes */ 74 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 75 OMX_U32 nPortIndex; /**< port that this structure applies to */ 76 OMX_U32 nChannels; /**< Number of channels */ 77 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for 78 variable or unknown sampling rate. */ 79 } OMX_AUDIO_PARAM_ANDROID_AC4TYPE; 80 81 typedef struct OMX_AUDIO_PARAM_ANDROID_OPUSTYPE { 82 OMX_U32 nSize; /**< size of the structure in bytes */ 83 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 84 OMX_U32 nPortIndex; /**< port that this structure applies to */ 85 OMX_U32 nChannels; /**< Number of channels */ 86 OMX_U32 nBitRate; /**< Bit rate of the encoded data data. Use 0 for variable 87 rate or unknown bit rates. Encoding is set to the 88 bitrate closest to specified value (in bps) */ 89 OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for 90 variable or unknown sampling rate. */ 91 OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should 92 limit the audio signal. Use 0 to let encoder decide */ 93 } OMX_AUDIO_PARAM_ANDROID_OPUSTYPE; 94 95 /** deprecated. use OMX_AUDIO_PARAM_ANDROID_AACDRCPRESENTATIONTYPE */ 96 typedef struct OMX_AUDIO_PARAM_ANDROID_AACPRESENTATIONTYPE { 97 OMX_U32 nSize; /**< size of the structure in bytes */ 98 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 99 OMX_S32 nMaxOutputChannels; /**< Maximum channel count to be output, -1 if unspecified, 0 if downmixing disabled */ 100 OMX_S32 nDrcCut; /**< The DRC attenuation factor, between 0 and 127, -1 if unspecified */ 101 OMX_S32 nDrcBoost; /**< The DRC amplification factor, between 0 and 127, -1 if unspecified */ 102 OMX_S32 nHeavyCompression; /**< 0 for light compression, 1 for heavy compression, -1 if unspecified */ 103 OMX_S32 nTargetReferenceLevel; /**< Target reference level, between 0 and 127, -1 if unspecified */ 104 OMX_S32 nEncodedTargetLevel; /**< Target reference level assumed at the encoder, between 0 and 127, -1 if unspecified */ 105 OMX_S32 nPCMLimiterEnable; /**< Signal level limiting, 0 for disable, 1 for enable, -1 if unspecified */ 106 } OMX_AUDIO_PARAM_ANDROID_AACPRESENTATIONTYPE; 107 108 typedef struct OMX_AUDIO_PARAM_ANDROID_AACDRCPRESENTATIONTYPE { 109 OMX_U32 nSize; /**< size of the structure in bytes */ 110 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 111 OMX_S32 nMaxOutputChannels; /**< Maximum channel count to be output, -1 if unspecified, 0 if downmixing disabled */ 112 OMX_S32 nDrcCut; /**< The DRC attenuation factor, between 0 and 127, -1 if unspecified */ 113 OMX_S32 nDrcBoost; /**< The DRC amplification factor, between 0 and 127, -1 if unspecified */ 114 OMX_S32 nHeavyCompression; /**< 0 for light compression, 1 for heavy compression, -1 if unspecified */ 115 OMX_S32 nTargetReferenceLevel; /**< Target reference level, between 0 and 127, -1 if unspecified */ 116 OMX_S32 nEncodedTargetLevel; /**< Target reference level assumed at the encoder, between 0 and 127, -1 if unspecified */ 117 OMX_S32 nPCMLimiterEnable; /**< Signal level limiting, 0 for disable, 1 for enable, -1 if unspecified */ 118 OMX_S32 nDrcEffectType; /**< MPEG-D DRC effect type, between -1 and 6, -2 if unspecified */ 119 } OMX_AUDIO_PARAM_ANDROID_AACDRCPRESENTATIONTYPE; 120 121 typedef struct OMX_AUDIO_PARAM_ANDROID_PROFILETYPE { 122 OMX_U32 nSize; 123 OMX_VERSIONTYPE nVersion; 124 OMX_U32 nPortIndex; 125 OMX_U32 eProfile; /**< type is OMX_AUDIO_AACPROFILETYPE or OMX_AUDIO_WMAPROFILETYPE 126 depending on context */ 127 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information */ 128 } OMX_AUDIO_PARAM_ANDROID_PROFILETYPE; 129 130 typedef struct OMX_AUDIO_CONFIG_ANDROID_AUDIOPRESENTATION { 131 OMX_U32 nSize; /**< size of the structure in bytes */ 132 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 133 OMX_S32 nPresentationId; /**< presentation id */ 134 OMX_S32 nProgramId; /**< program id */ 135 } OMX_AUDIO_CONFIG_ANDROID_AUDIOPRESENTATION; 136 137 #ifdef __cplusplus 138 } 139 #endif /* __cplusplus */ 140 141 #endif /* OMX_AudioExt_h */ 142 /* File EOF */ 143