Skip to content
Browse files
[WebCodecs] schedule dequeue event when encoder queue size decreases

Reviewed by Eric Carlson.

Schedule event as per spec.

* LayoutTests/imported/w3c/web-platform-tests/webcodecs/video-encoder.https.any-expected.txt:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:

Canonical link:
  • Loading branch information
youennf committed Oct 25, 2022
1 parent 6efba45 commit 9676c2c46c92a89dd7585c5e25f1eba6de2ee1ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
@@ -2,7 +2,7 @@
PASS Test VideoEncoder construction
PASS Test VideoEncoder.configure()
FAIL Test successful configure(), encode(), and flush() promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'decoderConfig.colorSpace.primaries')"
FAIL encodeQueueSize test assert_equals: expected 0 but got Infinity
PASS encodeQueueSize test
PASS Test successful reset() and re-confiugre()
PASS Test successful encode() after re-configure().
PASS Verify closed VideoEncoder operations
@@ -210,6 +210,7 @@ ExceptionOr<void> WebCodecsVideoEncoder::encode(Ref<WebCodecsVideoFrame>&& frame
queueControlMessageAndProcess([this, internalFrame = internalFrame.releaseNonNull(), timestamp = frame->timestamp(), duration = frame->duration(), options = WTFMove(options)]() mutable {
m_internalEncoder->encode({ WTFMove(internalFrame), timestamp, duration }, options.keyFrame, [this, weakedThis = WeakPtr { *this }](auto&& result) {
if (!weakedThis)

0 comments on commit 9676c2c

Please sign in to comment.