Convert VideoTrackReader to use callbacks
This CL replaces VideoTrackReader's ReadableStream with an output callback, to be passed in at construction time. Switching VTR to use a callback aligns it with the general direction of WebCodecs. It also works because there isn't the need for backpressure when using getUserMedia(). Additionally, a change in constraints to the MediaStreamTrack would mean that we might have to flush the unread frames from ReadableStream. This shouldn't happen with a callback (but we don't invalidate pending frames when constraints change, for now). Bug: 1080834 Change-Id: I5ff424f9440660dadc52ba6d4d76d14b5840a6d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2191204 Commit-Queue: Thomas Guilbert <tguilbert@chromium.org> Auto-Submit: Thomas Guilbert <tguilbert@chromium.org> Reviewed-by:Dan Sanders <sandersd@chromium.org> Cr-Commit-Position: refs/heads/master@{#770841}
Showing
Please register or sign in to comment