-
Notifications
You must be signed in to change notification settings - Fork 19
A review #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Answering just the questions for WebCodecs. @sandersdan @dalecurtis
VideoFrame is (will be) a CanvasImageSource. GPU:CPU copies are not required to do funny hats (e.g. use canvas drawImage() or webGL texImage2d()). Similar to ImageBitmap, WebCodecs does not describe the precise location of VideoFrame backing memory (GPU, CPU, shared, ...). This should not be required to define its observable behavior.
Please see above.
The proposed use of fourcc style pixel formats is widely used across existing codec APIs (e.g. FFmpeg). See: https://www.fourcc.org/yuv.php. We will soon provide more verbose definitions for the each format as described in the linked issues. We will additionally extend the list to include other formats (e.g. RGBA, NV12, ...) |
Following my email on public-webrtc, before diving into API specifics, I think we should be discussing the following foundational topics:
|
Agreed this is an important topic, media pipelines try hard not to do any conversion. |
I agree we want to avoid implicit conversions in the course of codec I/O (encode/decode) and transfer (postMessage, transferable streams) operations for WebCodecs. However, draw operations should allow implicit conversion so the user agent can choose the most efficient platform specific rendering path. E.g., drawImage(VideoFrame) works the same way it does for drawImage(HTMLVideoElement). In Chrome we will defer the conversion until compositing or may even just hand off the YUV data as an overlay to the platform. |
This has been replied to in #23. It seems that we have agreement that processing on main thread should not be impossible.
This has been responded to in several messages of #29, but here's a summary:
It's not clear to me why this would be needed. I asked for further clarification in #27.
The algorithms are not really needed since the spec is defined in terms of the results the APIs should produce instead of the steps required to produce them. However, since the streams API recommends using them, I'll prepare a PR to use them (without any change in semantics).
Can you elaborate on what is unclear about it? I replied to #24 a while ago and haven't received any extra feedback since them.
Already replied to by Chris in #38 (comment)
Not by default, but yes, if the document reads enough frames and does not close them a camera capturer can suspend producing frames. |
I would phrase it this way:
I added some comments in the thread.
The current spec would be really hard to implement in an interoperable manner.
I added some comments in the thread.
@aboba might clarify things here. My understanding is as follow:
The general question is how much we can reduce this risk and whether APIs could be designed with this in mind. |
I agree with this phrasing.
Are you referring to the streams algorithms or something else specifically?
Can you file specific bugs about those behaviors?
I'll prepare a PR to include those algorithms. Tracked on #36.
I think we should continue this discussion on a separate bug, perhaps on the WebCodecs spec if we agree that WebCodec's VideoFrame is the right API to expose video frames coming from a MediaStreamTrack.
I agree that the goal should be risk reduction since completely eliminating this possibility would negate the goal of optimal WebGPU processing. |
Already answered in #37.
Already answered.
Some working samples:
Not clear to me what this means. Can you file a specific issue with more details about what you mean? Closing this since only a handful of issues raised by this review remain open and it's easier to continue the discussion in their respective github issues. |
This is a review in response to a Call for Review expiring today. I was going to open issues as requested, only to find they mostly exist already — many predating the CFR even — but may be hard to find. So I'm writing this overview instead.
Outstanding design issues I see as blockers:
The other issue is that there seem to be massive missing areas in WebCodecs that we rely on:
There also appears to be a lack of documentation or working samples to the point where any web developer can use it.
This makes it hard to see the big picture or validate whether the overall design addresses the listed use cases (a list that judging by the examples given, does not appear to require interfacing with WebCodecs — is that an omission?)
The text was updated successfully, but these errors were encountered: