Make srtp2 only a dependency for MistOutWebRTC

Change-Id: I52316bbceef463844e8f8cb1ef85277c4b886814
This commit is contained in:
Thulinma 2023-01-02 14:44:52 +01:00
parent 00833223e1
commit aa614aebab
7 changed files with 18 additions and 11 deletions

View file

@ -212,7 +212,6 @@ set(libHeaders
lib/sdp_media.h
lib/shared_memory.h
lib/socket.h
lib/srtp.h
lib/stream.h
lib/stun.h
lib/theora.h
@ -279,7 +278,6 @@ add_library (mist
lib/sdp_media.cpp
lib/shared_memory.cpp
lib/socket.cpp
lib/srtp.cpp
lib/stream.cpp
lib/stun.cpp
lib/theora.cpp
@ -306,7 +304,7 @@ target_link_libraries(mist
${LIBRT}
)
if (NOT NOSSL)
target_link_libraries(mist mbedtls mbedx509 mbedcrypto srtp2)
target_link_libraries(mist mbedtls mbedx509 mbedcrypto)
endif()
install(
FILES ${libHeaders}
@ -514,6 +512,9 @@ macro(makeOutput outputName format)
if (";${ARGN};" MATCHES ";jpg;")
SET(tsOutput generated/noffmpeg.h generated/noh264.h)
endif()
if (";${ARGN};" MATCHES ";srtp;")
SET(tsOutput src/output/output_webrtc_srtp.h src/output/output_webrtc_srtp.cpp)
endif()
add_executable(MistOut${outputName}
${outBaseFile}
src/output/output.cpp
@ -533,6 +534,9 @@ macro(makeOutput outputName format)
if (";${ARGN};" MATCHES ";with_rist;")
target_link_libraries(MistOut${outputName} rist cjson)
endif()
if (";${ARGN};" MATCHES ";srtp;")
target_link_libraries(MistOut${outputName} srtp2)
endif()
target_link_libraries(MistOut${outputName} mist )
install(
TARGETS MistOut${outputName}
@ -619,7 +623,7 @@ target_link_libraries(MistProcLivepeer mist)
if (NOT NOSSL)
makeOutput(HTTPS https)#LTS
makeOutput(WebRTC webrtc http)#LTS
makeOutput(WebRTC webrtc http srtp)#LTS
endif()
option(WITH_SANITY "Enable MistOutSanityCheck output for testing purposes")

View file

@ -40,7 +40,6 @@ headers = [
'sdp_media.h',
'shared_memory.h',
'socket.h',
'srtp.h',
'stream.h',
'stun.h',
'theora.h',
@ -69,7 +68,7 @@ install_headers(headers, subdir: 'mist')
extra_code = []
if usessl
extra_code += ['dtls_srtp_handshake.cpp', 'stun.cpp', 'certificate.cpp', 'encryption.cpp', 'srtp.cpp',]
extra_code += ['dtls_srtp_handshake.cpp', 'stun.cpp', 'certificate.cpp', 'encryption.cpp',]
endif
libmist = library('mist',

View file

@ -120,7 +120,7 @@ if usessl
endif
srtp2 = dependency('libsrtp2', fallback : ['libsrtp2', 'libsrtp2_dep'])
ssl_deps = [mbedtls, mbedx509, mbedcrypto, srtp2]
ssl_deps = [mbedtls, mbedx509, mbedcrypto]
endif
libsrt = false

View file

@ -24,7 +24,7 @@ outputs = [
if usessl
outputs += [
{'name' : 'HTTPS', 'format' : 'https'},
{'name' : 'WebRTC', 'format' : 'webrtc', 'extra': ['http','jpg']}
{'name' : 'WebRTC', 'format' : 'webrtc', 'extra': ['http','jpg','srtp']}
]
endif
@ -89,6 +89,10 @@ foreach output : outputs
link_libs += libmist_srt
deps += libsrt
endif
if extra.contains('srtp')
deps += srtp2
sources += files('output_webrtc_srtp.cpp', 'output_webrtc_srtp.h')
endif
else
sources += base
endif

View file

@ -63,11 +63,11 @@
#include <mist/rtp_fec.h>
#include <mist/sdp_media.h>
#include <mist/socket.h>
#include <mist/srtp.h>
#include <mist/stun.h>
#include <mist/tinythread.h>
#include <mist/websocket.h>
#include <fstream>
#include "output_webrtc_srtp.h"
#define NACK_BUFFER_SIZE 1024

View file

@ -1,5 +1,5 @@
#include "defines.h"
#include "srtp.h"
#include <mist/defines.h>
#include "output_webrtc_srtp.h"
#include <algorithm>
#include <string.h>