import { EventEmitter } from 'stream';
import { LocalLivestreamManager } from './LocalLivestreamManager';
import { SnapshotRequest } from 'homebridge';
import { CameraAccessory } from '../accessories/CameraAccessory';
import { ILogObj, Logger } from 'tslog';
/**
 * possible performance settings:
 * 1. snapshots as current as possible (weak homebridge performance)
 *    - always get a new image from cloud or cam
 * 2. balanced
 *    - start snapshot refresh but return snapshot as fast as possible
 *      if request takes too long old snapshot will be returned
 * 3. get an old snapshot immediately
 *    - wait on cloud snapshot with new events
 *
 * extra options:
 *  - force refresh snapshots with interval
 *  - force immediate snapshot-reject when ringing
 *
 * Drawbacks: elapsed time in homekit might be wrong
 */
export declare class SnapshotManager extends EventEmitter {
    private livestreamManager;
    private readonly platform;
    private readonly device;
    private cameraConfig;
    private readonly videoProcessor;
    private currentSnapshot?;
    private blackSnapshot?;
    private cameraOffline?;
    private cameraDisabled?;
    private unavailableSnapshot?;
    private refreshProcessRunning;
    private lastEvent;
    private lastRingEvent;
    readonly log: Logger<ILogObj>;
    private snapshotRefreshTimer?;
    constructor(camera: CameraAccessory, livestreamManager: LocalLivestreamManager);
    private onRingEvent;
    private onEvent;
    private storeSnapshotForCache;
    getSnapshotBufferResized(request: SnapshotRequest): Promise<Buffer>;
    private getSnapshotBuffer;
    /**
     * Retrieves the newest snapshot buffer asynchronously.
     * @returns A Promise resolving to a Buffer containing the newest snapshot image.
     */
    private getSnapshotFromStream;
    /**
     * Retrieves the newest cloud snapshot's image data.
     * @returns Buffer The image data as a Buffer.
     * @throws Error if there's no currentSnapshot available.
     */
    private getSnapshotFromCache;
    private getBalancedSnapshot;
    private automaticSnapshotRefresh;
    private storeImage;
    private onPropertyValueChanged;
    private fetchCurrentCameraSnapshot;
    private getCurrentCameraSnapshot;
    private getCameraSource;
    private resizeSnapshot;
}
//# sourceMappingURL=SnapshotManager.d.ts.map