mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 11:35:56 +00:00
update:完成mp4录制
This commit is contained in:
parent
661857a63a
commit
f763755e7d
4 changed files with 8 additions and 2 deletions
|
@ -111,7 +111,7 @@ void Dialog::on_stopServerBtn_clicked()
|
|||
{
|
||||
if (m_videoForm) {
|
||||
m_videoForm->close();
|
||||
outLog("stop server...");
|
||||
outLog("stop server");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QWidget>
|
||||
#include <QPointer>
|
||||
#include <QTime>
|
||||
|
||||
#include "server.h"
|
||||
#include "decoder.h"
|
||||
|
@ -77,6 +78,7 @@ private:
|
|||
float m_widthHeightRatio = 0.5f;
|
||||
QPointer<ToolForm> m_toolForm;
|
||||
Recorder* m_recorder = Q_NULLPTR;
|
||||
QTime m_startTimeCount;
|
||||
};
|
||||
|
||||
#endif // VIDEOFORM_H
|
||||
|
|
1
TODO.txt
1
TODO.txt
|
@ -1,4 +1,3 @@
|
|||
mp4录制:server启动时间,翻译
|
||||
横屏防止工具窗口超出屏幕
|
||||
工具栏扩展(模拟点击指定次数等)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue