提交 8269b821 authored 作者: Chad Phillips's avatar Chad Phillips

FS-9281: Add support for QQVGA resolution in Verto

QQVGA is a standard 160x120 resolution, useful for cases of very slow
upload bandwidth. Adds the resolution to the core FSRTC lib, and to
the Verto video demo and Verto Communicator
上级 eeba1839
...@@ -1089,7 +1089,7 @@ ...@@ -1089,7 +1089,7 @@
return [w, h]; return [w, h];
} }
var resList = [[320, 180], [320, 240], [640, 360], [640, 480], [1280, 720], [1920, 1080]]; var resList = [[160, 120], [320, 180], [320, 240], [640, 360], [640, 480], [1280, 720], [1920, 1080]];
var resI = 0; var resI = 0;
var ttl = 0; var ttl = 0;
......
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
/* Controllers */ /* Controllers */
var videoQuality = []; var videoQuality = [];
var videoQualitySource = [{ var videoQualitySource = [{
id: 'qqvga',
label: 'QQVGA 160x120',
width: 160,
height: 120
}, {
id: 'qvga', id: 'qvga',
label: 'QVGA 320x240', label: 'QVGA 320x240',
width: 320, width: 320,
...@@ -35,6 +40,10 @@ var videoQualitySource = [{ ...@@ -35,6 +40,10 @@ var videoQualitySource = [{
}, ]; }, ];
var videoResolution = { var videoResolution = {
qqvga: {
width: 160,
height: 120
},
qvga: { qvga: {
width: 320, width: 320,
height: 240 height: 240
...@@ -910,7 +919,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora ...@@ -910,7 +919,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
storage.data.useDedenc = false; storage.data.useDedenc = false;
storage.data.vidQual = 'hd'; storage.data.vidQual = 'hd';
if (upBand < 512) { if (upBand < 256) {
storage.data.vidQual = 'qqvga';
}
else if (upBand < 512) {
storage.data.vidQual = 'qvga'; storage.data.vidQual = 'qvga';
} }
else if (upBand < 1024) { else if (upBand < 1024) {
......
...@@ -394,6 +394,10 @@ if ($('#devices').is(':visible')) { ...@@ -394,6 +394,10 @@ if ($('#devices').is(':visible')) {
<div > <div >
<fieldset data-role="controlgroup" data-type="horizontal"> <fieldset data-role="controlgroup" data-type="horizontal">
<legend><b>Video Quality</b>:</legend> <legend><b>Video Quality</b>:</legend>
<input type="radio" name="vqual" id="vqual_qqvga" value="qqvga">
<label for="vqual_qqvga">QQVGA 160x120</label>
<input type="radio" name="vqual" id="vqual_qvga" value="qvga"> <input type="radio" name="vqual" id="vqual_qvga" value="qvga">
<label for="vqual_qvga">QVGA 320x240</label> <label for="vqual_qvga">QVGA 320x240</label>
......
...@@ -140,7 +140,12 @@ function real_size() { ...@@ -140,7 +140,12 @@ function real_size() {
function check_vid_res() function check_vid_res()
{ {
if ($("#vqual_qvga").is(':checked')) { if ($("#vqual_qqvga").is(':checked')) {
vid_width = 160;
vid_height = 120;
local_vid_width = 80;
local_vid_height = 60;
} else if ($("#vqual_qvga").is(':checked')) {
vid_width = 320; vid_width = 320;
vid_height = 240; vid_height = 240;
local_vid_width = 160; local_vid_width = 160;
...@@ -218,6 +223,10 @@ function do_speed_test(fn) ...@@ -218,6 +223,10 @@ function do_speed_test(fn)
$("#vqual_qvga").prop("checked", true); $("#vqual_qvga").prop("checked", true);
vid = "320x240"; vid = "320x240";
} }
if (outgoingBandwidth < 256) {
$("#vqual_qqvga").prop("checked", true);
vid = "160x120";
}
//} //}
if (incomingBandwidth === "default") { if (incomingBandwidth === "default") {
...@@ -1315,6 +1324,15 @@ function init() { ...@@ -1315,6 +1324,15 @@ function init() {
$("#vqual_qqvga").prop("checked", vqual === "qqvga").change(function(e) {
if ($("#vqual_qqvga").is(':checked')) {
vqual = "qqvga";
$.cookie("verto_demo_vqual", vqual, {
expires: 365
});
}
});
$("#vqual_qvga").prop("checked", vqual === "qvga").change(function(e) { $("#vqual_qvga").prop("checked", vqual === "qvga").change(function(e) {
if ($("#vqual_qvga").is(':checked')) { if ($("#vqual_qvga").is(':checked')) {
vqual = "qvga"; vqual = "qvga";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论