w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
971 stars 136 forks source link

Provide introspection for VideoFrame types #67

Open sandersdan opened 4 years ago

sandersdan commented 4 years ago

An app should be able to determine the pixel formats that can be used to create a VideoFrame. This could be a static VideoFrame.supportedPixelFormats array, or perhaps a VideoFrame.isSupportedShape() API that allows checking against any size limit also.

chcunningham commented 3 years ago

Editors note: marking 'extension', as this proposes a new non-breaking API.

padenot commented 3 years ago

For now, it's not particularly important because it's YUV420 or nothing (per spec), but as soon as this is extended this becomes fairly important.

chcunningham commented 2 years ago

In recent discussion (https://github.com/w3c/webcodecs/issues/407#issuecomment-974563456) w/ @sandersdan this seemed less important, but we're flexible.

Aside: for VideoFrame specifically, the current (implied) requirement is that all implementers must support construction of VideoFrame's with any VideoPixelFormat. As we add new formats, there will be implementations that are behind the spec, but that is easily discoverable (failed construction). For now we don't see a need to add a VideoFrame.isFormatSupported() type API, but we can fallback to that if needed.

aboba commented 3 months ago

@Djuffin @padenot This issue was opened 3.5 years ago and has not had activity in 2.5 years. Is it obsolete?

Djuffin commented 3 months ago

Yes, let's close on the basis of no activity and https://github.com/w3c/webcodecs/issues/67#issuecomment-981976402