/*! * Copyright (c) 2026-present, Vanilagy and contributors * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { MkvOutputFormat } from '../output-format.js'; import { Output, OutputAudioTrack, OutputSubtitleTrack, OutputTrack, OutputVideoTrack } from '../output.js'; import { SubtitleCue, SubtitleMetadata } from '../subtitles.js'; import { Muxer } from '../muxer.js'; import { EncodedPacket } from '../packet.js'; export declare class MatroskaMuxer extends Muxer { private writer; private ebmlWriter; private format; private trackDatas; private closedTracks; private allTracksKnown; private segment; private segmentInfo; private seekHead; private tracksElement; private tagsElement; private attachmentsElement; private segmentDuration; private cues; private currentClusterBlocks; private currentClusterStartMsTimestamp; private currentClusterMaxMsTimestamp; private endTimestamp; private warnedAboutTooNegativeTimestamp; constructor(output: Output, format: MkvOutputFormat); start(): Promise; private writeEBMLHeader; /** * Creates a SeekHead element which is positioned near the start of the file and allows the media player to seek to * relevant sections more easily. Since we don't know the positions of those sections yet, we'll set them later. */ private maybeCreateSeekHead; private createSegmentInfo; private createTracks; private videoSpecificTrackInfo; private audioSpecificTrackInfo; private subtitleSpecificTrackInfo; private maybeCreateTags; private maybeCreateAttachments; private createSegment; private createCues; private get segmentDataOffset(); private allTracksAreKnown; getMimeType(): Promise; private getVideoTrackData; private getAudioTrackData; private getSubtitleTrackData; addEncodedVideoPacket(track: OutputVideoTrack, packet: EncodedPacket, meta?: EncodedVideoChunkMetadata): Promise; addEncodedAudioPacket(track: OutputAudioTrack, packet: EncodedPacket, meta?: EncodedAudioChunkMetadata): Promise; addSubtitleCue(track: OutputSubtitleTrack, cue: SubtitleCue, meta?: SubtitleMetadata): Promise; private interleaveChunks; /** Converts a read-only external chunk into an internal one for easier use. */ private createInternalChunk; /** Adds a block containing media data to the current cluster. */ private addBlock; /** Writes out the current cluster, if any, and begins a new one. */ private startNewCluster; /** Writes the current cluster with all of its blocks to the file. */ private writeCurrentCluster; private createBlockElement; onTrackClose(track: OutputTrack): Promise; /** Finalizes the file, making it ready for use. Must be called after all media chunks have been added. */ finalize(): Promise; } //# sourceMappingURL=matroska-muxer.d.ts.map