diff options
author | TheTroll <trolldev@gmail.com> | 2010-03-27 19:46:30 +0100 |
---|---|---|
committer | TheTroll <trolldev@gmail.com> | 2010-03-27 19:46:30 +0100 |
commit | 275c3cd3d4532aa927945a940bb9c5b8304ba365 (patch) | |
tree | 1028da611e16c72bca64a46935cff7e42fe627bf /bin/files.php | |
parent | 4241ab5e4b0d7a1a0165175c1067ac22edd76de8 (diff) | |
download | istreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.gz istreamdev-275c3cd3d4532aa927945a940bb9c5b8304ba365.tar.bz2 |
Added debug mode
Diffstat (limited to 'bin/files.php')
-rwxr-xr-x | bin/files.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/files.php b/bin/files.php index 483eefc..64ebc7b 100755 --- a/bin/files.php +++ b/bin/files.php @@ -4,6 +4,8 @@ function mediagetinfostream($stream) { $info = array(); + addlog("Requesting media info from " .$stream); + // Get info $getid3 = new getID3; $fileinfo = $getid3->analyze($stream); @@ -32,6 +34,8 @@ function mediagentb($stream, $dest) { global $ffmpegpath; + addlog("Generating thumbnail for stream " .$stream ." to " .$dest); + // Get info $getid3 = new getID3; $fileinfo = $getid3->analyze($stream); @@ -72,9 +76,11 @@ function mediagentb($stream, $dest) } if ($file) - exec("cp \"" .$file ."\" ../ram/stream-tb-tmp.jpg; " .$ffmpegpath ." -y -i ../ram/stream-tb-tmp.jpg -s " .$resx ."x" .$resy ." " .$dest ." ; rm ../ram/stream-tb-tmp.jpg"); + $cmd = "cp \"" .$file ."\" ../ram/stream-tb-tmp.jpg; " .$ffmpegpath ." -y -i ../ram/stream-tb-tmp.jpg -s " .$resx ."x" .$resy ." " .$dest ." ; rm ../ram/stream-tb-tmp.jpg"; else - exec($ffmpegpath ." -y -i \"" .$stream ."\" -an -ss 00:00:05.00 -r 1 -vframes 1 -s " .$resx ."x" .$resy ." -f mjpeg " .$dest); + $cmd = $ffmpegpath ." -y -i \"" .$stream ."\" -an -ss 00:00:05.00 -r 1 -vframes 1 -s " .$resx ."x" .$resy ." -f mjpeg " .$dest; + + addlog("Thumbnail generation command: " .$cmd); if (!file_exists($dest)) exec('cp ../logos/nologoMEDIA.png ' .$dest); @@ -107,6 +113,8 @@ function filegettype($file) function mediagetmusicinfo($file) { + addlog("Getting info for music file: " .$file); + // Get info $getid3 = new getID3; $fileinfo = $getid3->analyze($file); @@ -133,6 +141,8 @@ function mediagetmusicinfo($file) function generatelogo($type, $name, $dest) { + addlog("Generating stream logo for file " .$name ." of type " .$type); + switch ($type) { case 'tv': @@ -158,6 +168,8 @@ function generatelogo($type, $name, $dest) function filesgetlisting($dir) { + addlog("Listing dir: " .$dir); + $filelisting = array(); $folderlisting = array(); |