summaryrefslogtreecommitdiff
path: root/tools/videotimeline
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-04-21 04:11:38 +0200
committerRobin Gareus <robin@gareus.org>2014-04-21 04:11:38 +0200
commit5b45e011bc1e39a1e1b316b9f0d141187585aaeb (patch)
treee96eb4b5a5e645620a323fbc2bbc430749e29f68 /tools/videotimeline
parentf31c84a74296cac354928b05228a4ada280f040b (diff)
update video server API prototyping script (CSV)
Diffstat (limited to 'tools/videotimeline')
-rw-r--r--tools/videotimeline/vsrv.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/videotimeline/vsrv.php b/tools/videotimeline/vsrv.php
index 2a6830c1b0..93ee9b2c38 100644
--- a/tools/videotimeline/vsrv.php
+++ b/tools/videotimeline/vsrv.php
@@ -16,6 +16,14 @@ if (isset($_SERVER['PATH_INFO'])) {
case '/info':
$mode='info';
break;
+ case '/rc':
+ case '/rc/':
+ # TODO proper CSV encode (possible quotes in docroot)
+ # TODO support optional plain text version
+ echo '"'.$docroot.'",'.$_SERVER['SERVER_ADDR'].','.$_SERVER['SERVER_PORT'].',0,"/info /rc /status",""'."\n";
+ echo 'status: ok, online.';
+ exit;
+ break;
default:
break;
}
@@ -96,6 +104,16 @@ if ($mode=='info') {
# duration (in frames)
# start-offset (in seconds)
# aspect-ratio
+ if (isset($_REQUEST['format'])) {
+ switch ($_REQUEST['format']) {
+ case 'csv':
+ echo "1,$fr,$df,$so,$ar\n";
+ exit;
+ break;
+ default:
+ break;
+ }
+ }
echo "1\n$fr\n$df\n$so\n$ar\n";
exit;
}