From 1f5be309fb11e8fa2070c186efe6037a03a9b572 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 18 Feb 2010 13:56:45 +0100 Subject: avi straming first test --- includes/inc_media.php | 53 ++++++++++++++++++++++++++++++++++++++++++++++--- includes/inc_rec.php | 1 + includes/inc_stream.php | 19 ++++++++++++++---- includes/include.php | 9 ++++++--- 4 files changed, 72 insertions(+), 10 deletions(-) (limited to 'includes') diff --git a/includes/inc_media.php b/includes/inc_media.php index b946e09..3d1f820 100755 --- a/includes/inc_media.php +++ b/includes/inc_media.php @@ -1,16 +1,63 @@ \r\n"; print "
\r\n"; print "
\r\n"; +if ($dir == $mediapath) + print "\"home\"
\r\n"; +else + print "Back
\r\n"; +print "
\r\n"; print "\"home\"
\r\n"; print "
iStreamdev
\r\n"; print "\r\n"; print "
\r\n"; print " Media\r\n"; +print "
"; +print " {$subdir}\r\n"; print "
\r\n"; +$dir_handle = @opendir($dir) or die("Unable to open $dir"); + +while ($medianame = readdir($dir_handle)) +{ + if($medianame == "." || $medianame == ".." || $medianame == 'lost+found') + continue; + + $medianame2=addslashes($medianame); + + if (strstr($medianame, ".avi") == ".avi") + { + print "
  • $medianame
  • \r\n"; + print "
    "; + print " "; + print " "; + print " "; + print "
    \r\n"; + } + else + { + print "
  • $medianame
  • \r\n"; + print "
    "; + print " "; + print " "; + print "
    \r\n"; + } +} + +$updir = dirname($dir); + +print "
    \r\n"; +closedir($dir_handle); + +print "\r\n"; ?> diff --git a/includes/inc_rec.php b/includes/inc_rec.php index 463b924..8459a07 100755 --- a/includes/inc_rec.php +++ b/includes/inc_rec.php @@ -19,6 +19,7 @@ else print "
    \r\n"; print "\"home\"
    \r\n"; + print "
    iStreamdev
    \r\n"; print "\r\n"; print "
    \r\n"; diff --git a/includes/inc_stream.php b/includes/inc_stream.php index 58bfa1e..b5df588 100755 --- a/includes/inc_stream.php +++ b/includes/inc_stream.php @@ -51,10 +51,11 @@ if (infostreamexist()) case 1: print " "; break; - default: case 2: + case 3: print " "; break; + } print " \r\n"; } @@ -76,12 +77,17 @@ else case 2: list($title, $desc, $realname) = vdrgetinfostream($name, 0); break; + // Media case 3: + $realname = $name; + $title = ""; + $desc = ""; + break; default: $realname = ""; $title = ""; $desc = ""; - $channame = $name; + $channame = ""; } print "\r\n"; @@ -148,9 +154,9 @@ else print " \r\n"; break; case 2: - default: + case 3: print " \r\n"; - break; + break; } print " "; } @@ -168,6 +174,11 @@ else print " "; print " "; break; + case 3: + $dir = dirname($name); + print " "; + print " "; + break; } print " \r\n"; diff --git a/includes/include.php b/includes/include.php index b2f133d..acffb58 100755 --- a/includes/include.php +++ b/includes/include.php @@ -88,16 +88,19 @@ function gen_media() function start_stream($type, $name, $title, $desc, $qname, $qparams, $category, $url) { - global $httppath; + global $httppath, $ffmpegpath; switch ($type) { case 1: - $cmd = "export SHELL=\"/bin/sh\";printf \"./istream.sh '" .$url ."' " .$qparams ." " .$httppath ." 2 \" | at now"; + $cmd = "export SHELL=\"/bin/sh\";printf \"./istream.sh '" .$url ."' " .$qparams ." " .$httppath ." 2 " .$ffmpegpath ." \" | at now"; break; case 2: - $cmd = "export SHELL=\"/bin/sh\";printf \"cat \\\"" .$url ."\\\"/0* | ./istream.sh - " .$qparams ." " .$httppath ." 1260 \" | at now"; + $cmd = "export SHELL=\"/bin/sh\";printf \"cat \\\"" .$url ."\\\"/0* | ./istream.sh - " .$qparams ." " .$httppath ." 1260 " .$ffmpegpath ." \" | at now"; break; + case 3: + $cmd = "export SHELL=\"/bin/sh\";printf \"./istream.sh '" .$url ."' " .$qparams ." " .$httppath ." 1260 " .$ffmpegpath ." \" | at now"; + break; default: $cmd = ""; } -- cgit v1.2.3