This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse the repository at this point in the history
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
- Loading branch information
Showing 6 changed files with 43 additions and 2 deletions.