#ifndef DLG_VideoBitrates_H
#define DLG_VideoBitrates_H

#include <QtWidgets/QDialog>
#include "ui_dlg_videobitrates.h"
#include "api/common.h"

class IGetMediaStats {
public:
	virtual const rtc::MediaStats& getMediaStats() = 0;
protected:
	virtual	~IGetMediaStats() { }
};
///
class Dlg_VideoBitrates : public QDialog
{
	Q_OBJECT

public:
	Dlg_VideoBitrates(IGetMediaStats* api, QWidget *parent = 0);
	~Dlg_VideoBitrates();
public:
	void setvbName(const QString& name);
	void setTargetBitrate(int bitrate);
	void start();
	void stop();
protected:
	void initBitratesGraph();

public slots :
	void onTimerOut();

private:
	Ui::dlg_videobitrates ui;
	IGetMediaStats* api_;
	QTimer* timer_;
	int targetbitrate_;
	static int s_xAxis_minute;
};

#endif // DLG_VideoBitrates_H
