From aaab52c94f76d4b9d3072f45e8aad33abf7df1fe Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Fri, 27 Dec 2019 12:15:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=B9=E7=9B=AE=E5=BD=95ht?= =?UTF-8?q?tpRoot=E6=94=B9=E6=88=90www=EF=BC=8C=E5=B9=B6=E4=B8=94=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A4=8D=E5=88=B6=E5=88=B0=E7=9B=B8=E5=BA=94=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 4 ++++ conf/config.ini | 8 ++++---- src/Common/config.cpp | 6 +++--- www/index.html | 8 ++++++++ 4 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 www/index.html diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b2baa92..a76876e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,6 +188,10 @@ elseif(NOT ANDROID OR IOS) list(APPEND LINK_LIB_LIST pthread) endif () +#复制文件过来 +execute_process(COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/www ${EXECUTABLE_OUTPUT_PATH}/) +execute_process(COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/conf/config.ini ${EXECUTABLE_OUTPUT_PATH}/) + #添加c库 add_subdirectory(api) diff --git a/conf/config.ini b/conf/config.ini index a7588b80..7e4e3029 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -16,7 +16,7 @@ log=./ffmpeg/ffmpeg.log [general] #是否启用虚拟主机 -enableVhost=1 +enableVhost=0 #播放器或推流器在断开后会触发hook.on_flow_report事件(使用多少流量事件), #flowThreshold参数控制触发hook.on_flow_report事件阈值,使用流量超过该阈值后才触发,单位KB flowThreshold=1024 @@ -48,7 +48,7 @@ publishToMP4=0 fileBufSize=65536 #hls保存文件路径 #可以为相对(相对于本可执行程序目录)或绝对路径 -filePath=./httpRoot +filePath=./www #hls最大切片时间 segDur=2 #m3u8索引中,hls保留切片个数(实际保留切片个数大2~3个) @@ -104,7 +104,7 @@ notFound=404 Not Found404 Not Found" @@ -246,7 +246,7 @@ onceToken token([](){ mINI::Instance()[kAppName] = "record"; mINI::Instance()[kSampleMS] = 500; mINI::Instance()[kFileSecond] = 60*60; - mINI::Instance()[kFilePath] = "./httpRoot"; + mINI::Instance()[kFilePath] = "./www"; mINI::Instance()[kFileBufSize] = 64 * 1024; mINI::Instance()[kFastStart] = false; mINI::Instance()[kFileRepeat] = false; @@ -272,7 +272,7 @@ onceToken token([](){ mINI::Instance()[kSegmentNum] = 3; mINI::Instance()[kSegmentRetain] = 5; mINI::Instance()[kFileBufSize] = 64 * 1024; - mINI::Instance()[kFilePath] = "./httpRoot"; + mINI::Instance()[kFilePath] = "./www"; },nullptr); } //namespace Hls diff --git a/www/index.html b/www/index.html new file mode 100644 index 00000000..964500e1 --- /dev/null +++ b/www/index.html @@ -0,0 +1,8 @@ + +欢迎使用ZLMediaKit + +

欢迎使用ZLMediaKit,请阅读wiki 获取更多帮助!

+
+
ZLMediaKit
+ + \ No newline at end of file