Skip to content
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 a TexImageSource. #3288

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

dalecurtis
Copy link
Contributor

Adding VideoFrame as a TexImageSource allows texImage*() methods to
interoperate with VideoFrames. VideoFrames work with texImage*() the
same way the existing point-in-time capture for HTMLVideoElement does.

This adds a non-normative reference on the WebCodecs spec for the
VideoFrame interface and associated properties to accomplish this.

Note: VideoFrame objects are always same-origin, so I did not add
any text around origin restrictions for video frames.

https://www.w3.org/TR/webcodecs/#videoframe-interface

Bug: w3c/webcodecs#158

Adding VideoFrame as a TexImageSource allows texImage*() methods to
interoperate with VideoFrames. VideoFrames work with texImage*() the
same way the existing point-in-time capture for HTMLVideoElement does.

This adds a non-normative reference on the WebCodecs spec for the
VideoFrame interface and associated properties to accomplish this.

Note: VideoFrame objects are always same-origin, so I did not add
any text around origin restrictions for video frames.

https://www.w3.org/TR/webcodecs/#videoframe-interface

Bug: w3c/webcodecs#158
Copy link
Member

@kenrussell kenrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

Could you please add a reference at the bottom of the "references" section (maybe you intended to do this; the pull request description indicates so) and cite it at the first mention of VideoFrame in the spec?

@dalecurtis
Copy link
Contributor Author

Whoops, done!

@dalecurtis dalecurtis requested a review from kenrussell June 3, 2021 00:49
Copy link
Member

@kenrussell kenrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Let us discuss this at the WebGL working group meeting tomorrow before merging.

@kdashg kdashg merged commit bd18b05 into KhronosGroup:master Jun 3, 2021
chcunningham added a commit to chcunningham/WebGL that referenced this pull request Aug 12, 2021
Keeping in sync with webgl.idl change from KhronosGroup#3288
kdashg pushed a commit that referenced this pull request Aug 12, 2021
Keeping in sync with webgl.idl change from #3288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants