(codecId: AVCodecID)
| 531 | |
| 532 | const hardwareEncoderCodecCache = new Map<AVCodecID, Codec | null>(); |
| 533 | export const getHardwareEncoderCodec = (codecId: AVCodecID): Codec | null => { |
| 534 | if (!hardwareEncoderCodecCache.has(codecId)) { |
| 535 | const hw = getHardwareContext(); |
| 536 | hardwareEncoderCodecCache.set(codecId, hw?.getEncoderCodec(codecId) ?? null); |
| 537 | } |
| 538 | return hardwareEncoderCodecCache.get(codecId)!; |
| 539 | }; |
| 540 | |
| 541 | const hardwareDecoderCodecCache = new Map<AVCodecID, Codec | null>(); |
| 542 | export const getHardwareDecoderCodec = (codecId: AVCodecID): Codec | null => { |
no test coverage detected