/// <reference types="node" />
import { EventEmitter } from 'stream';
import { MStreamingPlaylistVideo, MUserId, MVideoLiveVideo } from '../../../types/models';
interface MuxingSessionEvents {
    'master-playlist-created': ({ videoId: number }: {
        videoId: any;
    }) => void;
    'bad-socket-health': ({ videoId: number }: {
        videoId: any;
    }) => void;
    'duration-exceeded': ({ videoId: number }: {
        videoId: any;
    }) => void;
    'quota-exceeded': ({ videoId: number }: {
        videoId: any;
    }) => void;
    'ffmpeg-end': ({ videoId: number }: {
        videoId: any;
    }) => void;
    'ffmpeg-error': ({ sessionId: string }: {
        sessionId: any;
    }) => void;
    'after-cleanup': ({ videoId: number }: {
        videoId: any;
    }) => void;
}
declare interface MuxingSession {
    on<U extends keyof MuxingSessionEvents>(event: U, listener: MuxingSessionEvents[U]): this;
    emit<U extends keyof MuxingSessionEvents>(event: U, ...args: Parameters<MuxingSessionEvents[U]>): boolean;
}
declare class MuxingSession extends EventEmitter {
    private ffmpegCommand;
    private readonly context;
    private readonly user;
    private readonly sessionId;
    private readonly videoLive;
    private readonly streamingPlaylist;
    private readonly inputUrl;
    private readonly fps;
    private readonly allResolutions;
    private readonly bitrate;
    private readonly ratio;
    private readonly videoId;
    private readonly videoUUID;
    private readonly saveReplay;
    private readonly lTags;
    private segmentsToProcessPerPlaylist;
    private tsWatcher;
    private masterWatcher;
    private readonly isAbleToUploadVideoWithCache;
    private readonly hasClientSocketInBadHealthWithCache;
    constructor(options: {
        context: any;
        user: MUserId;
        sessionId: string;
        videoLive: MVideoLiveVideo;
        streamingPlaylist: MStreamingPlaylistVideo;
        inputUrl: string;
        fps: number;
        bitrate: number;
        ratio: number;
        allResolutions: number[];
    });
    runMuxing(): Promise<void>;
    abort(): void;
    destroy(): void;
    private onFFmpegError;
    private onFFmpegEnded;
    private watchMasterFile;
    private watchTSFiles;
    private isQuotaExceeded;
    private createFiles;
    private prepareDirectories;
    private isDurationConstraintValid;
    private processSegments;
    private hasClientSocketInBadHealth;
    private addSegmentToReplay;
}
export { MuxingSession };
//# sourceMappingURL=muxing-session.d.ts.map