import RiffList from "../riffList"; import { ICodec } from "../../properties"; /** * IDs for an AVI stream types. */ export declare enum AviStreamType { /** Audio Stream */ AudioStream = 1935963489, /** MIDI Stream */ MidiStream = 1919183213, /** Text stream */ TextStream = 1937012852, /** Video stream */ VideoStream = 1935960438 } /** * Base class representing a stream in an AVI file. Provides basic support for parsing a raw AVI * stream list. */ export declare class AviStream { /** * ID of a format chunk. */ static readonly FORMAT_CHUNK_ID = "strf"; /** * ID of a header chunk. */ static readonly HEADER_CHUNK_ID = "strh"; /** * ID of a list chunk. */ static readonly LIST_TYPE = "strl"; private readonly _bottom; private readonly _codec; private readonly _flags; private readonly _handler; private readonly _initialFrames; private readonly _language; private readonly _left; private readonly _length; private readonly _priority; private readonly _quality; private readonly _rate; private readonly _right; private readonly _sampleSize; private readonly _scale; private readonly _start; private readonly _suggestedBufferSize; private readonly _top; private readonly _type; /** * Constructs and initializes a new instance with a specified stream header. * @param list RiffList containing the stream headers */ constructor(list: RiffList); /** * Gets the offset from the bottom of the main movie rectangle where this stream should be * positioned. */ get bottom(): number; /** * Gets the codec information for this stream. */ get codec(): ICodec; /** * Gets any flags for the data stream. */ get flags(): number; /** * Gets an optional FOURCC that identifies a specific data handler. The data handler is the * preferred handler for the stream. For audio/video streams, this specifies the codec for * decoding the stream. */ get handler(): number; /** * Gets how far audio data is skewed ahead of the video frames in an interleaved file. This * value generally 0 for non-interleaved files. */ get initialFrames(): number; /** * Gets the language tag for the stream. */ get language(): number; /** * Gets the offset from the left of the main movie rectangle where this stream should be * positioned. */ get left(): number; /** * Gets the length of the stream. The units are defined by `rate` and `scale` in the main file * header. */ get length(): number; /** * Gets the priority of a stream type. For example, in a file with multiple audio streams, * the one with the highest priority might be the default stream. */ get priority(): number; /** * Gets an indicator of the quality of the data in the stream. Quality is represented as a * number between `0` and `10000`. -1 indicates the default quality values should be used. * @remarks * For compressed data, this typically represents the value of the quality parameter * passed to the compression software. */ get quality(): number; /** * Used with {@link scale} to specify the timescale that this stream will use. * @remarks * Dividing {@link rate} by this gives the number of samples per second. For video * streams, this is the frame rate. For audio streams, this rate corresponds to the time * needed to play {@link RiffWaveFormatEx.blockAlign} bytes of audio. For PCM audio this is * just the sample rate. */ get rate(): number; /** * Gets the offset from the right of the main movie rectangle where this stream should be * positioned. */ get right(): number; /** * Gets the size of a single sample of data. If the sample size varies, this will be `0`. */ get sampleSize(): number; /** * Used with {@link rate} to specify the timescale that this stream will use. * @remarks * Dividing {@link rate} by this gives the number of samples per second. For video * streams, this is the frame rate. For audio streams, this rate corresponds to the time * needed to play `nBlockAlign` bytes of audio. For PCM audio is just the sample rate. */ get scale(): number; /** * Gets the starting time for this stream. The units are defined by `rate` and `scale` in the * main file header. * @remarks * Usually this is zero, but it can specify a delay time for a stream that does not * start concurrently with the file. */ get start(): number; /** * Gets how large of a buffer should be used to read this stream. * @remarks * Typically, this contains a value corresponding to the largest chunk present in the * stream. */ get suggestedSampleSize(): number; /** * Gets the offset from the top of the main movie rectangle where this stream should be * positioned. */ get top(): number; /** * Gets a FOURCC that species the type of data contained in the stream. */ get type(): AviStreamType; }