diff options
author | root <root@mediaserver.Belkin> | 2010-02-17 23:14:37 +0100 |
---|---|---|
committer | root <root@mediaserver.Belkin> | 2010-02-17 23:14:37 +0100 |
commit | f27608f2695d51f563adb6ebc8c475c6a8df53ba (patch) | |
tree | c1a909a310b10f267221029e3ba50462dbd3a63f /streamstatus.php | |
download | istreamdev-f27608f2695d51f563adb6ebc8c475c6a8df53ba.tar.gz istreamdev-f27608f2695d51f563adb6ebc8c475c6a8df53ba.tar.bz2 |
0.3.5-dev
Diffstat (limited to 'streamstatus.php')
-rwxr-xr-x | streamstatus.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/streamstatus.php b/streamstatus.php new file mode 100755 index 0000000..4582dc6 --- /dev/null +++ b/streamstatus.php @@ -0,0 +1,21 @@ +<?php + header('Content-Type: text/xml'); + echo "<?xml version=\"1.0\"?>\n"; + echo "<status>\n"; + $cnt = 0; + + while ( ( count(glob('ram/*.ts')) < 2 ) && ( $cnt < 25 ) ) + { + // wait for stream available + sleep(1); + $cnt++; + } + + if ( count(glob('ram/*.ts')) < 2 ) + echo "<streamstatus>error</streamstatus>\n"; + else + echo "<streamstatus>ok</streamstatus>\n"; + + echo "</status>\n"; + +?> |