-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Description
It is important that importExternalTexture works with the ubiquitous HTMLVideoElement as it does today in the spec. However for browsers that implement WebCodec we should also be able to import VideoFrame as GPUExternalTexture. Since the API will take a VideoFrame, it will simply not possible to use it when WebCodec isn't present since you wouldn't be able to create a VideoFrame.
I think the only change in the API needed is the following:
dictionary GPUExternalTextureDescriptor : GPUObjectDescriptorBase {
- required HTMLVideoElement source;
+ required (HTMLVideoElement | VideoFrame) source;
// ...
};Then we also need to specify what's the lifetime of the resulting GPUExternalTexture. Is it destroyed on VideoFrame.close()?
FYI @shaoboyan
[EDIT by @kainino0x]: Investigation: #1380