import IOggCodec from "./codecs/iOggCodec"; import OggPage from "./oggPage"; import XiphComment from "../xiph/xiphComment"; /** * This class accepts a sequence of pages for a single Ogg stream, accepts changes, and produces a * new sequence of pages to write to disk. */ export default class OggPaginator { private readonly _packets; private _codec; private _firstPageHeader; private _pagesRead; /** * Constructs and initializes a new instance for a given codec. * @param codec Object to use when processing packets. */ constructor(codec: IOggCodec); /** * Adds the next page to the current instance. * @param page The next page found in the stream */ addPage(page: OggPage): void; /** * Repaginates the pages passed into the current instance to handle changes made to the Xiph * comment. */ paginate(): { change: number; pages: OggPage[]; }; /** * Writes a Xiph comment in the codec-specific comment packet. * @param comment Comment to store in the comment packet. */ writeComment(comment: XiphComment): void; private static getLacingValueLength; }