- 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;
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)
{
// 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()
{
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER)
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
if (mPVQA && mPvqaBuffer)
{
mStat.mPvqaMos = calculatePvqaMos(AUDIO_SAMPLERATE, mStat.mPvqaReport);
@ -407,7 +407,7 @@ void AudioReceiver::processDecoded(Audio::DataWindow& output, DecodeOptions opti
mCodec->channels());
// Update PVQA with stats
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER)
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
updatePvqa(mResampledFrame, mResampledLength);
#endif
@ -450,7 +450,7 @@ bool AudioReceiver::getAudio(Audio::DataWindow& output, DecodeOptions options, i
case RtpBuffer::FetchResult::NoPacket:
ICELogDebug(<< "No packet available in jitter buffer");
mFailedCount++;
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER)
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
if (mResampledLength > 0)
updatePvqa(nullptr, mResampledLength);
#endif
@ -597,7 +597,7 @@ Codec* AudioReceiver::findCodec(int payloadType)
return codecIter->second.get();
}
#if defined(USE_PVQA_LIBRARY) && !defined(PVQA_SERVER)
#if defined(USE_PVQA_LIBRARY) && !defined(TARGET_SERVER)
void AudioReceiver::initPvqa()
{
// Allocate space for 20 seconds audio

View File

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