summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-25 15:51:44 +0100
committerTheTroll <trolldev@gmail.com>2010-02-25 15:51:44 +0100
commit45ee8db7fd22ff9c9fe200802ed4e179000a5bb4 (patch)
tree228425717006ca104f9b1dc46e4b38d53ea6f7cc /includes
parent1d3095213541ba77015742a4c05cfcf66fd9c7e7 (diff)
downloadistreamdev-45ee8db7fd22ff9c9fe200802ed4e179000a5bb4.tar.gz
istreamdev-45ee8db7fd22ff9c9fe200802ed4e179000a5bb4.tar.bz2
Replaced mediainfo calls by getid3
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/inc_files.php24
-rwxr-xr-xincludes/include.php1
2 files changed, 6 insertions, 19 deletions
diff --git a/includes/inc_files.php b/includes/inc_files.php
index 266059d..06a9cc0 100755
--- a/includes/inc_files.php
+++ b/includes/inc_files.php
@@ -5,28 +5,14 @@ $audiotypes='mp3 aac wav ';
function mediagetinfostream($stream = "")
{
- global $mediainfopath, $ffmpegpath;
+ global $ffmpegpath;
// Get info
- exec($mediainfopath ." \"" .$stream ."\"", $mediainfo);
+ $getid3 = new getID3;
+ $fileinfo = $getid3->analyze($stream);
- $info = "";
- $title = "";
-
- // Parse info
- $count = count($mediainfo);
- for ($i = 0; $i < $count; $i++)
- {
- if (!strncmp($mediainfo[$i], "Video", strlen("Video")) || !strncmp($mediainfo[$i], "Audio", strlen("Audio")))
- break;
-
- if (!strncmp($mediainfo[$i], "Format", strlen("Format")))
- $title = substr(strstr($mediainfo[$i], ": "), 2);
- else if (!strncmp($mediainfo[$i], "Format/Info", strlen("Format/Info")))
- $title = substr(strstr($mediainfo[$i], ": "), 2);
- else if (!strncmp($mediainfo[$i], "Duration", strlen("Duration")))
- $info = substr(strstr($mediainfo[$i], ": "), 2);
- }
+ $title = $fileinfo['fileformat'];
+ $info = $fileinfo['playtime_string'];
// Extract a thumbnail
exec("rm ram/stream-tb.*");
diff --git a/includes/include.php b/includes/include.php
index 6b57a65..bf18d55 100755
--- a/includes/include.php
+++ b/includes/include.php
@@ -9,6 +9,7 @@ include ('includes/inc_auth.php');
include ('includes/inc_vdr.php');
include ('includes/inc_files.php');
include ('includes/inc_streaminfo.php');
+include ('getid3/getid3.php');
function selectpage()
{