Skip to content
Snippets Groups Projects
Commit 5cc051db authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez
Browse files

media_video: reduce default resolution from 720p to 640p

Change-Id: I3d3cf3e11625ef52beedf514e903a997648ce74a
Tuleap: #430
parent dfb97916
No related branches found
No related tags found
No related merge requests found
...@@ -90,11 +90,14 @@ public: ...@@ -90,11 +90,14 @@ public:
} }
/* Default setting is found by using following rules: /* Default setting is found by using following rules:
* - frame height <= 720 pixels * - frame height <= 640 pixels
* - frame rate >= 10 fps * - frame rate >= 10 fps
*/ */
VideoSettings getDefaultSettings() const { VideoSettings getDefaultSettings() const {
auto settings = getSettings(); auto settings = getSettings();
auto channels = getChannelList();
if (channels.empty())
return {};
settings.channel = getChannelList().front(); settings.channel = getChannelList().front();
VideoSize max_size {0, 0}; VideoSize max_size {0, 0};
...@@ -102,7 +105,7 @@ public: ...@@ -102,7 +105,7 @@ public:
auto sizes = getSizeList(settings.channel); auto sizes = getSizeList(settings.channel);
for (auto& s : sizes) { for (auto& s : sizes) {
if (s.second > 720) if (s.second > 640)
continue; continue;
auto rates = getRateList(settings.channel, s); auto rates = getRateList(settings.channel, s);
if (rates.empty()) if (rates.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment