Skip to content

Commit 4644373

Browse files
Merge pull request #602 from tguilbert-google/opus_frame_duration
Change frameDuration to microseconds
2 parents 7cd5b40 + d29fc21 commit 4644373

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

opus_codec_registration.src.html

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<xmp>
132132
dictionary OpusEncoderConfig {
133133
OpusBitstreamFormat format = "opus";
134-
[EnforceRange] unsigned long frameDuration;
134+
[EnforceRange] unsigned long long frameDuration = 20000;
135135
[EnforceRange] unsigned long complexity;
136136
[EnforceRange] unsigned long packetlossperc = 0;
137137
boolean useinbandfec = false;
@@ -141,8 +141,8 @@
141141
</pre>
142142

143143
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`.
146146
1. If {{OpusEncoderConfig/complexity}} is specified and not within the range of
147147
`0` and `10` inclusively, return `false`.
148148
1. If {{OpusEncoderConfig/packetlossperc}} is specified and not within the range of
@@ -157,7 +157,33 @@
157157
</dd>
158158
<dt><dfn dict-member for=OpusEncoderConfig>frameDuration</dfn></dt>
159159
<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]].
161187
</dd>
162188
<dt><dfn dict-member for=OpusEncoderConfig>complexity</dfn></dt>
163189
<dd>

0 commit comments

Comments
 (0)