update:完成mp4录制

This commit is contained in:
Barry 2019-01-27 14:01:03 +08:00
commit f763755e7d
4 changed files with 8 additions and 2 deletions

View file

@ -111,7 +111,7 @@ void Dialog::on_stopServerBtn_clicked()
{ {
if (m_videoForm) { if (m_videoForm) {
m_videoForm->close(); m_videoForm->close();
outLog("stop server..."); outLog("stop server");
} }
} }

View file

@ -41,6 +41,7 @@ VideoForm::VideoForm(const QString& serial, quint16 maxSize, quint32 bitRate, co
// fix: macos cant recv finished signel, timer is ok // fix: macos cant recv finished signel, timer is ok
QTimer::singleShot(0, this, [this](){ QTimer::singleShot(0, this, [this](){
m_startTimeCount.start();
// max size support 480p 720p 1080p 设备原生分辨率 // max size support 480p 720p 1080p 设备原生分辨率
// support wireless connect, example: // support wireless connect, example:
//m_server->start("192.168.0.174:5555", 27183, m_maxSize, m_bitRate, ""); //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){ connect(m_server, &Server::connectToResult, this, [this](bool success, const QString &deviceName, const QSize &size){
if (success) { if (success) {
float diff = m_startTimeCount.elapsed() / 1000.0f;
qInfo(QString("server start finish in %1s").arg(diff).toStdString().c_str());
// update ui // update ui
setWindowTitle(deviceName); setWindowTitle(deviceName);
updateShowSize(size); updateShowSize(size);

View file

@ -3,6 +3,7 @@
#include <QWidget> #include <QWidget>
#include <QPointer> #include <QPointer>
#include <QTime>
#include "server.h" #include "server.h"
#include "decoder.h" #include "decoder.h"
@ -77,6 +78,7 @@ private:
float m_widthHeightRatio = 0.5f; float m_widthHeightRatio = 0.5f;
QPointer<ToolForm> m_toolForm; QPointer<ToolForm> m_toolForm;
Recorder* m_recorder = Q_NULLPTR; Recorder* m_recorder = Q_NULLPTR;
QTime m_startTimeCount;
}; };
#endif // VIDEOFORM_H #endif // VIDEOFORM_H

View file

@ -1,4 +1,3 @@
mp4录制server启动时间翻译
横屏防止工具窗口超出屏幕 横屏防止工具窗口超出屏幕
工具栏扩展(模拟点击指定次数等) 工具栏扩展(模拟点击指定次数等)