summaryrefslogtreecommitdiff
path: root/streamstatus.php
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-15 17:56:22 +0100
committerAlib <aliboba@free.fr>2010-03-15 17:56:22 +0100
commit438912c0c4a4075a5cd74cf9689451c9df4bbe34 (patch)
tree334e03bbba01b002a34d3cbf81ee7e600ec7bff6 /streamstatus.php
parenta8012963c23e7e5eaf487ee9e192ae5c4d4ccff2 (diff)
downloadistreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.gz
istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.bz2
New Jquery branch. Initial development version for istreamdev 1.0
Diffstat (limited to 'streamstatus.php')
-rwxr-xr-xstreamstatus.php47
1 files changed, 0 insertions, 47 deletions
diff --git a/streamstatus.php b/streamstatus.php
deleted file mode 100755
index 3189afe..0000000
--- a/streamstatus.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-if (file_exists('config.php'))
- include ('config.php');
-else
- include ('config_default.php');
-
-global $maxencodingprocesses;
-
-header('Content-Type: text/xml');
-echo "<?xml version=\"1.0\"?>\n";
-
-echo "<status>\n";
-
-$session = $_REQUEST['session'];
-
-exec('echo ' .$session .' >/tmp/aa');
-
-// First check that we are allowed to create a new encoding process
-if (($session == "") || !count(glob('ram/' .$session)))
-{
- $nbencprocess = exec("find ram/ -name segmenter.pid | wc | awk '{ print $1 }'");
-
- if ($nbencprocess >= $maxencodingprocesses)
- echo "<streamstatus>error</streamstatus><message>Error: maximun number of sessions reached</message>\n";
- else
- echo "<streamstatus>error</streamstatus><message>Error: cannot create session</message>\n";
-}
-else
-{
- $cnt = 0;
- while ( ( count(glob('ram/' .$session . '/*.ts')) < 2 ) && ( $cnt < 25 ) )
- {
- // wait for stream available
- sleep(1);
- $cnt++;
- }
-
- if ( count(glob('ram/' .$session . '/*.ts')) < 2 )
- echo "<streamstatus>error</streamstatus><message>Error: encoding did not start correctly</message>\n";
- else
- echo "<streamstatus>ok</streamstatus>\n";
-}
-
-echo "</status>\n";
-
-?>