import FullBox from "./fullBox"; import Mpeg4BoxHeader from "../mpeg4BoxHeader"; import { ByteVector } from "../../byteVector"; import { File } from "../../file"; /** * This class extends {@link FullBox} to provide an implementation of an Apple * ElementaryStreamDescriptor. This box may appear as a child of a {@link IsoAudioSampleEntry} and * provided further information about an audio stream. */ export default class AppleElementaryStreamDescriptor extends FullBox { private _dependsOnEsId; private _streamDependenceFlag; private _ocrStreamFlag; private _ocrEsId; private _urlFlag; private _urlLength; private _urlString; private _upStream; private _maximumBitrate; private _averageBitrate; private _streamId; private _streamPriority; private _objectTypeId; private _streamType; private _bufferSizeDB; private _decoderConfig; /** * Private constructor to force construction via static functions. */ private constructor(); /** * Constructs and initializes a new instance of {@link AppleElementaryStreamDescriptor} with a provided * header and handler by reading the contents from a specified file. * @param header A {@link Mpeg4BoxHeader} object containing the header to use for the new instance. * @param file A {@link File} object to read the contents of the box from. * @param handlerType Type of the handler box object containing the handler that applies to the * new instance, or undefined if no handler applies. */ static fromFile(header: Mpeg4BoxHeader, file: File, handlerType: ByteVector): AppleElementaryStreamDescriptor; /** * Gets the maximum average the stream described by the current instance. */ get averageBitrate(): number; /** * Gets the buffer size DB value the stream described by the current instance. */ get bufferSizeDB(): number; /** * Gets the decoder config data of stream described by the current instance. */ get decoderConfig(): ByteVector; /** * Gets the ES_ID of another elementary stream on which this elementary stream depends */ get dependsOnEsId(): number; /** * Gets the maximum bitrate the stream described by the current instance. */ get maximumBitrate(): number; /** * Gets the object type ID of the stream described by the current instance. */ get objectTypeId(): number; /** * Gets the OCR ES_ID */ get ocrEsId(): number; /** * Gets the OCR Stream Flag */ get ocrStreamFlag(): boolean; /** * Gets a value indicating that a dependsOn_ES_ID will follow */ get streamDependenceFlag(): boolean; /** * Gets the ID of the stream described by the current instance. */ get streamId(): number; /** * Gets the type of stream described by the current instance. */ get streamType(): number; /** * Gets the priority of the stream described by the current instance. */ get streamPriority(): number; /** * Gets a value indicating that this stream is used for upstream information */ get upStream(): boolean; /** * Gets a value indicating that a URL string will follow */ get urlFlag(): boolean; /** * Gets the length of URL String */ get urlLength(): number; /** * Gets the URL string that points to the location of an SL-packetized stream by name. */ get urlString(): string; private static calculateBitRate; }