Lines Matching refs:info

164 		$this->info = array();
165 $this->info['GETID3_VERSION'] = GETID3_VERSION;
198 $this->info['filesize'] = filesize($filename);
206 if ((($this->info['filesize'] != 0) && (ftell($fp) == 0)) ||
207 ($this->info['filesize'] < 0) ||
209 unset($this->info['filesize']);
216 $this->info['avdataoffset'] = 0;
217 $this->info['avdataend'] = $this->info['filesize'];
218 $this->info['fileformat'] = ''; // filled in later
219 $this->info['audio']['dataformat'] = ''; // filled in later, unset if not used
220 $this->info['video']['dataformat'] = ''; // filled in later, unset if not used
221 $this->info['tags'] = array(); // filled in later, unset if not used
222 $this->info['error'] = array(); // filled in later, unset if not used
223 $this->info['warning'] = array(); // filled in later, unset if not used
224 $this->info['comments'] = array(); // filled in later, unset if not used
225 …$this->info['encoding'] = $this->encoding; // required by id3v2 and iso modules - can…
228 $this->info['filename'] = basename($filename);
229 $this->info['filepath'] = str_replace('\\', '/', realpath(dirname($filename)));
230 $this->info['filenamepath'] = $this->info['filepath'].'/'.$this->info['filename'];
237 $GETID3_ERRORARRAY = &$this->info['warning'];
239 $tag = new getid3_id3v2($fp, $this->info);
248 $this->info['id3v2']['header'] = true;
249 $this->info['id3v2']['majorversion'] = ord($header{3});
250 $this->info['id3v2']['minorversion'] = ord($header{4});
251 …$this->info['id3v2']['headerlength'] = getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 1…
253 $this->info['id3v2']['tag_offset_start'] = 0;
254 …$this->info['id3v2']['tag_offset_end'] = $this->info['id3v2']['tag_offset_start'] + $this->info[…
255 $this->info['avdataoffset'] = $this->info['id3v2']['tag_offset_end'];
266 $tag = new getid3_id3v1($fp, $this->info);
275 $tag = new getid3_apetag($fp, $this->info);
284 $tag = new getid3_lyrics3($fp, $this->info);
289 fseek($fp, $this->info['avdataoffset'], SEEK_SET);
302 …ned_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->inf…
307 $this->info['warning'][] = 'ID3 tags not allowed on this file type.';
312 if (isset($determined_format['fail_ape']) && in_array('ape', $this->info['tags'])) {
317 $this->info['warning'][] = 'APE tags not allowed on this file type.';
322 $this->info['mime_type'] = $determined_format['mime_type'];
344 $class = new $class_name($fp, $this->info, $determined_format['option']);
346 $class = new $class_name($fp, $this->info);
370 if (!$this->option_md5_data_source || empty($this->info['md5_data_source'])) {
387 return $this->info;
396 $this->info['error'][] = $message;
397 return $this->info;
403 $this->info['warning'][] = $message;
414 if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
415 unset($this->info['audio'][$key]);
417 if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
418 unset($this->info['video'][$key]);
423 if (!empty($this->info)) {
424 foreach ($this->info as $key => $value) {
425 if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
426 unset($this->info[$key]);
432 if (empty($this->info['fileformat'])) {
433 if (isset($this->info['avdataoffset'])) {
434 unset($this->info['avdataoffset']);
436 if (isset($this->info['avdataend'])) {
437 unset($this->info['avdataend']);
945 foreach ($this->GetFileFormatArray() as $format_name => $info) {
949 if (preg_match('/'.$info['pattern'].'/s', $filedata)) {
950 $info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
951 return $info;
960 $info = $GetFileFormatArray['mp3'];
961 $info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
962 return $info;
1022 if (isset($this->info[$comment_name]) && !isset($this->info[$comment_name]['encoding'])) {
1023 $this->info[$comment_name]['encoding'] = $encoding;
1027 if (!empty($this->info[$comment_name]['comments'])) {
1029 foreach ($this->info[$comment_name]['comments'] as $tag_key => $valuearray) {
1032 …$this->info['tags'][trim($tag_name)][trim($tag_key)][] = $value; // do not trim!! Unicode characte…
1037 if (!isset($this->info['tags'][$tag_name])) {
1043 foreach ($this->info['tags'][$tag_name] as $tag_key => $valuearray) {
1047 …$this->info['tags_html'][$tag_name][$tag_key][$key] = str_replace('&#0;', '', getid3_lib::MultiByt…
1049 $this->info['tags_html'][$tag_name][$tag_key][$key] = $value;
1055 …$this->CharConvert($this->info['tags'][$tag_name], $encoding); // only copy gets convert…
1074 if ((@$this->info['fileformat'] == 'ogg') && (@$this->info['audio']['dataformat'] == 'vorbis')) {
1096 …$this->info['warning'][] = 'Failed making system call to vorbiscomment.exe - '.$algorithm.'_data i…
1097 $this->info[$algorithm.'_data'] = false;
1111 $file = $this->info['filenamepath'];
1136 …$this->info['warning'][] = 'Failed making system call to vorbiscomment(.exe) - '.$algorith…
1137 $this->info[$algorithm.'_data'] = false;
1144 $this->info[$algorithm.'_data'] = getid3_lib::md5_file($temp);
1148 $this->info[$algorithm.'_data'] = getid3_lib::sha1_file($temp);
1164 …if (!empty($this->info['avdataoffset']) || (isset($this->info['avdataend']) && ($this->info['avdat…
1167 …$this->info[$algorithm.'_data'] = getid3_lib::hash_data($this->info['filenamepath'], $this->info['…
1174 $this->info[$algorithm.'_data'] = getid3_lib::md5_file($this->info['filenamepath']);
1178 $this->info[$algorithm.'_data'] = getid3_lib::sha1_file($this->info['filenamepath']);
1191 if (@$this->info['audio']['channels'] == '1') {
1192 $this->info['audio']['channelmode'] = 'mono';
1193 } elseif (@$this->info['audio']['channels'] == '2') {
1194 $this->info['audio']['channelmode'] = 'stereo';
1199 …$CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);
1200 …$CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);
1201 if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) {
1202 $this->info['bitrate'] = $CombinedBitrate;
1211 …isset($this->info['video']['dataformat']) && $this->info['video']['dataformat'] && (!isset($this->
1213 …if (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] > 0) && ($this->inf…
1215 if (isset($this->info['playtime_seconds']) && ($this->info['playtime_seconds'] > 0)) {
1217 if (isset($this->info['avdataend']) && isset($this->info['avdataoffset'])) {
1220 …$this->info['bitrate'] = round((($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $t…
1221 $this->info['video']['bitrate'] = $this->info['bitrate'] - $this->info['audio']['bitrate'];
1227 if (!isset($this->info['playtime_seconds']) && !empty($this->info['bitrate'])) {
1228 …$this->info['playtime_seconds'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) /…
1232 if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
1233 $this->info['playtime_string'] = getid3_lib::PlaytimeString($this->info['playtime_seconds']);
1239 if (empty($this->info['video'])) {
1242 if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
1245 if (empty($this->info['video']['bits_per_sample'])) {
1249 switch ($this->info['video']['dataformat']) {
1258 $BitrateCompressed = $this->info['filesize'] * 8;
1262 if (!empty($this->info['video']['frame_rate'])) {
1263 $FrameRate = $this->info['video']['frame_rate'];
1267 if (!empty($this->info['playtime_seconds'])) {
1268 $PlaytimeSeconds = $this->info['playtime_seconds'];
1272 if (!empty($this->info['video']['bitrate'])) {
1273 $BitrateCompressed = $this->info['video']['bitrate'];
1279 …$BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y']…
1281 $this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed;
1287 …if (empty($this->info['audio']['bitrate']) || empty($this->info['audio']['channels']) || empty($th…
1290info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['chan…
1292 if (!empty($this->info['audio']['streams'])) {
1293 foreach ($this->info['audio']['streams'] as $streamnumber => $streamdata) {
1295 …$this->info['audio']['streams'][$streamnumber]['compression_ratio'] = $streamdata['bitrate'] / ($s…
1304 if (isset($this->info['replay_gain'])) {
1305 $this->info['replay_gain']['reference_volume'] = 89;
1306 if (isset($this->info['replay_gain']['track']['adjustment'])) {
1307 …$this->info['replay_gain']['track']['volume'] = $this->info['replay_gain']['reference_volume'] - $…
1309 if (isset($this->info['replay_gain']['album']['adjustment'])) {
1310 …$this->info['replay_gain']['album']['volume'] = $this->info['replay_gain']['reference_volume'] - $…
1313 if (isset($this->info['replay_gain']['track']['peak'])) {
1314 …$this->info['replay_gain']['track']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->i…
1316 if (isset($this->info['replay_gain']['album']['peak'])) {
1317 …$this->info['replay_gain']['album']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->i…
1324 …if (!empty($this->info['audio']['bitrate']) || !empty($this->info['audio']['channels']) || !empty(…
1325 if (!isset($this->info['audio']['streams'])) {
1326 foreach ($this->info['audio'] as $key => $value) {
1328 $this->info['audio']['streams'][0][$key] = $value;