From 6f95664ca1921730474a6c8ec26b4e98bbce72fc Mon Sep 17 00:00:00 2001 From: Apex Liu Date: Tue, 10 Sep 2019 02:39:08 +0800 Subject: [PATCH] .temp. --- client/tp-player/main.cpp | 3 +++ client/tp-player/thr_play.cpp | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/client/tp-player/main.cpp b/client/tp-player/main.cpp index 23849ce..b7b993e 100644 --- a/client/tp-player/main.cpp +++ b/client/tp-player/main.cpp @@ -1,6 +1,9 @@ #include "mainwindow.h" #include +// 编译出来的可执行程序复制到单独目录,然后执行 windeployqt 应用程序文件名 +// 即可自动将依赖的动态库等复制到此目录中。有些文件是多余的,可以酌情删除。 + int main(int argc, char *argv[]) { //#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) diff --git a/client/tp-player/thr_play.cpp b/client/tp-player/thr_play.cpp index 9cc820f..c40e7c6 100644 --- a/client/tp-player/thr_play.cpp +++ b/client/tp-player/thr_play.cpp @@ -1,13 +1,12 @@ -#include +#include +#include #include +#include #include #include "thr_play.h" #include "record_format.h" -static QString REPLAY_PATH = "E:\\work\\tp4a\\teleport\\server\\share\\replay\\rdp\\000000197\\"; - - ThreadPlay::ThreadPlay() { m_need_stop = false; @@ -23,11 +22,16 @@ void ThreadPlay::run() { sleep(1); + + QString currentPath = QCoreApplication::applicationDirPath() + "/testdata/"; + qint64 read_len = 0; uint32_t total_pkg = 0; uint32_t total_ms = 0; - QString hdr_filename(REPLAY_PATH); + // 加载录像基本信息数据 + + QString hdr_filename(currentPath); hdr_filename += "tp-rdp.tpr"; QFile f_hdr(hdr_filename); @@ -54,9 +58,9 @@ void ThreadPlay::run() { emit signal_update_data(dat); } + // 加载录像文件数据 - - QString dat_filename(REPLAY_PATH); + QString dat_filename(currentPath); dat_filename += "tp-rdp.dat"; QFile f_dat(dat_filename);