frameflow
Version:
Audio/Video stream processing library for JavaScript world
21 lines (20 loc) • 746 B
TypeScript
/// <reference types="dom-webcodecs" />
import { StreamMetadata } from "./types/graph";
interface DataFormatMap {
pixel: {
ff: string;
web: VideoPixelFormat;
}[];
sample: {
ff: string;
web: AudioSampleFormat;
}[];
}
export declare const dataFormatMap: DataFormatMap;
export declare function formatFF2Web<T extends 'pixel' | 'sample'>(type: T, format: string): typeof dataFormatMap[T][0]['web'];
export declare function formatWeb2FF<T extends 'pixel' | 'sample'>(type: T, format: typeof dataFormatMap[T][0]['web']): string;
interface StreamArgs {
frameRate?: number;
}
export declare function webFrameToStreamMetadata(frame: VideoFrame | AudioData, args: StreamArgs): StreamMetadata;
export {};