FFmpeg与音视频流媒体工程开发相关

[ZLMediaKit]MacOS编译修改

2021-11-03  本文已影响0人  _小老虎_

ZLMediaKit Mac编译方式(敏捷)

修改CmakeList.txt

注释rtc部分

#if (ENABLE_WEBRTC)
#    #查找srtp是否安装
#    find_package(SRTP QUIET)
#    if (SRTP_FOUND)
#        message(STATUS "found library:${SRTP_LIBRARIES}")
#        include_directories(${SRTP_INCLUDE_DIRS})
#        list(APPEND LINK_LIB_LIST ${SRTP_LIBRARIES})

#        add_definitions(-DENABLE_WEBRTC)
#        include_directories(./webrtc)
#        file(GLOB SRC_WEBRTC_LIST ./webrtc/*.cpp ./webrtc/*.h ./webrtc/*.hpp)
#        add_library(webrtc ${SRC_WEBRTC_LIST})
#        list(APPEND LINK_LIB_LIST webrtc)
#        message(STATUS "webrtc功能已开启")
#    else ()
#        set(ENABLE_WEBRTC off)
#        message(WARNING "srtp未找到, webrtc相关功能打开失败")
#    endif ()
#endif ()

注释openssl部分

#查找openssl是否安装
#find_package(OpenSSL QUIET)
#if (OPENSSL_FOUND AND ENABLE_OPENSSL)
#    message(STATUS "found library:${OPENSSL_LIBRARIES},ENABLE_OPENSSL defined")
#    include_directories(${OPENSSL_INCLUDE_DIR})
#    add_definitions(-DENABLE_OPENSSL)
#    list(APPEND LINK_LIB_LIST ${OPENSSL_LIBRARIES})
#    if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND OPENSSL_USE_STATIC_LIBS)
#        list(APPEND LINK_LIB_LIST dl)
#    endif ()
#else ()
#    message(WARNING "openssl未找到,rtmp将不支持flash播放器,https/wss/rtsps/rtmps也将失效")
#endif ()

关闭rtc/openssl

option(ENABLE_HLS "Enable HLS" true)
option(ENABLE_OPENSSL "Enable OpenSSL" false) # 这里
option(ENABLE_MYSQL "Enable MySQL" false)
option(ENABLE_FAAC "Enable FAAC" false)
option(ENABLE_X264 "Enable x264" false)
option(ENABLE_MP4 "Enable MP4" true)
option(ENABLE_RTPPROXY "Enable RTPPROXY" true)
option(ENABLE_API "Enable C API SDK" true)
option(ENABLE_CXX_API "Enable C++ API SDK" false)
option(ENABLE_TESTS "Enable Tests" true)
option(ENABLE_SERVER "Enable Server" true)
option(ENABLE_MEM_DEBUG "Enable Memory Debug" false)
option(ENABLE_ASAN "Enable Address Sanitize" false)
option(ENABLE_WEBRTC "Enable WebRTC" false) # 这里
option(ENABLE_PLAYER "Enable Player" true)
option(ENABLE_MSVC_MT "Enable MSVC Mt/Mtd lib" true)
option(ENABLE_API_STATIC_LIB "Enable mk_api static lib" false)
单测去掉rtp部分
开始编译
cd ZLMediaKit
mkdir build
cd build
cmake ..
make -j4
上一篇下一篇

猜你喜欢

热点阅读