13
0

really fix vsrv.php script. support new A3.5-CC (BGRA images, CSV)

This commit is contained in:
Robin Gareus 2014-04-21 04:39:25 +02:00
parent 5b45e011bc
commit bd9dba1f4d

View File

@ -47,6 +47,9 @@ if (isset($_REQUEST['format'])) {
case 'rgba': case 'rgba':
$fmt='rgba'; $fmt='rgba';
break; break;
case 'bgra':
$fmt='bgra';
break;
case 'rgb': case 'rgb':
$fmt='rgb'; $fmt='rgb';
break; break;
@ -99,21 +102,22 @@ else if (preg_match('@Video:.* ([0-9]+x[0-9]+),@m',$nfo, $m)) {
} }
if ($mode=='info') { if ($mode=='info') {
# Protocol Version number
# FPS
# duration (in frames)
# start-offset (in seconds)
# aspect-ratio
if (isset($_REQUEST['format'])) { if (isset($_REQUEST['format'])) {
switch ($_REQUEST['format']) { switch ($_REQUEST['format']) {
case 'csv': case 'csv':
echo "1,$fr,$df,$so,$ar\n"; # protocol, width, height, aspect, fps, fps, duration
echo "1,0,0,$ar,$fr,$df\n";
exit; exit;
break; break;
default: default:
break; break;
} }
} }
# Protocol Version number
# FPS
# duration (in frames)
# start-offset (in seconds)
# aspect-ratio
echo "1\n$fr\n$df\n$so\n$ar\n"; echo "1\n$fr\n$df\n$so\n$ar\n";
exit; exit;
} }