コード例 #1
0
ファイル: media.php プロジェクト: rigidus/ea
 function load($file)
 {
     load::ext('getid3');
     // Initialize getID3 engine
     $getid3 = new getID3();
     $getid3->encoding = 'UTF-8';
     // Analyze file
     $info = $getid3->analyze($file);
     if (!isset($info['video'])) {
         self::$tags = array('time' => @$info['playtime_string'], 'bitrate' => round(@$info['bitrate'] / 1000), 'title' => self::getAudioTag(&$info, 'title'), 'artist' => self::getAudioTag(&$info, 'artist'), 'album' => self::getAudioTag(&$info, 'album'), 'year' => self::getAudioTag(&$info, 'year'), 'genre' => self::getAudioTag(&$info, 'genre'), 'mime_type' => @$info['mime_type'], 'filesize' => @$info['filesize']);
     } else {
         self::$tags = array('time' => @$info['playtime_string'], 'bitrate' => round(@$info['bitrate'] / 1000), 'x' => @$info['video']['resolution_x'], 'y' => @$info['video']['resolution_y'], 'mime_type' => @$info['mime_type'], 'filesize' => @$info['filesize']);
     }
 }