-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add WebCodecs VideoFrame as CanvasImageSource. #6589
Conversation
source
Outdated
|
||
<ol> | ||
<li><p>Resolve <var>p</var> with <var>imageBitmap</var>.</p></li> | ||
</ol> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this based on existing language? You cannot really resolve something without queuing a task if you're in parallel. It's also unclear why this needs to go in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just based on the existing language. All the others said this in some form, so I cloned it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annevk did you want any changes here? Since this is existing language it seems like a separate cleanup CL would be a better place for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay.
By the way, does a |
Yes, VideoFrames are required to be same origin. |
cc @whatwg/canvas |
Excited to see this being added to the spec! It'll be a more performant code path than drawing HTMLVideoElement to a canvas. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adding VideoFrame as a CanvasImageSource allows drawImage(), createImageBitmap(), and texImage() to interoperate with VideoFrames. VideoFrames are effectively the same as the existing point-in-time capture done for HTMLVideoElement on each of these interfaces. This adds a non-normative reference on the WebCodecs spec for the VideoFrame interface and associated properties to accomplish this. Bug: w3c/webcodecs#158
80a1803
to
5252782
Compare
I pushed some nits and thought this was ready to land, but https://w3c.github.io/webcodecs/#dom-videoframe-display-width-slot does not match the name in this PR (same for the other slot). This is also the first time I'm seeing slots with spaces in them. |
Whoops, fixed up the names, hopefully the spaces work out okay. If not @chcunningham in case that's a style issue. |
I'll let @domenic make a call on that. @dalecurtis you need to join the googlers organization and make your membership public to satisfy the IPR bot. |
I have no problem with spaces in internal slots. (Besides my eternal slight regret for introducing |
@annevk the membership should be public now. Thanks! |
@dalecurtis when I go to your profile I see google, but not googlers. Only the latter works for WHATWG IPR. |
Huh, TIL, that's confusing. I've figured out what that is and have joined accordingly. |
Thanks everyone! |
Adding VideoFrame as a CanvasImageSource allows drawImage(),
createImageBitmap(), and texImage() to interoperate with VideoFrames.
VideoFrames are effectively the same as the existing point-in-time
capture done for HTMLVideoElement on each of these interfaces.
This adds a non-normative reference on the WebCodecs spec for the
VideoFrame interface and associated properties to accomplish this.
Bug: w3c/webcodecs#158
/canvas.html ( diff )
/imagebitmap-and-animations.html ( diff )
/infrastructure.html ( diff )
/references.html ( diff )