import RiffList from "../riffList"; import { AviStream } from "./aviStream"; import { ICodec } from "../../properties"; /** * This class represents the headers in an AVI file. */ export default class AviHeader { /** * ID of the chunk in the header list that contains the header data. */ static readonly HEADER_CHUNK_ID = "avih"; /** * Type of the list that stores an AVI header */ static readonly HEADER_LIST_TYPE = "hdrl"; private readonly _codecs; private readonly _durationMilliseconds; private readonly _flags; private readonly _height; private readonly _initialFrames; private readonly _maxBytesPerSecond; private readonly _microsecondsPerFrame; private readonly _streamCount; private readonly _streams; private readonly _suggestedBufferSize; private readonly _totalFrames; private readonly _width; /** * Constructs and initializes a new instance by reading information from a RIFF list. * @param list List containing the data for the AVI headers */ constructor(list: RiffList); /** * Gets the codecs read from the header list. */ get codecs(): ICodec[]; /** * Gets the duration of the media in this file, in milliseconds. */ get durationMilliseconds(): number; /** * Gets the file flags. */ get flags(): number; /** * Gets the height of the video in the file, in pixels. */ get height(): number; /** * Gets how far ahead audio is from video. */ get initialFrames(): number; /** * Gets the maximum number of bytes per second. */ get maxBytesPerSecond(): number; /** * Gets the number of microseconds per frame. */ get microsecondsPerFrame(): number; /** * Gets the suggested buffer size for the file, in bytes. */ get suggestedBufferSize(): number; /** * Gets the number of frames in the file. */ get totalFrames(): number; /** * Gets the width of the video in the file, in pixels. */ get width(): number; /** * Gets the total number of streams in the current instance, including ones that are not * supported by this library. */ get streamCount(): number; /** * Gets the (supported) streams that were read from the header list. * @remarks Any modifications made to this list will not be reflected. */ get streams(): AviStream[]; }