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Æô¶¯Ê±¼ä£¬·­Òë ºáÆÁ·ÀÖ¹¹¤¾ß´°¿Ú³¬³öÆÁÄ» ¹¤¾ßÀ¸À©Õ¹£¨Ä£Äâµã»÷Ö¸¶¨´ÎÊýµÈ£©