From d296ac60bbf10ae691af5be445fac95f998f1cf1 Mon Sep 17 00:00:00 2001 From: Erik Zandvliet Date: Tue, 7 Apr 2015 14:39:39 +0200 Subject: [PATCH] Fixed folder support --- CMakeLists.txt | 9 +++++++-- src/output/output_http_internal.cpp | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 304f7e2e..fec5c3e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,8 +253,13 @@ install( # MistServer - Inputs # ######################################## macro(makeInput inputName format) + if (";${ARGN};" MATCHES ";folder;") + set(mainScript src/input/mist_in_folder.cpp) + else() + set(mainScript src/input/mist_in.cpp) + endif() add_executable(MistIn${inputName} - src/input/mist_in.cpp + ${mainScript} src/input/input.cpp src/input/input_${format}.cpp src/io.cpp @@ -279,7 +284,7 @@ makeInput(Buffer buffer) makeInput(ISMV ismv)#LTS makeInput(MP4 mp4)#LTS makeInput(TS ts)#LTS -makeInput(Folder folder)#LTS +makeInput(Folder folder folder)#LTS ######################################## # MistServer - Outputs # diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index dfc1eb2b..ad8ca03a 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -271,7 +271,9 @@ namespace Mist { configLock.post(); //Stream metadata not found - attempt to start it if (Util::startInput(streamName)){ - streamIndex.init(streamName, DEFAULT_META_PAGE_SIZE); + char streamPageName[NAME_BUFFER_SIZE]; + snprintf(streamPageName, NAME_BUFFER_SIZE, SHM_STREAM_INDEX, streamName.c_str()); + streamIndex.init(streamPageName, DEFAULT_META_PAGE_SIZE); if (streamIndex.mapped){ metaLock = true; metaLocker.wait();