UNPKG

@yume-chan/scrcpy

Version:
53 lines 1.91 kB
import type { ReadableStream } from "@yume-chan/stream-extra"; import type { ScrcpyOptionValue } from "./types.js"; export declare enum ScrcpyVideoCodecId { H264 = 1748121140, H265 = 1748121141, AV1 = 6387249 } export interface ScrcpyVideoStreamMetadata { deviceName?: string | undefined; width?: number | undefined; height?: number | undefined; codec: ScrcpyVideoCodecId; } export interface ScrcpyVideoStream { readonly stream: ReadableStream<Uint8Array>; readonly metadata: ScrcpyVideoStreamMetadata; } export declare class ScrcpyAudioCodec implements ScrcpyOptionValue { static readonly OPUS: ScrcpyAudioCodec; static readonly AAC: ScrcpyAudioCodec; static readonly FLAC: ScrcpyAudioCodec; static readonly RAW: ScrcpyAudioCodec; readonly optionValue: string; readonly metadataValue: number; readonly mimeType: string; readonly webCodecId: string; constructor(optionValue: string, metadataValue: number, mimeType: string, webCodecId: string); toOptionValue(): string; } export interface ScrcpyAudioStreamDisabledMetadata { readonly type: "disabled"; } export interface ScrcpyAudioStreamErroredMetadata { readonly type: "errored"; } export interface ScrcpyAudioStreamSuccessMetadata { readonly type: "success"; readonly codec: ScrcpyAudioCodec; readonly stream: ReadableStream<Uint8Array>; } export type ScrcpyAudioStreamMetadata = ScrcpyAudioStreamDisabledMetadata | ScrcpyAudioStreamErroredMetadata | ScrcpyAudioStreamSuccessMetadata; export interface ScrcpyMediaStreamConfigurationPacket { type: "configuration"; data: Uint8Array; } export interface ScrcpyMediaStreamDataPacket { type: "data"; keyframe?: boolean; pts?: bigint; data: Uint8Array; } export type ScrcpyMediaStreamPacket = ScrcpyMediaStreamConfigurationPacket | ScrcpyMediaStreamDataPacket; //# sourceMappingURL=codec.d.ts.map