UNPKG

mpegts-demuxer

Version:

Demuxes an MPEG Transport Stream into elementary packets.

25 lines 1.46 kB
/// <reference types="node" /> import type { Pmt, Packet } from '../classes'; import { Stream } from '../classes'; export declare function getStream(pids: Map<number, Stream>, pid: number): Stream; export declare function getStreamType(type_id: number): number; export declare function getMediaType(type_id: number): number; export declare function decodeTs(mem: DataView, p: number): number; export declare function decodePat(mem: DataView, startingPtr: number, startingLen: number, pids: Map<number, Stream>, pstart: number): number; export declare function memcpy(dstm: DataView, dstp: number, srcm: DataView, srcp: number, len: number): void; export declare function decodePmt(pmt: Pmt, mem: DataView, startingPtr: number, startingLen: number, pids: Map<number, Stream>, s: Stream, pstart: number): number; export declare function demuxPacket(pmt: Pmt, mem: DataView, startingPtr: number, pids: Map<number, Stream>, cb: (p: Packet) => void, copy: boolean): number; /** * Returns a DataView that is safe, regardless of whether or not the input * Buffer is smaller than the buffer pool size.pool. * * The slicing and dicing is what makes it safe. * * For more information about why this is necessary view: * - https://github.com/tvkitchen/utilities/issues/13 * * @param {Buffer} data [description] * @return {DataView} [description] */ export declare function getSafeDataView(data: Buffer): DataView; //# sourceMappingURL=index.d.ts.map