Skip to content

Commit 9224027

Browse files
committed
Add AudioEncoderCocoa class, an AudioToolbox implementation of WebCodec's AudioEncoder
https://bugs.webkit.org/show_bug.cgi?id=284019 rdar://140889671 Reviewed by NOBODY (OOPS!). We add AudioEncoderCocoa, AudioToolbox implementation of WebCodec's AudioEncoder. We only support encoding to Opus and AAC as the framework doesn't provide encoder for Flac, mp3 and vorbis (decoder only) Enabled WPT tests. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any-expected.txt: * LayoutTests/platform/ios/imported/w3c/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any-expected.txt: Added. The only failure remaining is related to different default for Opus encoding which yield slightly different values to what expected. The test performs very rough float comparisons. * LayoutTests/platform/ios/imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any-expected.txt: Added. * LayoutTests/platform/mac/imported/w3c/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any-expected.txt: Added. * LayoutTests/platform/mac/imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any-expected.txt: Added. * Source/WebCore/Modules/webcodecs/OpusEncoderConfig.h: * Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp: (WebCore::isSupportedEncoderCodec): Add additional checks to ensure that the values provided in the Opus config are sane. While this isn't probably the best place to do so, as this is common for both GStreamer and Cocoa AudioEncoder, it's the simplest. (WebCore::isValidEncoderConfig): Make sure sampleRate and numberOfChannels aren't 0. (WebCore::createAudioEncoderConfig): Increase code readability by using struct's named member initialisation. (WebCore::WebCodecsAudioEncoder::configure): (WebCore::WebCodecsAudioEncoder::encode): Both Firefox and Chromes rejects AudioData that has a different sampleRate or numberOfChannels. While we did the same, we didn't process the errors as per spec which requires that we also change the state to Closed just before queueing the error. (WebCore::WebCodecsAudioEncoder::isConfigSupported): * Source/WebCore/PlatformMac.cmake: * Source/WebCore/SourcesCocoa.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/AudioEncoder.cpp: (WebCore::AudioEncoder::create): Plumb AudioEncoderCocoa. * Source/WebCore/platform/AudioEncoder.h: * Source/WebCore/platform/AudioEncoderActiveConfiguration.h: Add default initialiser to comply with more recent clang version. It allows to make the struct member initialisation optional. * Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp: (WebCore::InternalAudioDecoderCocoa::initialize): Change default AudioData creation to use interleaved frames instead of planar. A few tests has this expectations, even though this isn't mandated by the specs. * Source/WebCore/platform/audio/cocoa/AudioEncoderCocoa.cpp: Added. (WebCore::InternalAudioEncoderCocoa::create): (WebCore::InternalAudioEncoderCocoa::reset): (WebCore::InternalAudioEncoderCocoa::converter): (WebCore::InternalAudioEncoderCocoa::queueSingleton): (WebCore::AudioEncoderCocoa::create): (WebCore::AudioEncoderCocoa::AudioEncoderCocoa): (WebCore::AudioEncoderCocoa::~AudioEncoderCocoa): (WebCore::AudioEncoderCocoa::encode): (WebCore::AudioEncoderCocoa::flush): (WebCore::AudioEncoderCocoa::reset): (WebCore::AudioEncoderCocoa::close): (WebCore::InternalAudioEncoderCocoa::InternalAudioEncoderCocoa): (WebCore::InternalAudioEncoderCocoa::initialize): (WebCore::InternalAudioEncoderCocoa::compressedAudioOutputBufferCallback): (WebCore::InternalAudioEncoderCocoa::generateDecoderDescriptionFromSample const): (WebCore::InternalAudioEncoderCocoa::activeConfiguration const): (WebCore::InternalAudioEncoderCocoa::processEncodedOutputs): (WebCore::InternalAudioEncoderCocoa::encode): (WebCore::InternalAudioEncoderCocoa::flush): (WebCore::InternalAudioEncoderCocoa::close): * Source/WebCore/platform/audio/cocoa/AudioEncoderCocoa.h: Copied from Source/WebCore/platform/AudioEncoderActiveConfiguration.h.
1 parent 3e90d88 commit 9224027

20 files changed

+631
-98
lines changed

LayoutTests/TestExpectations

-4
Original file line numberDiff line numberDiff line change
@@ -6834,10 +6834,6 @@ imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking
68346834

68356835
webkit.org/b/278192 imported/w3c/web-platform-tests/html/dom/render-blocking/element-render-blocking-033.html [ Failure ]
68366836

6837-
# AudioEncoder implementation missing.
6838-
imported/w3c/web-platform-tests/webcodecs/audio-encoder-codec-specific.https.any.html [ Failure ]
6839-
imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html [ Failure ]
6840-
68416837
webkit.org/b/258192 imported/w3c/web-platform-tests/webcodecs/full-cycle-test.https.any.worker.html?h264_avc [ Pass Failure ]
68426838

68436839
# These tests are timing out since their import.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
PASS Test the Opus DTX flag works.
3-
FAIL Test the Opus bitrateMode flag works. assert_less_than: expected a number less than 40330 but got 80660
3+
PASS Test the Opus bitrateMode flag works.
44
PASS Test the AAC bitrateMode flag works.
55

LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any-expected.txt

+13-19
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing
33
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Empty codec
44
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing sampleRate
55
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing numberOfChannels
6-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero sampleRate assert_unreached: Should have rejected: undefined Reached unreachable code
7-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero channels assert_unreached: Should have rejected: undefined Reached unreachable code
8-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Bit rate too big assert_unreached: Should have rejected: undefined Reached unreachable code
6+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero sampleRate
7+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero channels
8+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Bit rate too big
99
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus complexity too big
1010
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus packetlossperc too big
1111
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus frame duration too small
@@ -15,15 +15,9 @@ PASS Test that AudioEncoder.configure() rejects invalid config: Missing codec
1515
PASS Test that AudioEncoder.configure() rejects invalid config: Empty codec
1616
PASS Test that AudioEncoder.configure() rejects invalid config: Missing sampleRate
1717
PASS Test that AudioEncoder.configure() rejects invalid config: Missing numberOfChannels
18-
FAIL Test that AudioEncoder.configure() rejects invalid config: Zero sampleRate assert_throws_js: function "() => {
19-
codec.configure(entry.config);
20-
}" did not throw
21-
FAIL Test that AudioEncoder.configure() rejects invalid config: Zero channels assert_throws_js: function "() => {
22-
codec.configure(entry.config);
23-
}" did not throw
24-
FAIL Test that AudioEncoder.configure() rejects invalid config: Bit rate too big assert_throws_js: function "() => {
25-
codec.configure(entry.config);
26-
}" did not throw
18+
PASS Test that AudioEncoder.configure() rejects invalid config: Zero sampleRate
19+
PASS Test that AudioEncoder.configure() rejects invalid config: Zero channels
20+
PASS Test that AudioEncoder.configure() rejects invalid config: Bit rate too big
2721
PASS Test that AudioEncoder.configure() rejects invalid config: Opus complexity too big
2822
PASS Test that AudioEncoder.configure() rejects invalid config: Opus packetlossperc too big
2923
PASS Test that AudioEncoder.configure() rejects invalid config: Opus frame duration too small
@@ -43,11 +37,11 @@ PASS Test that AudioEncoder.configure() doesn't support config: Sample rate is t
4337
PASS Test that AudioEncoder.configure() doesn't support config: Way too many channels
4438
PASS Test that AudioEncoder.configure() doesn't support config: Possible future opus codec string
4539
PASS Test that AudioEncoder.configure() doesn't support config: Possible future aac codec string
46-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":8000,"numberOfChannels":1} assert_true: expected true got false
47-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2} assert_true: expected true got false
48-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"constant","bogus":123} assert_true: expected true got false
49-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"variable","bogus":123} assert_true: expected true got false
50-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"complexity":5,"frameDuration":20000,"packetlossperc":10,"useinbandfec":true}} assert_true: expected true got false
51-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"format":"opus","complexity":10,"frameDuration":60000,"packetlossperc":20,"usedtx":true,"bogus":456}} assert_true: expected true got false
52-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{}} assert_true: expected true got false
40+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":8000,"numberOfChannels":1}
41+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2}
42+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"constant","bogus":123}
43+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"variable","bogus":123}
44+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"complexity":5,"frameDuration":20000,"packetlossperc":10,"useinbandfec":true}}
45+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"format":"opus","complexity":10,"frameDuration":60000,"packetlossperc":20,"usedtx":true,"bogus":456}}
46+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{}}
5347

LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder-config.https.any.worker-expected.txt

+13-19
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing
33
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Empty codec
44
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing sampleRate
55
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Missing numberOfChannels
6-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero sampleRate assert_unreached: Should have rejected: undefined Reached unreachable code
7-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero channels assert_unreached: Should have rejected: undefined Reached unreachable code
8-
FAIL Test that AudioEncoder.isConfigSupported() rejects invalid config: Bit rate too big assert_unreached: Should have rejected: undefined Reached unreachable code
6+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero sampleRate
7+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Zero channels
8+
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Bit rate too big
99
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus complexity too big
1010
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus packetlossperc too big
1111
PASS Test that AudioEncoder.isConfigSupported() rejects invalid config: Opus frame duration too small
@@ -15,15 +15,9 @@ PASS Test that AudioEncoder.configure() rejects invalid config: Missing codec
1515
PASS Test that AudioEncoder.configure() rejects invalid config: Empty codec
1616
PASS Test that AudioEncoder.configure() rejects invalid config: Missing sampleRate
1717
PASS Test that AudioEncoder.configure() rejects invalid config: Missing numberOfChannels
18-
FAIL Test that AudioEncoder.configure() rejects invalid config: Zero sampleRate assert_throws_js: function "() => {
19-
codec.configure(entry.config);
20-
}" did not throw
21-
FAIL Test that AudioEncoder.configure() rejects invalid config: Zero channels assert_throws_js: function "() => {
22-
codec.configure(entry.config);
23-
}" did not throw
24-
FAIL Test that AudioEncoder.configure() rejects invalid config: Bit rate too big assert_throws_js: function "() => {
25-
codec.configure(entry.config);
26-
}" did not throw
18+
PASS Test that AudioEncoder.configure() rejects invalid config: Zero sampleRate
19+
PASS Test that AudioEncoder.configure() rejects invalid config: Zero channels
20+
PASS Test that AudioEncoder.configure() rejects invalid config: Bit rate too big
2721
PASS Test that AudioEncoder.configure() rejects invalid config: Opus complexity too big
2822
PASS Test that AudioEncoder.configure() rejects invalid config: Opus packetlossperc too big
2923
PASS Test that AudioEncoder.configure() rejects invalid config: Opus frame duration too small
@@ -43,11 +37,11 @@ PASS Test that AudioEncoder.configure() doesn't support config: Sample rate is t
4337
PASS Test that AudioEncoder.configure() doesn't support config: Way too many channels
4438
PASS Test that AudioEncoder.configure() doesn't support config: Possible future opus codec string
4539
PASS Test that AudioEncoder.configure() doesn't support config: Possible future aac codec string
46-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":8000,"numberOfChannels":1} assert_true: expected true got false
47-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2} assert_true: expected true got false
48-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"constant","bogus":123} assert_true: expected true got false
49-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"variable","bogus":123} assert_true: expected true got false
50-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"complexity":5,"frameDuration":20000,"packetlossperc":10,"useinbandfec":true}} assert_true: expected true got false
51-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"format":"opus","complexity":10,"frameDuration":60000,"packetlossperc":20,"usedtx":true,"bogus":456}} assert_true: expected true got false
52-
FAIL AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{}} assert_true: expected true got false
40+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":8000,"numberOfChannels":1}
41+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2}
42+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"constant","bogus":123}
43+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"bitrate":128000,"bitrateMode":"variable","bogus":123}
44+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"complexity":5,"frameDuration":20000,"packetlossperc":10,"useinbandfec":true}}
45+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{"format":"opus","complexity":10,"frameDuration":60000,"packetlossperc":20,"usedtx":true,"bogus":456}}
46+
PASS AudioEncoder.isConfigSupported() supports: {"codec":"opus","sampleRate":48000,"numberOfChannels":2,"opus":{}}
5347

LayoutTests/imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any-expected.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
PASS Simple audio encoding
33
PASS Test reset during flush
44
PASS Encode audio with negative timestamp
5-
FAIL Channel number variation: 1 assert_unreached: Should have rejected: undefined Reached unreachable code
6-
FAIL Channel number variation: 2 assert_unreached: Should have rejected: undefined Reached unreachable code
7-
FAIL Sample rate variation: 3000 assert_unreached: Should have rejected: undefined Reached unreachable code
8-
FAIL Sample rate variation: 13000 assert_unreached: Should have rejected: undefined Reached unreachable code
9-
FAIL Sample rate variation: 23000 assert_unreached: Should have rejected: undefined Reached unreachable code
10-
FAIL Sample rate variation: 33000 assert_unreached: Should have rejected: undefined Reached unreachable code
11-
FAIL Sample rate variation: 43000 assert_unreached: Should have rejected: undefined Reached unreachable code
12-
FAIL Sample rate variation: 53000 assert_unreached: Should have rejected: undefined Reached unreachable code
13-
FAIL Sample rate variation: 63000 assert_unreached: Should have rejected: undefined Reached unreachable code
14-
FAIL Sample rate variation: 73000 assert_unreached: Should have rejected: undefined Reached unreachable code
15-
FAIL Sample rate variation: 83000 assert_unreached: Should have rejected: undefined Reached unreachable code
16-
FAIL Sample rate variation: 93000 assert_unreached: Should have rejected: undefined Reached unreachable code
17-
FAIL Encoding and decoding assert_true: expected true got false
5+
PASS Channel number variation: 1
6+
PASS Channel number variation: 2
7+
PASS Sample rate variation: 3000
8+
PASS Sample rate variation: 13000
9+
PASS Sample rate variation: 23000
10+
PASS Sample rate variation: 33000
11+
PASS Sample rate variation: 43000
12+
PASS Sample rate variation: 53000
13+
PASS Sample rate variation: 63000
14+
PASS Sample rate variation: 73000
15+
PASS Sample rate variation: 83000
16+
PASS Sample rate variation: 93000
17+
PASS Encoding and decoding
1818
PASS Emit decoder config and extra data.
1919
PASS encodeQueueSize test
2020
PASS Test encoding Opus with additional parameters: Empty Opus config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
FAIL Test the Opus DTX flag works. assert_less_than: expected a number less than 250.5 but got 501
3+
PASS Test the Opus bitrateMode flag works.
4+
PASS Test the AAC bitrateMode flag works.
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
PASS Simple audio encoding
3+
PASS Test reset during flush
4+
PASS Encode audio with negative timestamp
5+
PASS Channel number variation: 1
6+
PASS Channel number variation: 2
7+
PASS Sample rate variation: 3000
8+
PASS Sample rate variation: 13000
9+
PASS Sample rate variation: 23000
10+
PASS Sample rate variation: 33000
11+
PASS Sample rate variation: 43000
12+
PASS Sample rate variation: 53000
13+
PASS Sample rate variation: 63000
14+
PASS Sample rate variation: 73000
15+
PASS Sample rate variation: 83000
16+
PASS Sample rate variation: 93000
17+
FAIL Encoding and decoding assert_approx_equals: Difference between input and output is too large. index: 100 channel: 0 input: 0.9659258127212524 output: 0.4632495939731598 expected 0.4632495939731598 +/- 0.5 but got 0.9659258127212524
18+
PASS Emit decoder config and extra data.
19+
PASS encodeQueueSize test
20+
PASS Test encoding Opus with additional parameters: Empty Opus config
21+
PASS Test encoding Opus with additional parameters: Opus with frameDuration
22+
PASS Test encoding Opus with additional parameters: Opus with complexity
23+
PASS Test encoding Opus with additional parameters: Opus with useinbandfec
24+
PASS Test encoding Opus with additional parameters: Opus with usedtx
25+
PASS Test encoding Opus with additional parameters: Opus mixed parameters
26+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
FAIL Test the Opus DTX flag works. assert_less_than: expected a number less than 250.5 but got 501
3+
PASS Test the Opus bitrateMode flag works.
4+
PASS Test the AAC bitrateMode flag works.
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
PASS Simple audio encoding
3+
PASS Test reset during flush
4+
PASS Encode audio with negative timestamp
5+
PASS Channel number variation: 1
6+
PASS Channel number variation: 2
7+
PASS Sample rate variation: 3000
8+
PASS Sample rate variation: 13000
9+
PASS Sample rate variation: 23000
10+
PASS Sample rate variation: 33000
11+
PASS Sample rate variation: 43000
12+
PASS Sample rate variation: 53000
13+
PASS Sample rate variation: 63000
14+
PASS Sample rate variation: 73000
15+
PASS Sample rate variation: 83000
16+
PASS Sample rate variation: 93000
17+
FAIL Encoding and decoding assert_approx_equals: Difference between input and output is too large. index: 100 channel: 0 input: 0.9659258127212524 output: 0.4632495939731598 expected 0.4632495939731598 +/- 0.5 but got 0.9659258127212524
18+
PASS Emit decoder config and extra data.
19+
PASS encodeQueueSize test
20+
PASS Test encoding Opus with additional parameters: Empty Opus config
21+
PASS Test encoding Opus with additional parameters: Opus with frameDuration
22+
PASS Test encoding Opus with additional parameters: Opus with complexity
23+
PASS Test encoding Opus with additional parameters: Opus with useinbandfec
24+
PASS Test encoding Opus with additional parameters: Opus with usedtx
25+
PASS Test encoding Opus with additional parameters: Opus mixed parameters
26+

Source/WebCore/Modules/webcodecs/OpusEncoderConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct OpusEncoderConfig {
5454
using BitstreamFormat = OpusBitstreamFormat;
5555
OpusBitstreamFormat format { OpusBitstreamFormat::Opus };
5656
uint64_t frameDuration { 20000 };
57-
std::optional<size_t> complexity;
57+
std::optional<size_t> complexity { 9 };
5858
size_t packetlossperc { 0 };
5959
bool useinbandfec { false };
6060
bool usedtx { false };

0 commit comments

Comments
 (0)