- link Opus codec always
This commit is contained in:
@@ -10,7 +10,6 @@ set (E engine)
|
||||
|
||||
option (USE_AMR_CODEC "Use AMR codec. Requires libraries." ON)
|
||||
option (USE_EVS_CODEC "Use EVS codec." ON)
|
||||
option (USE_OPUS_CODEC "Use Opus codec." ON)
|
||||
option (USE_MUSL "Build with MUSL library" OFF)
|
||||
|
||||
# PIC code by default
|
||||
@@ -308,10 +307,6 @@ set (RTPHONE_SOURCES
|
||||
${L}/ice/md5_impl.h
|
||||
)
|
||||
|
||||
if (USE_OPUS_CODEC)
|
||||
set (DEFINES ${DEFINES} -DUSE_OPUS_CODEC)
|
||||
endif()
|
||||
|
||||
add_library (rtphone STATIC ${RTPHONE_SOURCES})
|
||||
|
||||
add_subdirectory(${L}/resiprocate)
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
#define MT_EVS_CODECNAME "EVS"
|
||||
|
||||
// OPUS codec defines
|
||||
// #define USE_OPUS_CODEC
|
||||
#define MT_OPUS_CODEC_PT 106
|
||||
|
||||
// ILBC codec defines
|
||||
|
||||
@@ -63,11 +63,8 @@ if (USE_EVS_CODEC)
|
||||
list (APPEND LIBS_CODEC evs_codec)
|
||||
endif()
|
||||
|
||||
if (USE_OPUS_CODEC)
|
||||
message("Media: Opus codec will be included.")
|
||||
target_compile_definitions(media_lib PUBLIC USE_OPUS_CODEC)
|
||||
list (APPEND LIBS_CODEC opus)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Linux*" OR CMAKE_SYSTEM MATCHES "Darwin*")
|
||||
target_compile_definitions(media_lib PUBLIC HAVE_NETINET_IN_H)
|
||||
|
||||
@@ -222,7 +222,6 @@ int G729Codec::plc(int lostFrames, void* output, int outputCapacity)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(USE_OPUS_CODEC)
|
||||
// -------------- Opus -------------------
|
||||
#define OPUS_CODEC_NAME "OPUS"
|
||||
#define OPUS_CODEC_RATE 16000
|
||||
@@ -592,9 +591,6 @@ int OpusCodec::plc(int lostPackets, void* output, int outputCapacity)
|
||||
}
|
||||
return ((char*)data_output - (char*)output) * sizeof(opus_int16);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// -------------- ILBC -------------------
|
||||
#define ILBC_CODEC_NAME "ILBC"
|
||||
|
||||
@@ -24,9 +24,7 @@ extern "C"
|
||||
#include "libg729/g729_typedef.h"
|
||||
#include "libg729/g729_ld8a.h"
|
||||
|
||||
#if defined(USE_OPUS_CODEC)
|
||||
#include "opus.h"
|
||||
#endif
|
||||
|
||||
namespace MT
|
||||
{
|
||||
@@ -65,7 +63,6 @@ public:
|
||||
int plc(int lostFrames, void* output, int outputCapacity) override;
|
||||
};
|
||||
|
||||
#if defined(USE_OPUS_CODEC)
|
||||
class OpusCodec: public Codec
|
||||
{
|
||||
protected:
|
||||
@@ -119,7 +116,7 @@ public:
|
||||
int decode(const void* input, int inputBytes, void* output, int outputCapacity);
|
||||
int plc(int lostFrames, void* output, int outputCapacity);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
class IlbcCodec: public Codec
|
||||
{
|
||||
|
||||
@@ -326,12 +326,10 @@ void CodecList::init(const Settings& settings)
|
||||
{
|
||||
mFactoryList.clear();
|
||||
mSettings = settings;
|
||||
#if defined(USE_OPUS_CODEC)
|
||||
for (auto spec: settings.mOpusSpec)
|
||||
{
|
||||
mFactoryList.push_back(std::make_shared<OpusCodec::OpusFactory>(spec.mRate, spec.mChannels, spec.mPayloadType));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(TARGET_ANDROID) && !defined(TARGET_OPENWRT) && !defined(TARGET_RPI)
|
||||
|
||||
Reference in New Issue
Block a user