- avoid double PVQA creation in pvqa_pcap

This commit is contained in:
Dmytro Bogovych 2019-04-18 16:47:39 +03:00
parent e9799dae0b
commit 73ef8573db
2 changed files with 5 additions and 5 deletions

View File

@ -337,7 +337,7 @@ AudioReceiver::AudioReceiver(const CodecList::Settings& settings, MT::Statistics
AudioReceiver::~AudioReceiver()
{
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
if (mPVQA && mPvqaBuffer)
{
mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport);
@ -421,7 +421,7 @@ void AudioReceiver::processDecoded(Audio::DataWindow& output, int options)
mCodec->channels());
// Update PVQA with stats
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
updatePvqa(mResampledFrame, mResampledLength);
#endif
@ -469,7 +469,7 @@ bool AudioReceiver::getAudio(Audio::DataWindow& output, int options, int* rate)
case RtpBuffer::FetchResult::NoPacket:
ICELogDebug(<< "No packet available in jitter buffer");
mFailedCount++;
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
if (mResampledLength > 0)
updatePvqa(nullptr, mResampledLength);
#endif
@ -635,7 +635,7 @@ Codec* AudioReceiver::findCodec(int payloadType)
return codecIter->second.get();
}
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
void AudioReceiver::initPvqa()
{
// Allocate space for 20 seconds audio

View File

@ -174,7 +174,7 @@ namespace MT
// Resamples, sends to analysis, writes to dump and queues to output decoded frames from mDecodedFrame
void processDecoded(Audio::DataWindow& output, int options);
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER)
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
std::shared_ptr<SevanaPVQA> mPVQA;
void initPvqa();
void updatePvqa(const void* data, int size);