更该配置项名称

This commit is contained in:
xzl 2017-04-13 17:38:25 +08:00
parent e2ce16c70b
commit 84da660754
3 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ namespace MediaFile {
MediaRecorder::MediaRecorder(const string &strApp,const string &strId,const std::shared_ptr<PlayerBase> &pPlayer) { MediaRecorder::MediaRecorder(const string &strApp,const string &strId,const std::shared_ptr<PlayerBase> &pPlayer) {
#ifdef ENABLE_MEDIAFILE #ifdef ENABLE_MEDIAFILE
static string hlsPrefix = mINI::Instance()[Config::Hls::kHttpPrefix]; static string hlsPrefix = mINI::Instance()[Config::Http::kHttpPrefix];
static string hlsPath = mINI::Instance()[Config::Hls::kFilePath]; static string hlsPath = mINI::Instance()[Config::Hls::kFilePath];
static uint32_t hlsBufSize = mINI::Instance()[Config::Hls::kFileBufSize].as<uint32_t>(); static uint32_t hlsBufSize = mINI::Instance()[Config::Hls::kFileBufSize].as<uint32_t>();
static uint32_t hlsDuration = mINI::Instance()[Config::Hls::kSegmentDuration].as<uint32_t>(); static uint32_t hlsDuration = mINI::Instance()[Config::Hls::kSegmentDuration].as<uint32_t>();

View File

@ -77,6 +77,12 @@ const char kRootPath[] = HTTP_FIELD"rootPath";
"</html>" "</html>"
const char kNotFound[] = HTTP_FIELD"notFound"; const char kNotFound[] = HTTP_FIELD"notFound";
//HTTP访问url前缀
#define HTTP_PREFIX (StrPrinter << "http://" \
<< SockUtil::get_local_ip() \
<< ":" << HTTP_PORT << endl)
const char kHttpPrefix[] = HTTP_FIELD"httpPrefix";
onceToken token([](){ onceToken token([](){
mINI::Instance()[kPort] = HTTP_PORT; mINI::Instance()[kPort] = HTTP_PORT;
mINI::Instance()[kSendBufSize] = HTTP_SEND_BUF_SIZE; mINI::Instance()[kSendBufSize] = HTTP_SEND_BUF_SIZE;
@ -87,6 +93,7 @@ onceToken token([](){
mINI::Instance()[kServerName] = HTTP_SERVER_NAME; mINI::Instance()[kServerName] = HTTP_SERVER_NAME;
mINI::Instance()[kRootPath] = HTTP_ROOT_PATH; mINI::Instance()[kRootPath] = HTTP_ROOT_PATH;
mINI::Instance()[kNotFound] = HTTP_NOT_FOUND; mINI::Instance()[kNotFound] = HTTP_NOT_FOUND;
mINI::Instance()[kHttpPrefix] = HTTP_PREFIX;
},nullptr); },nullptr);
}//namespace Http }//namespace Http
@ -254,12 +261,6 @@ const char kSegmentNum[] = HLS_FIELD"segNum";
#define HLS_FILE_BUF_SIZE (64 * 1024) #define HLS_FILE_BUF_SIZE (64 * 1024)
const char kFileBufSize[] = HLS_FIELD"fileBufSize"; const char kFileBufSize[] = HLS_FIELD"fileBufSize";
//HTTP访问url前缀
#define HLS_HTTP_PREFIX (StrPrinter << "http://" \
<< SockUtil::get_local_ip() \
<< ":" << HTTP_PORT << endl)
const char kHttpPrefix[] = HLS_FIELD"httpPrefix";
//录制文件路径 //录制文件路径
#define HLS_FILE_PATH (HTTP_ROOT_PATH) #define HLS_FILE_PATH (HTTP_ROOT_PATH)
const char kFilePath[] = HLS_FIELD"filePath"; const char kFilePath[] = HLS_FIELD"filePath";
@ -268,7 +269,6 @@ onceToken token([](){
mINI::Instance()[kSegmentDuration] = HLS_SEGMENT_DURATION; mINI::Instance()[kSegmentDuration] = HLS_SEGMENT_DURATION;
mINI::Instance()[kSegmentNum] = HLS_SEGMENT_NUM; mINI::Instance()[kSegmentNum] = HLS_SEGMENT_NUM;
mINI::Instance()[kFileBufSize] = HLS_FILE_BUF_SIZE; mINI::Instance()[kFileBufSize] = HLS_FILE_BUF_SIZE;
mINI::Instance()[kHttpPrefix] = HLS_HTTP_PREFIX;
mINI::Instance()[kFilePath] = HLS_FILE_PATH; mINI::Instance()[kFilePath] = HLS_FILE_PATH;
},nullptr); },nullptr);

View File

@ -79,6 +79,8 @@ extern const char kServerName[];
extern const char kRootPath[]; extern const char kRootPath[];
//http 404错误提示内容 //http 404错误提示内容
extern const char kNotFound[]; extern const char kNotFound[];
//HTTP访问url前缀
extern const char kHttpPrefix[];
}//namespace Http }//namespace Http
////////////SHELL配置/////////// ////////////SHELL配置///////////
@ -151,8 +153,6 @@ extern const char kSegmentDuration[];
extern const char kSegmentNum[]; extern const char kSegmentNum[];
//HLS文件写缓存大小 //HLS文件写缓存大小
extern const char kFileBufSize[]; extern const char kFileBufSize[];
//HTTP访问url前缀
extern const char kHttpPrefix[];
//录制文件路径 //录制文件路径
extern const char kFilePath[]; extern const char kFilePath[];
} //namespace Hls } //namespace Hls