MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / getCachedGpuEncoder

Function getCachedGpuEncoder

packages/engine/src/utils/gpuEncoder.ts:86–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 3

spawnStreamingEncoderFunction · 0.85
encodeFramesFromDirFunction · 0.85

Calls 1

detectGpuEncoderFunction · 0.85

Tested by

no test coverage detected