修复编译问题

This commit is contained in:
xiongziliang 2018-03-21 11:35:00 +08:00
parent bec36b257e
commit 30aa71cb53
4 changed files with 11 additions and 3 deletions

View File

@ -113,6 +113,10 @@ if(NOT WIN32)
add_compile_options(-Wno-predefined-identifier-outside-function)
endif()
if(WIN32)
list(APPEND LINK_LIB_LIST ws2_32)
endif()
#
if(NOT IOS AND NOT ANDROID)
add_library(${CMAKE_PROJECT_NAME}_shared SHARED ${SRC_LIST})

View File

@ -19,8 +19,9 @@
#define MIN_LOG2_MAX_FRAME_NUM 4
#define H264_MAX_PICTURE_COUNT 36
#define CODEC_FLAG2_IGNORE_CROP 0x00010000 ///< Discard cropping information from SPS.
#ifndef INT_MAX
#define INT_MAX 65535
#endif //INT_MAX
/* report level */
#define RPT_ERR (1) // error, system error

View File

@ -136,7 +136,7 @@ static onceToken s_token([](){
}, nullptr);
#if !defined(SIGHUP)
#defined SIGHUP 1
#define SIGHUP 1
#endif
int main(int argc,char *argv[]) {
@ -148,7 +148,10 @@ int main(int argc,char *argv[]) {
Logger::Instance().add(std::make_shared<ConsoleChannel>("stdout", LTrace));
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
//加载配置文件,如果配置文件不存在就创建一个
InfoL << mINI::Instance().dump();
Config::loadIniConfig();
InfoL << mINI::Instance().dump();
{
//这里是拉流地址支持rtmp/rtsp协议负载必须是H264+AAC