//
//  YCKCallStatus.h
//  YCKit
//
//  Created by 徐家骏 on 2019/11/19.
//  Copyright © 2019 徐家骏. All rights reserved.
//

#pragma once
#ifdef SDK_SIMPLE_INCLUDE
#include "common.h"
#include "YCKitExport.h"
#else
#include <YCKSdwan/common.h>
#include <YCKit/YCKitExport.h>
#endif

class YCKCallStatus {
public:
    YCKCallStatus();
	DLL_DECL int getNetworkQuality();
	int calculateNetworkQuality();

public:
    PROPERTY(nonatomic) int trafficIn;
    PROPERTY(nonatomic) int trafficOut;
    PROPERTY(nonatomic) int bandwidthDown;
    PROPERTY(nonatomic) int bandwidthUp;
    PROPERTY(nonatomic) int RTT;
    PROPERTY(nonatomic) int repairRate;
    PROPERTY(nonatomic) int audioQuality;
    PROPERTY(nonatomic) int voiceRatio;
    PROPERTY(nonatomic) BOOL denoiseOn;
	PROPERTY(nonatomic) int  jitterCount;
	PROPERTY(nonatomic) int  lossRateDown;
	PROPERTY(nonatomic) int  lossRateUp;
	PROPERTY(nonatomic) int  jitterBufferLossRate;
	PROPERTY(nonatomic) int networkReachable;
	PROPERTY(nonatomic) int liveDelaytime;

protected:
	int quality = -1;

public:
	int	local_rtt;
	int local_loss;
	int64_t last_bd_up_available = -1;
};

/*
 nack统计信息
 relay相关信息
 */
