import BaseObject from "./baseObject"; import UuidWrapper from "../../uuidWrapper"; import { ByteVector } from "../../byteVector"; import { ObjectType } from "../constants"; import { File } from "../../file"; import { ICodec } from "../../properties"; /** * This class provides a representation of an ASF properties object which can be read from and * written to disk. */ export default class StreamPropertiesObject extends BaseObject { private _codec; private _errorCorrectionData; private _errorCorrectionType; private _flags; private _reserved; private _streamType; private _timeOffset; private _typeSpecificData; private constructor(); /** * Constructs and initializes a new instance by reading contents from a specified position in * the provided file. * @param file File from which the contents of the new instance will be read * @param position Index into the file where the stream properties object begins */ static fromFile(file: File, position: number): StreamPropertiesObject; /** * Gets the codec information contained in the current instance. */ get codec(): ICodec; /** * Gets the error correction data contained in the current instance. */ get errorCorrectionData(): ByteVector; /** * Gets the error correction type GUID of the current instance. */ get errorCorrectionType(): UuidWrapper; /** * Gets the flags that apply to the current instance. * @remarks * The `flags` field a 16-bit, double word, defined as follows: * * LSB * * Stream number - 7 bits * * Reserved - 8 bits * * Encrypted content flag - 1 bit */ get flags(): number; /** @inheritDoc */ get objectType(): ObjectType; /** * Gets the stream number for the current instance. Zero is invalid. */ get streamNumber(): number; /** * Gets the stream type GUID of the current instance. */ get streamType(): UuidWrapper; /** * Gets the time offset at which the stream described by the current instance begins. */ get timeOffsetMilliseconds(): number; /** * Gets the type specific data contained in the current instance. * @remarks The parsed version of this data is available in {@link codec}. */ get typeSpecificData(): ByteVector; /** @inheritDoc */ render(): ByteVector; }