From 936a9cb6c89c4cc98562d3f3e3c06c2c2a79d3b0 Mon Sep 17 00:00:00 2001 From: Barry <870709864@qq.com> Date: Sun, 27 Jan 2019 14:01:03 +0800 Subject: [PATCH] =?UTF-8?q?update:=E5=AE=8C=E6=88=90mp4=E5=BD=95=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QtScrcpy/dialog.cpp | 2 +- QtScrcpy/videoform.cpp | 5 +++++ QtScrcpy/videoform.h | 2 ++ TODO.txt | 1 - 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/QtScrcpy/dialog.cpp b/QtScrcpy/dialog.cpp index 6cc509e..f777671 100644 --- a/QtScrcpy/dialog.cpp +++ b/QtScrcpy/dialog.cpp @@ -111,7 +111,7 @@ void Dialog::on_stopServerBtn_clicked() { if (m_videoForm) { m_videoForm->close(); - outLog("stop server..."); + outLog("stop server"); } } diff --git a/QtScrcpy/videoform.cpp b/QtScrcpy/videoform.cpp index 0cc4823..97fa78f 100644 --- a/QtScrcpy/videoform.cpp +++ b/QtScrcpy/videoform.cpp @@ -41,6 +41,7 @@ VideoForm::VideoForm(const QString& serial, quint16 maxSize, quint32 bitRate, co // fix: macos cant recv finished signel, timer is ok QTimer::singleShot(0, this, [this](){ + m_startTimeCount.start(); // max size support 480p 720p 1080p 设备原生分辨率 // support wireless connect, example: //m_server->start("192.168.0.174:5555", 27183, m_maxSize, m_bitRate, ""); @@ -132,6 +133,10 @@ void VideoForm::initSignals() connect(m_server, &Server::connectToResult, this, [this](bool success, const QString &deviceName, const QSize &size){ if (success) { + float diff = m_startTimeCount.elapsed() / 1000.0f; + qInfo(QString("server start finish in %1s").arg(diff).toStdString().c_str()); + + // update ui setWindowTitle(deviceName); updateShowSize(size); diff --git a/QtScrcpy/videoform.h b/QtScrcpy/videoform.h index 1ef4444..49b49ef 100644 --- a/QtScrcpy/videoform.h +++ b/QtScrcpy/videoform.h @@ -3,6 +3,7 @@ #include #include +#include #include "server.h" #include "decoder.h" @@ -77,6 +78,7 @@ private: float m_widthHeightRatio = 0.5f; QPointer m_toolForm; Recorder* m_recorder = Q_NULLPTR; + QTime m_startTimeCount; }; #endif // VIDEOFORM_H diff --git a/TODO.txt b/TODO.txt index 2ea2e95..94b3cb6 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,4 +1,3 @@ -mp4Â¼ÖÆ£ºserverÆô¶¯Ê±¼ä£¬·­Òë ºáÆÁ·ÀÖ¹¹¤¾ß´°¿Ú³¬³öÆÁÄ» ¹¤¾ßÀ¸À©Õ¹£¨Ä£Äâµã»÷Ö¸¶¨´ÎÊýµÈ£©