- changes inspired by pcap2wav utility

This commit is contained in:
Dmytro Bogovych 2018-12-26 11:25:26 +02:00
parent 24e5a83d21
commit 122876e537
3 changed files with 8 additions and 8 deletions

View File

@ -458,7 +458,7 @@ void Session::getSessionInfo(Session::InfoOptions options, VariantMap& info)
{ {
media = &stream; media = &stream;
MT::Statistics s = stream.provider()->getStatistics(); MT::Statistics s = stream.provider()->getStatistics();
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER) #if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
if (options != InfoOptions::Standard) if (options != InfoOptions::Standard)
{ {
// This information is available AFTER audio stream is deleted // This information is available AFTER audio stream is deleted

View File

@ -323,7 +323,7 @@ AudioReceiver::AudioReceiver(const CodecList::Settings& settings, MT::Statistics
AudioReceiver::~AudioReceiver() AudioReceiver::~AudioReceiver()
{ {
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER) #if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
if (mPVQA && mPvqaBuffer) if (mPVQA && mPvqaBuffer)
{ {
mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport); mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport);
@ -407,7 +407,7 @@ void AudioReceiver::processDecoded(Audio::DataWindow& output, DecodeOptions opti
mCodec->channels()); mCodec->channels());
// Update PVQA with stats // Update PVQA with stats
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER) #if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
updatePvqa(mResampledFrame, mResampledLength); updatePvqa(mResampledFrame, mResampledLength);
#endif #endif
@ -450,7 +450,7 @@ bool AudioReceiver::getAudio(Audio::DataWindow& output, DecodeOptions options, i
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(PVQA_SERVER) #if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
if (mResampledLength > 0) if (mResampledLength > 0)
updatePvqa(nullptr, mResampledLength); updatePvqa(nullptr, mResampledLength);
#endif #endif
@ -597,7 +597,7 @@ Codec* AudioReceiver::findCodec(int payloadType)
return codecIter->second.get(); return codecIter->second.get();
} }
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER) #if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
void AudioReceiver::initPvqa() void AudioReceiver::initPvqa()
{ {
// Allocate space for 20 seconds audio // Allocate space for 20 seconds audio

View File

@ -5,7 +5,7 @@
#if defined(USE_PVQA_LIBRARY) #if defined(USE_PVQA_LIBRARY)
#if defined(PVQA_SERVER) #if defined(TARGET_SERVER)
# include <boost/filesystem.hpp> # include <boost/filesystem.hpp>
# include <boost/algorithm/string.hpp> # include <boost/algorithm/string.hpp>
using namespace boost::filesystem; using namespace boost::filesystem;
@ -23,7 +23,7 @@ using namespace boost::filesystem;
#include <atomic> #include <atomic>
#include <algorithm> #include <algorithm>
#if defined(PVQA_SERVER) #if defined(TARGET_SERVER)
extern std::string IntervalCacheDir; extern std::string IntervalCacheDir;
#endif #endif
@ -67,7 +67,7 @@ static std::string execCommand(const std::string& cmd)
void SevanaMosUtility::run(const std::string& pcmPath, const std::string& intervalPath, void SevanaMosUtility::run(const std::string& pcmPath, const std::string& intervalPath,
std::string& estimation, std::string& intervals) std::string& estimation, std::string& intervals)
{ {
#if defined(PVQA_SERVER) #if defined(TARGET_SERVER)
path sevana = current_path() / "sevana"; path sevana = current_path() / "sevana";
#if defined(TARGET_LINUX) || defined(TARGET_OSX) #if defined(TARGET_LINUX) || defined(TARGET_OSX)
path exec = sevana / "pvqa"; path exec = sevana / "pvqa";