()
| 84 | let cachedGpuEncoder: GpuEncoder | undefined = undefined; |
| 85 | |
| 86 | export async function getCachedGpuEncoder(): Promise<GpuEncoder> { |
| 87 | if (cachedGpuEncoder === undefined) { |
| 88 | cachedGpuEncoder = await detectGpuEncoder(); |
| 89 | } |
| 90 | return cachedGpuEncoder; |
| 91 | } |
| 92 | |
| 93 | export function getGpuEncoderName(encoder: GpuEncoder, codec: "h264" | "h265"): string { |
| 94 | if (!encoder) return codec === "h264" ? "libx264" : "libx265"; |
no test coverage detected