diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..946b404b --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +release/ filter=lfs diff=lfs merge=lfs -text diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c2861c0..1b44dec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,34 @@ cmake_minimum_required(VERSION 3.1.3) #使能c++11 set(CMAKE_CXX_STANDARD 11) - #加载自定义模块 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") -#设置库文件路径 -set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) -#设置可执行程序路径 -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) + +#set(CMAKE_BUILD_TYPE "Release") + +if(${CMAKE_BUILD_TYPE} MATCHES "Release") + message(STATUS "Release版本") + set(BuildType "Release") +else() + set(BuildType "Debug") + message(STATUS "Debug版本") +endif() + +#设置bin和lib库目录 +set(RELEASE_DIR ${CMAKE_SOURCE_DIR}/release) +if (CMAKE_SYSTEM_NAME MATCHES "Linux") + SET(LIBRARY_OUTPUT_PATH ${RELEASE_DIR}/linux/${BuildType}) + SET(EXECUTABLE_OUTPUT_PATH ${RELEASE_DIR}/linux/${BuildType}) +elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") + SET(LIBRARY_OUTPUT_PATH ${RELEASE_DIR}/windows) + SET(EXECUTABLE_OUTPUT_PATH ${RELEASE_DIR}/windows) +elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") + SET(LIBRARY_OUTPUT_PATH ${RELEASE_DIR}/mac/${BuildType}) + SET(EXECUTABLE_OUTPUT_PATH ${RELEASE_DIR}/mac/${BuildType}) +endif () + +LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH}) + #设置工程源码根目录 set(ToolKit_Root ${CMAKE_SOURCE_DIR}/3rdpart/ZLToolKit/src) diff --git a/release/mac/Release/MediaServer b/release/mac/Release/MediaServer new file mode 100755 index 00000000..923b4b3a Binary files /dev/null and b/release/mac/Release/MediaServer differ diff --git a/release/mac/Release/libcrypto.1.0.0.dylib b/release/mac/Release/libcrypto.1.0.0.dylib new file mode 100644 index 00000000..a3131c09 Binary files /dev/null and b/release/mac/Release/libcrypto.1.0.0.dylib differ diff --git a/release/mac/Release/libfaac.0.0.0.dylib b/release/mac/Release/libfaac.0.0.0.dylib new file mode 100644 index 00000000..a1093f8f Binary files /dev/null and b/release/mac/Release/libfaac.0.0.0.dylib differ diff --git a/release/mac/Release/libflv.a b/release/mac/Release/libflv.a new file mode 100644 index 00000000..50964054 Binary files /dev/null and b/release/mac/Release/libflv.a differ diff --git a/release/mac/Release/libjsoncpp.a b/release/mac/Release/libjsoncpp.a new file mode 100644 index 00000000..101de940 Binary files /dev/null and b/release/mac/Release/libjsoncpp.a differ diff --git a/release/mac/Release/libmov.a b/release/mac/Release/libmov.a new file mode 100644 index 00000000..44f8dd3e Binary files /dev/null and b/release/mac/Release/libmov.a differ diff --git a/release/mac/Release/libmp4v2.2.dylib b/release/mac/Release/libmp4v2.2.dylib new file mode 100644 index 00000000..32d9d75e Binary files /dev/null and b/release/mac/Release/libmp4v2.2.dylib differ diff --git a/release/mac/Release/libmpeg.a b/release/mac/Release/libmpeg.a new file mode 100644 index 00000000..de15a97e Binary files /dev/null and b/release/mac/Release/libmpeg.a differ diff --git a/release/mac/Release/libmysqlclient.21.dylib b/release/mac/Release/libmysqlclient.21.dylib new file mode 100644 index 00000000..8330d43d Binary files /dev/null and b/release/mac/Release/libmysqlclient.21.dylib differ diff --git a/release/mac/Release/libssl.1.0.0.dylib b/release/mac/Release/libssl.1.0.0.dylib new file mode 100644 index 00000000..16d67d1d Binary files /dev/null and b/release/mac/Release/libssl.1.0.0.dylib differ diff --git a/release/mac/Release/libx264.155.dylib b/release/mac/Release/libx264.155.dylib new file mode 100644 index 00000000..669853bf Binary files /dev/null and b/release/mac/Release/libx264.155.dylib differ diff --git a/release/mac/Release/libzlmediakit.a b/release/mac/Release/libzlmediakit.a new file mode 100644 index 00000000..284b6c53 Binary files /dev/null and b/release/mac/Release/libzlmediakit.a differ diff --git a/release/mac/Release/libzltoolkit.a b/release/mac/Release/libzltoolkit.a new file mode 100644 index 00000000..a4423471 Binary files /dev/null and b/release/mac/Release/libzltoolkit.a differ diff --git a/release/mac/Release/readme.md b/release/mac/Release/readme.md new file mode 100644 index 00000000..8a430d58 --- /dev/null +++ b/release/mac/Release/readme.md @@ -0,0 +1,6 @@ +执行可执行程序时,请在终端输入: + +``` +export DYLD_LIBRARY_PATH=./ +./MediaServer -d & +``` diff --git a/release/mac/Release/ssl.p12 b/release/mac/Release/ssl.p12 new file mode 100644 index 00000000..fe42e11f Binary files /dev/null and b/release/mac/Release/ssl.p12 differ diff --git a/release/mac/Release/test_benchmark b/release/mac/Release/test_benchmark new file mode 100755 index 00000000..3068ef81 Binary files /dev/null and b/release/mac/Release/test_benchmark differ diff --git a/release/mac/Release/test_httpApi b/release/mac/Release/test_httpApi new file mode 100755 index 00000000..f3736e4c Binary files /dev/null and b/release/mac/Release/test_httpApi differ diff --git a/release/mac/Release/test_httpClient b/release/mac/Release/test_httpClient new file mode 100755 index 00000000..f2580451 Binary files /dev/null and b/release/mac/Release/test_httpClient differ diff --git a/release/mac/Release/test_player b/release/mac/Release/test_player new file mode 100755 index 00000000..84f368be Binary files /dev/null and b/release/mac/Release/test_player differ diff --git a/release/mac/Release/test_pusher b/release/mac/Release/test_pusher new file mode 100755 index 00000000..32fcf07a Binary files /dev/null and b/release/mac/Release/test_pusher differ diff --git a/release/mac/Release/test_pusherMp4 b/release/mac/Release/test_pusherMp4 new file mode 100755 index 00000000..d6c720b2 Binary files /dev/null and b/release/mac/Release/test_pusherMp4 differ diff --git a/release/mac/Release/test_server b/release/mac/Release/test_server new file mode 100755 index 00000000..7057585c Binary files /dev/null and b/release/mac/Release/test_server differ diff --git a/src/Extension/SPSParser.c b/src/Extension/SPSParser.c index dbc90ed4..b073b9cb 100644 --- a/src/Extension/SPSParser.c +++ b/src/Extension/SPSParser.c @@ -439,7 +439,8 @@ static inline unsigned int showBitsLong(void *pvHandle, int iN) if (iN <= 32) { return showBits(ptPtr, iN); - } + } + return 0; }