|
131 | 131 | <xmp>
|
132 | 132 | dictionary OpusEncoderConfig {
|
133 | 133 | OpusBitstreamFormat format = "opus";
|
134 |
| - [EnforceRange] unsigned long frameDuration; |
| 134 | + [EnforceRange] unsigned long long frameDuration = 20000; |
135 | 135 | [EnforceRange] unsigned long complexity;
|
136 | 136 | [EnforceRange] unsigned long packetlossperc = 0;
|
137 | 137 | boolean useinbandfec = false;
|
|
141 | 141 | </pre>
|
142 | 142 |
|
143 | 143 | To check if an {{OpusEncoderConfig}} is valid, run these steps:
|
144 |
| -1. If {{OpusEncoderConfig/frameDuration}} is not a valid `ptime` value, |
145 |
| - which is described in Section 6.1 of [[RFC7587]], return `false`. |
| 144 | +1. If {{OpusEncoderConfig/frameDuration}} is not a valid frame duration, |
| 145 | + which is described section 2.1.4 of [[RFC6716]], return `false`. |
146 | 146 | 1. If {{OpusEncoderConfig/complexity}} is specified and not within the range of
|
147 | 147 | `0` and `10` inclusively, return `false`.
|
148 | 148 | 1. If {{OpusEncoderConfig/packetlossperc}} is specified and not within the range of
|
|
157 | 157 | </dd>
|
158 | 158 | <dt><dfn dict-member for=OpusEncoderConfig>frameDuration</dfn></dt>
|
159 | 159 | <dd>
|
160 |
| - Configures the frame duration, in milliseconds, of output {{EncodedAudioChunk}}s. |
| 160 | + Configures the frame duration, in microseconds, of output {{EncodedAudioChunk}}s. |
| 161 | + </dd> |
| 162 | + <dt><dfn dict-member for=OpusEncoderConfig>complexity</dfn></dt> |
| 163 | + <dd> |
| 164 | + Configures the encoder's computational complexity, as described in section 2.1.9. |
| 165 | + of [[RFC6716]]. The valid range is `0` to `10`, with `10` representing the highest |
| 166 | + complexity. If no value is specificied, the default value is platform-specific: |
| 167 | + User Agents <em class="rfc2119">SHOULD</em> set a default of `5` for mobile |
| 168 | + platforms, and a default of `9` for all other platforms. |
| 169 | + </dd> |
| 170 | + <dt><dfn dict-member for=OpusEncoderConfig>packetlossperc</dfn></dt> |
| 171 | + <dd> |
| 172 | + Configures the encoder's expected packet loss percentage. The valid range is |
| 173 | + `0` to `100`. |
| 174 | + |
| 175 | + NOTE: The packet loss percentage might be updated over the course of an |
| 176 | + encoding, and it is recommended for User Agents to support these reconfigurations. |
| 177 | + </dd> |
| 178 | + <dt><dfn dict-member for=OpusEncoderConfig>useinbandfec</dfn></dt> |
| 179 | + <dd> |
| 180 | + Specifies whether the encoder provides Opus in-band Forward Error Correction |
| 181 | + (FEC), as described by section 2.1.7. of [[RFC6716]]. |
| 182 | + </dd> |
| 183 | + <dt><dfn dict-member for=OpusEncoderConfig>usedtx</dfn></dt> |
| 184 | + <dd> |
| 185 | + Specifies if the encoder uses Discontinuous Transmission (DTX), as described |
| 186 | + by section 2.1.9. of [[RFC6716]]. |
161 | 187 | </dd>
|
162 | 188 | <dt><dfn dict-member for=OpusEncoderConfig>complexity</dfn></dt>
|
163 | 189 | <dd>
|
|
0 commit comments