Unverified Commit 5be45ab7 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

avmodel: sort framerates

Change-Id: Ic07397d26d8b158765ac927c5be03f34b58b7994
parent bf027509
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "api/avmodel.h" #include "api/avmodel.h"
// Std // Std
#include <algorithm> // std::sort
#include <chrono> #include <chrono>
#include <csignal> #include <csignal>
#include <iomanip> // for std::put_time #include <iomanip> // for std::put_time
...@@ -249,6 +250,7 @@ AVModel::getDeviceCapabilities(const std::string& deviceId) const ...@@ -249,6 +250,7 @@ AVModel::getDeviceCapabilities(const std::string& deviceId) const
while (itRates.hasNext()) { while (itRates.hasNext()) {
rates.emplace_back(itRates.next().toFloat()); rates.emplace_back(itRates.next().toFloat());
} }
std::sort(rates.begin(), rates.end(), std::greater<int>());
channelCapabilities.emplace_back( channelCapabilities.emplace_back(
std::make_pair(resToRates.first.toStdString(), rates)); std::make_pair(resToRates.first.toStdString(), rates));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment