Improve call buffering, CM handle lifecycle and radio PTT controls
This commit is contained in:
1 parent
752c1f140c
commit
2d21c53b4b
55 files changed
+2060
-496
No files matched your search
@@ -137,7 +137,7 @@ static QWidget* wrapWithCaption(QWidget* btn, const QString& caption, QLabel** c
|
||||
CallWindow::CallWindow(QWidget* parent)
|
||||
: QWidget(parent, Qt::Window) {
|
||||
setWindowTitle(QStringLiteral("Звонок"));
|
||||
setFixedSize(340, 400);
|
||||
setFixedSize(360, 480);
|
||||
setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
m_avatarLabel = new QLabel(this);
|
||||
@@ -161,6 +161,11 @@ CallWindow::CallWindow(QWidget* parent)
|
||||
m_bgpPathLabel->setWordWrap(true);
|
||||
m_bgpPathLabel->setStyleSheet("color: gray; font-size: 11px;");
|
||||
m_bgpPathLabel->hide();
|
||||
m_statsLabel = new QLabel(this);
|
||||
m_statsLabel->setAlignment(Qt::AlignCenter);
|
||||
m_statsLabel->setWordWrap(true);
|
||||
m_statsLabel->setStyleSheet("color: gray; font-size: 11px;");
|
||||
m_statsLabel->hide();
|
||||
|
||||
m_acceptBtn = makeRoundBtn(makeRoundIcon(QColor("#27ae60"), Glyph::Phone, 96), QStringLiteral("Принять"), this);
|
||||
m_declineBtn = makeRoundBtn(makeRoundIcon(QColor("#e74c3c"), Glyph::PhoneDown, 96), QStringLiteral("Отклонить"), this);
|
||||
@@ -181,6 +186,7 @@ CallWindow::CallWindow(QWidget* parent)
|
||||
lay->addWidget(m_statusLabel);
|
||||
lay->addWidget(m_durationLabel);
|
||||
lay->addWidget(m_bgpPathLabel);
|
||||
lay->addWidget(m_statsLabel);
|
||||
lay->addStretch(1);
|
||||
|
||||
m_acceptCell = wrapWithCaption(m_acceptBtn, QStringLiteral("Принять"));
|
||||
@@ -332,3 +338,13 @@ void CallWindow::updateDuration() {
|
||||
.arg(s / 60, 2, 10, QChar('0'))
|
||||
.arg(s % 60, 2, 10, QChar('0')));
|
||||
}
|
||||
|
||||
void CallWindow::setAudioStats(int rtt, int buffer, int tempo, int dropped, int underruns,
|
||||
int minimum, int maximum, int reserve) {
|
||||
m_statsLabel->setText(QStringLiteral("Буфер: %1 мс · Запас: %2 мс\n"
|
||||
"За 10 с: минимум %3 · максимум %4 мс\n"
|
||||
"Скорость: %5× · RTT: %6 мс\nПотери буфера: %7 · Недостачи: %8")
|
||||
.arg(buffer).arg(reserve).arg(minimum).arg(maximum)
|
||||
.arg(tempo / 100.0, 0, 'f', 2).arg(rtt).arg(dropped).arg(underruns));
|
||||
m_statsLabel->show();
|
||||
}
|
||||
Reference in new issue
Block a user