Skip to content

Determine GPUExternalTexture lifetime #2124

Closed
@Kangz

Description

@Kangz

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions