- fix build for android (exclude AMR codec)
This commit is contained in:
parent
d43b577ca6
commit
522608319e
|
|
@ -1,3 +1,6 @@
|
|||
// Avoid linking issues on Android systems
|
||||
#if !defined(TARGET_ANDROID)
|
||||
|
||||
#include "MT_AmrCodec.h"
|
||||
#include "../helper/HL_ByteBuffer.h"
|
||||
#include "../helper/HL_Log.h"
|
||||
|
|
@ -972,3 +975,5 @@ int GsmEfrCodec::plc(int lostFrames, void* output, int outputCapacity)
|
|||
|
||||
return lostFrames * pcmLength();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -12,7 +12,10 @@
|
|||
#include "../helper/HL_Log.h"
|
||||
#include "../audio/Audio_Interface.h"
|
||||
#include "../audio/Audio_Resampler.h"
|
||||
#include "MT_AmrCodec.h"
|
||||
|
||||
#if !defined(TARGET_ANDROID)
|
||||
# include "MT_AmrCodec.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -689,6 +692,7 @@ float AudioReceiver::calculatePvqaMos(int rate, std::string& report)
|
|||
|
||||
void AudioReceiver::processStatisticsWithAmrCodec(Codec* c)
|
||||
{
|
||||
#if !defined(TARGET_ANDROID)
|
||||
AmrNbCodec* nb = dynamic_cast<AmrNbCodec*>(c);
|
||||
AmrWbCodec* wb = dynamic_cast<AmrWbCodec*>(c);
|
||||
|
||||
|
|
@ -697,6 +701,7 @@ void AudioReceiver::processStatisticsWithAmrCodec(Codec* c)
|
|||
else
|
||||
if (wb != nullptr)
|
||||
mStat.mBitrateSwitchCounter = wb->getSwitchCounter();
|
||||
#endif
|
||||
}
|
||||
|
||||
int AudioReceiver::getSize() const
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@
|
|||
#include "../config.h"
|
||||
#include "MT_CodecList.h"
|
||||
#include "MT_AudioCodec.h"
|
||||
#include "MT_AmrCodec.h"
|
||||
|
||||
#if !defined(TARGET_ANDROID)
|
||||
# include "MT_AmrCodec.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
@ -30,6 +33,7 @@ CodecList::CodecList(const Settings& settings)
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(TARGET_ANDROID)
|
||||
for (int pt: mSettings.mAmrWbPayloadType)
|
||||
mFactoryList.push_back(new AmrWbCodec::CodecFactory({mSettings.mWrapIuUP, false, pt}));
|
||||
for (int pt: mSettings.mAmrWbOctetPayloadType)
|
||||
|
|
@ -41,9 +45,10 @@ CodecList::CodecList(const Settings& settings)
|
|||
mFactoryList.push_back(new AmrNbCodec::CodecFactory({mSettings.mWrapIuUP, true, pt}));
|
||||
|
||||
mFactoryList.push_back(new GsmEfrCodec::GsmEfrFactory(mSettings.mWrapIuUP, mSettings.mGsmEfrPayloadType));
|
||||
#endif
|
||||
|
||||
//mFactoryList.push_back(new IsacCodec::IsacFactory16K(mSettings.mIsac16KPayloadType));
|
||||
//mFactoryList.push_back(new IlbcCodec::IlbcFactory(mSettings.mIlbc20PayloadType, mSettings.mIlbc30PayloadType));
|
||||
mFactoryList.push_back(new IsacCodec::IsacFactory16K(mSettings.mIsac16KPayloadType));
|
||||
mFactoryList.push_back(new IlbcCodec::IlbcFactory(mSettings.mIlbc20PayloadType, mSettings.mIlbc30PayloadType));
|
||||
mFactoryList.push_back(new G711Codec::AlawFactory());
|
||||
mFactoryList.push_back(new G711Codec::UlawFactory());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue