- avoid double PVQA creation in pvqa_pcap
This commit is contained in:
parent
e9799dae0b
commit
73ef8573db
|
|
@ -337,7 +337,7 @@ AudioReceiver::AudioReceiver(const CodecList::Settings& settings, MT::Statistics
|
||||||
|
|
||||||
AudioReceiver::~AudioReceiver()
|
AudioReceiver::~AudioReceiver()
|
||||||
{
|
{
|
||||||
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
|
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
|
||||||
if (mPVQA && mPvqaBuffer)
|
if (mPVQA && mPvqaBuffer)
|
||||||
{
|
{
|
||||||
mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport);
|
mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport);
|
||||||
|
|
@ -421,7 +421,7 @@ void AudioReceiver::processDecoded(Audio::DataWindow& output, int options)
|
||||||
mCodec->channels());
|
mCodec->channels());
|
||||||
|
|
||||||
// Update PVQA with stats
|
// Update PVQA with stats
|
||||||
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
|
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
|
||||||
updatePvqa(mResampledFrame, mResampledLength);
|
updatePvqa(mResampledFrame, mResampledLength);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -469,7 +469,7 @@ bool AudioReceiver::getAudio(Audio::DataWindow& output, int options, int* rate)
|
||||||
case RtpBuffer::FetchResult::NoPacket:
|
case RtpBuffer::FetchResult::NoPacket:
|
||||||
ICELogDebug(<< "No packet available in jitter buffer");
|
ICELogDebug(<< "No packet available in jitter buffer");
|
||||||
mFailedCount++;
|
mFailedCount++;
|
||||||
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
|
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
|
||||||
if (mResampledLength > 0)
|
if (mResampledLength > 0)
|
||||||
updatePvqa(nullptr, mResampledLength);
|
updatePvqa(nullptr, mResampledLength);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -635,7 +635,7 @@ Codec* AudioReceiver::findCodec(int payloadType)
|
||||||
return codecIter->second.get();
|
return codecIter->second.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
|
#if defined(USE_PVQA_LIBRARY) && defined(PVQA_IN_RECEIVER)
|
||||||
void AudioReceiver::initPvqa()
|
void AudioReceiver::initPvqa()
|
||||||
{
|
{
|
||||||
// Allocate space for 20 seconds audio
|
// Allocate space for 20 seconds audio
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ namespace MT
|
||||||
// Resamples, sends to analysis, writes to dump and queues to output decoded frames from mDecodedFrame
|
// Resamples, sends to analysis, writes to dump and queues to output decoded frames from mDecodedFrame
|
||||||
void processDecoded(Audio::DataWindow& output, int options);
|
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;
|
std::shared_ptr<SevanaPVQA> mPVQA;
|
||||||
void initPvqa();
|
void initPvqa();
|
||||||
void updatePvqa(const void* data, int size);
|
void updatePvqa(const void* data, int size);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue