From ba0c6b5de1803eb14af25647322d0f0996ac6902 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Sat, 27 Feb 2010 19:01:05 +0100 Subject: WIP --- streamstatus.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'streamstatus.php') diff --git a/streamstatus.php b/streamstatus.php index 38e20c9..54823be 100755 --- a/streamstatus.php +++ b/streamstatus.php @@ -5,26 +5,30 @@ if (file_exists('config.php')) else include ('config_default.php'); +global $maxencodingprocesses; + header('Content-Type: text/xml'); echo "\n"; echo "\n"; // First check that we are allowed to create a new encoding process -$nbencprocess = exec("find .. -name segmenter.pid | wc | awk '{ print $1 }'"); +$nbencprocess = exec("find -name segmenter.pid | wc | awk '{ print $1 }'"); if ($nbencprocess > $maxencodingprocesses) echo "errorError: maximun number of sessions reached\n"; else { + $session = $_REQUEST['session']; + $cnt = 0; - while ( ( count(glob('*.ts')) < 2 ) && ( $cnt < 25 ) ) + while ( ( count(glob('ram/' .$session '/*.ts')) < 2 ) && ( $cnt < 25 ) ) { // wait for stream available sleep(1); $cnt++; } - if ( count(glob('*.ts')) < 2 ) + if ( count(glob('ram/' .$session '/*.ts')) < 2 ) echo "errorError: encoding did not start correclty\n"; else echo "ok\n"; -- cgit v1.2.3