MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / getHardwareContext

Function getHardwareContext

src/misc.ts:525–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

523
524let cachedHardwareContext: HardwareContext | null | undefined = undefined;
525export const getHardwareContext = (): HardwareContext | null => {
526 if (cachedHardwareContext === undefined) {
527 cachedHardwareContext = HardwareContext.auto();
528 }
529 return cachedHardwareContext;
530};
531
532const hardwareEncoderCodecCache = new Map<AVCodecID, Codec | null>();
533export const getHardwareEncoderCodec = (codecId: AVCodecID): Codec | null => {

Callers 2

getHardwareEncoderCodecFunction · 0.85
getHardwareDecoderCodecFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected