import IOggCodec from "./codecs/iOggCodec"; import OggPage from "./oggPage"; import { ByteVector } from "../byteVector"; /** * This class accepts a sequence of pages belonging to a single logical bitstream, processes them, * and extracts the tagging and media information. */ export default class OggBitStream { private readonly _codec; private readonly _firstAbsoluteGranularPosition; private _previousPacket; /** * Constructs and initializes a new instance capable of processing a specified page. * @param page Page of the stream to be processed by the new instance */ constructor(page: OggPage); /** * Gets the codec object used to interpret the stream represented by the current instance. */ get codec(): IOggCodec; /** * Reads the next logical page in the stream. * @param page Next logical page in the stream * @returns * `true` if the codec has read all the necessary packets in the stream. * `false` otherwise */ readPage(page: OggPage): boolean; /** * Sets the duration of the stream using the first granular position of the stream and the last * granular position of the stream. * @internal */ setDuration(lastAbsoluteGranularPosition: ByteVector): void; }