Fix codecs display in stats call
This commit is contained in:
parent
2c9092ee0d
commit
860f0cd297
1 changed files with 6 additions and 8 deletions
|
|
@ -399,7 +399,7 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
[this](const std::shared_ptr<linphone::Call> &call, const std::shared_ptr<const linphone::CallStats> &stats) {
|
[this](const std::shared_ptr<linphone::Call> &call, const std::shared_ptr<const linphone::CallStats> &stats) {
|
||||||
if (stats->getType() == linphone::StreamType::Audio) {
|
if (stats->getType() == linphone::StreamType::Audio) {
|
||||||
AudioStats audioStats;
|
AudioStats audioStats;
|
||||||
auto playloadType = call->getParams()->getUsedAudioPayloadType();
|
auto playloadType = call->getCurrentParams()->getUsedAudioPayloadType();
|
||||||
auto codecType = playloadType ? playloadType->getMimeType() : "";
|
auto codecType = playloadType ? playloadType->getMimeType() : "";
|
||||||
auto codecRate = playloadType ? playloadType->getClockRate() / 1000 : 0;
|
auto codecRate = playloadType ? playloadType->getClockRate() / 1000 : 0;
|
||||||
audioStats.codec = tr("Codec: %1 / %2 kHz").arg(Utils::coreStringToAppString(codecType)).arg(codecRate);
|
audioStats.codec = tr("Codec: %1 / %2 kHz").arg(Utils::coreStringToAppString(codecType)).arg(codecRate);
|
||||||
|
|
@ -413,8 +413,8 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
setAudioStats(audioStats);
|
setAudioStats(audioStats);
|
||||||
} else if (stats->getType() == linphone::StreamType::Video) {
|
} else if (stats->getType() == linphone::StreamType::Video) {
|
||||||
VideoStats videoStats;
|
VideoStats videoStats;
|
||||||
auto params = call->getParams();
|
auto params = call->getCurrentParams();
|
||||||
auto playloadType = params->getUsedAudioPayloadType();
|
auto playloadType = params->getUsedVideoPayloadType();
|
||||||
auto codecType = playloadType ? playloadType->getMimeType() : "";
|
auto codecType = playloadType ? playloadType->getMimeType() : "";
|
||||||
auto codecRate = playloadType ? playloadType->getClockRate() / 1000 : 0;
|
auto codecRate = playloadType ? playloadType->getClockRate() / 1000 : 0;
|
||||||
videoStats.codec = tr("Codec: %1 / %2 kHz").arg(Utils::coreStringToAppString(codecType)).arg(codecRate);
|
videoStats.codec = tr("Codec: %1 / %2 kHz").arg(Utils::coreStringToAppString(codecType)).arg(codecRate);
|
||||||
|
|
@ -430,10 +430,8 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
|
||||||
auto receivedResolution =
|
auto receivedResolution =
|
||||||
params->getReceivedVideoDefinition() ? params->getReceivedVideoDefinition()->getName() : "";
|
params->getReceivedVideoDefinition() ? params->getReceivedVideoDefinition()->getName() : "";
|
||||||
videoStats.resolution = tr("Définition vidéo : %1 %2 %3 %4")
|
videoStats.resolution = tr("Définition vidéo : %1 %2 %3 %4")
|
||||||
.arg("↑")
|
.arg("↑", Utils::coreStringToAppString(sentResolution), "↓",
|
||||||
.arg(Utils::coreStringToAppString(sentResolution))
|
Utils::coreStringToAppString(receivedResolution));
|
||||||
.arg("↓")
|
|
||||||
.arg(Utils::coreStringToAppString(receivedResolution));
|
|
||||||
auto sentFps = params->getSentFramerate();
|
auto sentFps = params->getSentFramerate();
|
||||||
auto receivedFps = params->getReceivedFramerate();
|
auto receivedFps = params->getReceivedFramerate();
|
||||||
videoStats.fps = tr("FPS : %1 %2 %3 %4").arg("↑").arg(sentFps).arg("↓").arg(receivedFps);
|
videoStats.fps = tr("FPS : %1 %2 %3 %4").arg("↑").arg(sentFps).arg("↓").arg(receivedFps);
|
||||||
|
|
@ -788,4 +786,4 @@ void CallCore::setVideoStats(VideoStats stats) {
|
||||||
mVideoStats = stats;
|
mVideoStats = stats;
|
||||||
emit videoStatsChanged();
|
emit videoStatsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue