[webkit-changes] [WebKit/WebKit] 712b8a: Media recorder produces empty chunks
youennf
noreply at github.com
Wed May 24 09:19:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 712b8a916d0da3c2661c38f3273bc303f3ea431b
https://github.com/WebKit/WebKit/commit/712b8a916d0da3c2661c38f3273bc303f3ea431b
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-05-24 (Wed, 24 May 2023)
Changed paths:
A LayoutTests/http/wpt/mediarecorder/record-context-created-late-expected.txt
A LayoutTests/http/wpt/mediarecorder/record-context-created-late.html
M LayoutTests/webrtc/routines.js
M Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp
M Source/WebCore/html/CanvasBase.cpp
M Source/WebCore/html/CanvasBase.h
Log Message:
-----------
Media recorder produces empty chunks
https://bugs.webkit.org/show_bug.cgi?id=257016
rdar://109705910
Reviewed by Eric Carlson.
We were skipping video frame generation when needing preparation for display.
This works fine as long as we receive the canvasDisplayBufferPrepared notification.
This notification only happens if the document is observing canvas changes.
If that is not the case, we schedule a capture canvas, which will trigger a video frame generation and will register the document as a canvas change observer.
Making a side fix in LayoutTests/webrtc/routines.js so that computeFrameRate works fine on browsers without internals.
This is necessary for LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-capture-out-of-DOM-canvas.html in particular.
* LayoutTests/http/wpt/mediarecorder/record-context-created-late-expected.txt: Added.
* LayoutTests/http/wpt/mediarecorder/record-context-created-late.html: Added.
* LayoutTests/webrtc/routines.js:
* Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::hasObserver const):
* Source/WebCore/html/CanvasBase.h:
Canonical link: https://commits.webkit.org/264478@main
More information about the webkit-changes
mailing list