import { ReportStats } from '../type/stats';
import { FunctionWithThis } from '../type/type';
import { StreamCodecOption, StreamDeviceOption } from '../type/BRTCStream';
/**
 * 生成唯一 id
 *
 * @internal
 * @returns id
 */
export declare function generateUUID(): string;
/**
 * 将函数回调转换为 Promise
 *
 * @internal
 * @typeParam T 回调结果类型
 * @typeParam This 函数执行上下文
 * @param fn 回调函数
 * @param args 函数执行参数
 * @param ctx 函数执行上下文
 * @param hasResolve 是否有成功回调
 * @returns 回调结果
 */
export declare function callbackToPromise<T, This>(fn: FunctionWithThis<This>, args: any[], ctx: any, hasResolve?: boolean): Promise<T | void>;
/**
 * 创建 AudioContext
 *
 * @internal
 * @returns AudioContext
 */
export declare function getAudioContext(): AudioContext;
/**
 * 创建 AudioMeter
 *
 * @internal
 * @param audioContext
 * @param clipLevel
 * @param averaging
 * @param clipLag
 * @returns ScriptProcessorNode
 */
export declare function createAudioMeter(audioContext: AudioContext, clipLevel?: number, averaging?: number, clipLag?: number): ScriptProcessorNode;
/**
 * 放置 AudioMeter
 *
 * @internal
 * @param stream
 * @param mediaStream
 */
export declare function createVolumeMeter(stream: any, audioTrack: MediaStreamTrack): void;
/**
 * 解析 vloud 流数据
 *
 * @internal
 * @param streamDeviceOption
 * @param streamCodecOption
 * @returns 解析结果
 */
export declare function parseVloudStreamOptions(streamDeviceOption: StreamDeviceOption, streamCodecOption: StreamCodecOption): Object;
export declare function timestamp(): number;
export declare function resumeContext(): Promise<void>;
export declare function getEmptyVloudStats(): ReportStats;
export declare function timestampMillisecond(diffNTP?: number): number;
