- work on further AQuA integration - now spectrum information is here
This commit is contained in:
parent
cb037b5ae0
commit
49fbe2345f
|
|
@ -332,14 +332,35 @@ void AgentImpl::processStartSession(Json::Value& request, Json::Value& answer)
|
||||||
audioProvider->setState(audioProvider->state() | static_cast<int>(StreamState::Grabbing) | static_cast<int>(StreamState::Playing));
|
audioProvider->setState(audioProvider->state() | static_cast<int>(StreamState::Grabbing) | static_cast<int>(StreamState::Playing));
|
||||||
|
|
||||||
#if defined(USE_AQUA_LIBRARY)
|
#if defined(USE_AQUA_LIBRARY)
|
||||||
std::string temp_path = request["aqua_temp_path"].asString();
|
std::string path_faults = request["path_faults"].asString();
|
||||||
std::string config = "-avlp on -smtnrm on -decor off -mprio off -npnt auto -voip off -enorm off -g711 on -spfrcor off -grad off -tmc on -miter 1 -trim a 10 -output json";
|
|
||||||
|
sevana::aqua::config config = {
|
||||||
|
{ "avlp", "off" },
|
||||||
|
{ "decor", "off" },
|
||||||
|
{ "mprio", "off" },
|
||||||
|
{ "miter", "1" },
|
||||||
|
{ "enorm", "off" },
|
||||||
|
{ "voip", "on" },
|
||||||
|
{ "g711", "on" },
|
||||||
|
{ "spfrcor", "on" },
|
||||||
|
{ "grad", "off" },
|
||||||
|
{ "ratem", "%%m" },
|
||||||
|
{ "trim", "a 2" },
|
||||||
|
{ "output", "json" },
|
||||||
|
{ "fau", path_faults},
|
||||||
|
{ "specp", "32"}
|
||||||
|
};
|
||||||
|
|
||||||
|
// std::string config = "-avlp on -smtnrm on -decor off -mprio off -npnt auto -voip off -enorm off -g711 on -spfrcor off -grad off -tmc on -miter 1 -trim a 10 -output json";
|
||||||
/*if (temp_path.size())
|
/*if (temp_path.size())
|
||||||
config += " -fau " + temp_path; */
|
config += " -fau " + temp_path; */
|
||||||
|
|
||||||
auto qc = std::make_shared<sevana::aqua>();
|
auto qc = std::make_shared<sevana::aqua>();
|
||||||
//qc->setTempPath(temp_path);
|
if (!qc->is_open())
|
||||||
qc->configure_with(sevana::aqua::parse(config));
|
{
|
||||||
|
std::cerr << "Problem when initializing AQuA library" << std::endl;
|
||||||
|
}
|
||||||
|
qc->configure_with(config);
|
||||||
|
|
||||||
mAquaMap[sessionIter->first] = qc;
|
mAquaMap[sessionIter->first] = qc;
|
||||||
dynamic_cast<AudioProvider*>(audioProvider.get())->configureMediaObserver(this, (void*)qc.get());
|
dynamic_cast<AudioProvider*>(audioProvider.get())->configureMediaObserver(this, (void*)qc.get());
|
||||||
|
|
@ -559,6 +580,7 @@ void AgentImpl::processGetMediaStats(Json::Value& request, Json::Value& answer)
|
||||||
test.mChannels = AUDIO_CHANNELS; reference.mChannels = AUDIO_CHANNELS;
|
test.mChannels = AUDIO_CHANNELS; reference.mChannels = AUDIO_CHANNELS;
|
||||||
|
|
||||||
auto r = sa->compare(reference, test);
|
auto r = sa->compare(reference, test);
|
||||||
|
std::cout << r.mFaultsText << std::endl;
|
||||||
answer["aqua_mos"] = r.mMos;
|
answer["aqua_mos"] = r.mMos;
|
||||||
answer["aqua_report"] = r.mFaultsText;
|
answer["aqua_report"] = r.mFaultsText;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue