Lines Matching refs:info

30 		$info = &$this->getid3->info;
32 $info['fileformat'] = 'ogg';
35 if (isset($info['id3v2'])) {
38 if (isset($info['id3v1'])) {
41 if (isset($info['ape'])) {
48 $this->fseek($info['avdataoffset']);
51 $info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
55 unset($info['fileformat']);
56 unset($info['ogg']);
65 $info['audio']['dataformat'] = 'flac';
66 $info['audio']['bitrate_mode'] = 'vbr';
67 $info['audio']['lossless'] = true;
83 $info['audio']['dataformat'] = 'speex';
84 $info['mime_type'] = 'audio/speex';
85 $info['audio']['bitrate_mode'] = 'abr';
86 $info['audio']['lossless'] = false;
88 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_string'] = …
90 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version'] = …
92 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['speex_version_id'] = getid3_lib::Lit…
94 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['header_size'] = getid3_lib::Lit…
96 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate'] = getid3_lib::Lit…
98 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode'] = getid3_lib::Lit…
100 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['mode_bitstream_version'] = getid3_lib::Lit…
102 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_channels'] = getid3_lib::Lit…
104 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['bitrate'] = getid3_lib::Lit…
106 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['framesize'] = getid3_lib::Lit…
108 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['vbr'] = getid3_lib::Lit…
110 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['frames_per_packet'] = getid3_lib::Lit…
112 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['extra_headers'] = getid3_lib::Lit…
114 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved1'] = getid3_lib::Lit…
116 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['reserved2'] = getid3_lib::Lit…
119 …$info['speex']['speex_version'] = trim($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['spe…
120 $info['speex']['sample_rate'] = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['rate'];
121 …$info['speex']['channels'] = $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['nb_chann…
122 …$info['speex']['vbr'] = (bool) $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['v…
123 …$info['speex']['band_type'] = $this->SpeexBandModeLookup($info['ogg']['pageheader'][$oggpagein…
125 $info['audio']['sample_rate'] = $info['speex']['sample_rate'];
126 $info['audio']['channels'] = $info['speex']['channels'];
127 if ($info['speex']['vbr']) {
128 $info['audio']['bitrate_mode'] = 'vbr';
135 …$info['ogg']['pageheader']['theora']['theora_magic'] = subst…
137 …$info['ogg']['pageheader']['theora']['version_major'] = getid3_lib::BigEndian2Int(subst…
139 …$info['ogg']['pageheader']['theora']['version_minor'] = getid3_lib::BigEndian2Int(subst…
141 …$info['ogg']['pageheader']['theora']['version_revision'] = getid3_lib::BigEndian2Int(subst…
143 …$info['ogg']['pageheader']['theora']['frame_width_macroblocks'] = getid3_lib::BigEndian2Int(subst…
145 …$info['ogg']['pageheader']['theora']['frame_height_macroblocks'] = getid3_lib::BigEndian2Int(subst…
147 …$info['ogg']['pageheader']['theora']['resolution_x'] = getid3_lib::BigEndian2Int(subst…
149 …$info['ogg']['pageheader']['theora']['resolution_y'] = getid3_lib::BigEndian2Int(subst…
151 …$info['ogg']['pageheader']['theora']['picture_offset_x'] = getid3_lib::BigEndian2Int(subst…
153 …$info['ogg']['pageheader']['theora']['picture_offset_y'] = getid3_lib::BigEndian2Int(subst…
155 …$info['ogg']['pageheader']['theora']['frame_rate_numerator'] = getid3_lib::BigEndian2Int(subst…
157 …$info['ogg']['pageheader']['theora']['frame_rate_denominator'] = getid3_lib::BigEndian2Int(subst…
159 …$info['ogg']['pageheader']['theora']['pixel_aspect_numerator'] = getid3_lib::BigEndian2Int(subst…
161 …$info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] = getid3_lib::BigEndian2Int(subst…
163 …$info['ogg']['pageheader']['theora']['color_space_id'] = getid3_lib::BigEndian2Int(subst…
165 …$info['ogg']['pageheader']['theora']['nominal_bitrate'] = getid3_lib::BigEndian2Int(subst…
167 …$info['ogg']['pageheader']['theora']['flags'] = getid3_lib::BigEndian2Int(subst…
170 …$info['ogg']['pageheader']['theora']['quality'] = ($info['ogg']['pageheader']['theora']['f…
171 …$info['ogg']['pageheader']['theora']['kfg_shift'] = ($info['ogg']['pageheader']['theora']['f…
172 …$info['ogg']['pageheader']['theora']['pixel_format_id'] = ($info['ogg']['pageheader']['theora']['f…
173 …$info['ogg']['pageheader']['theora']['reserved'] = ($info['ogg']['pageheader']['theora']['f…
174 …$info['ogg']['pageheader']['theora']['color_space'] = self::TheoraColorSpace($info['ogg']['pag…
175 …$info['ogg']['pageheader']['theora']['pixel_format'] = self::TheoraPixelFormat($info['ogg']['pa…
177 $info['video']['dataformat'] = 'theora';
178 $info['mime_type'] = 'video/ogg';
181 $info['video']['resolution_x'] = $info['ogg']['pageheader']['theora']['resolution_x'];
182 $info['video']['resolution_y'] = $info['ogg']['pageheader']['theora']['resolution_y'];
183 if ($info['ogg']['pageheader']['theora']['frame_rate_denominator'] > 0) {
184 …$info['video']['frame_rate'] = (float) $info['ogg']['pageheader']['theora']['frame_rate_numerator'…
186 if ($info['ogg']['pageheader']['theora']['pixel_aspect_denominator'] > 0) {
187 …$info['video']['pixel_aspect_ratio'] = (float) $info['ogg']['pageheader']['theora']['pixel_aspect_…
197 …$info['ogg']['skeleton']['fishead']['raw']['version_major'] = getid3_lib::LittleEnd…
199 …$info['ogg']['skeleton']['fishead']['raw']['version_minor'] = getid3_lib::LittleEnd…
201 …$info['ogg']['skeleton']['fishead']['raw']['presentationtime_numerator'] = getid3_lib::LittleEnd…
203 …$info['ogg']['skeleton']['fishead']['raw']['presentationtime_denominator'] = getid3_lib::LittleEnd…
205 …$info['ogg']['skeleton']['fishead']['raw']['basetime_numerator'] = getid3_lib::LittleEnd…
207 …$info['ogg']['skeleton']['fishead']['raw']['basetime_denominator'] = getid3_lib::LittleEnd…
209 …$info['ogg']['skeleton']['fishead']['raw']['utc'] = getid3_lib::LittleEnd…
212 …$info['ogg']['skeleton']['fishead']['version'] = $info['ogg']['skeleton']['fishead']['raw…
213 …$info['ogg']['skeleton']['fishead']['presentationtime'] = $info['ogg']['skeleton']['fishead']['raw…
214 …$info['ogg']['skeleton']['fishead']['basetime'] = $info['ogg']['skeleton']['fishead']['raw…
215 …$info['ogg']['skeleton']['fishead']['utc'] = $info['ogg']['skeleton']['fishead']['raw…
221 $info['ogg']['pageheader'][$oggpageinfo['page_seqno'].'.'.$counter++] = $oggpageinfo;
228 …$info['ogg']['skeleton']['fisbone']['raw']['message_header_offset'] = getid3_lib::LittleEndian2I…
230 …$info['ogg']['skeleton']['fisbone']['raw']['serial_number'] = getid3_lib::LittleEndian2I…
232 …$info['ogg']['skeleton']['fisbone']['raw']['number_header_packets'] = getid3_lib::LittleEndian2I…
234 …$info['ogg']['skeleton']['fisbone']['raw']['granulerate_numerator'] = getid3_lib::LittleEndian2I…
236 …$info['ogg']['skeleton']['fisbone']['raw']['granulerate_denominator'] = getid3_lib::LittleEndian2I…
238 …$info['ogg']['skeleton']['fisbone']['raw']['basegranule'] = getid3_lib::LittleEndian2I…
240 …$info['ogg']['skeleton']['fisbone']['raw']['preroll'] = getid3_lib::LittleEndian2I…
242 …$info['ogg']['skeleton']['fisbone']['raw']['granuleshift'] = getid3_lib::LittleEndian2I…
244 …$info['ogg']['skeleton']['fisbone']['raw']['padding'] = …
249 $info['video']['dataformat'] = 'theora1';
272 $info['audio']['dataformat'] = 'flac';
273 $info['audio']['bitrate_mode'] = 'vbr';
274 $info['audio']['lossless'] = true;
276 …$info['ogg']['flac']['header']['version_major'] = ord(substr($filedata, …
277 …$info['ogg']['flac']['header']['version_minor'] = ord(substr($filedata, …
278 …$info['ogg']['flac']['header']['header_packets'] = getid3_lib::BigEndian2Int(substr($filedata, …
279 …$info['ogg']['flac']['header']['magic'] = substr($filedata, …
280 if ($info['ogg']['flac']['header']['magic'] != 'fLaC') {
281 …gg-FLAC expecting "fLaC", found "'.$info['ogg']['flac']['header']['magic'].'" ('.trim(getid3_lib::…
284 …$info['ogg']['flac']['header']['STREAMINFO_bytes'] = getid3_lib::BigEndian2Int(substr($filedata, 1…
285 $info['flac']['STREAMINFO'] = getid3_flac::parseSTREAMINFOdata(substr($filedata, 17, 34));
286 if (!empty($info['flac']['STREAMINFO']['sample_rate'])) {
287 $info['audio']['bitrate_mode'] = 'vbr';
288 $info['audio']['sample_rate'] = $info['flac']['STREAMINFO']['sample_rate'];
289 $info['audio']['channels'] = $info['flac']['STREAMINFO']['channels'];
290 $info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample'];
291 …$info['playtime_seconds'] = $info['flac']['STREAMINFO']['samples_stream'] / $info['flac'][…
297 unset($info['ogg']);
298 unset($info['mime_type']);
305 $info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
307 switch ($info['audio']['dataformat']) {
309 $filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
310 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2I…
311 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = …
326 $this->fseek($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length'], SEEK_CUR);
331 $filedata = $this->fread($info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_length']);
332 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, 0, 8); /…
344 if (!getid3_lib::intValueSupported($info['avdataend'])) {
350 $this->fseek(max($info['avdataend'] - $this->getid3->fread_buffer_size(), 0));
353 $this->fseek($info['avdataend'] - ($LastOggSpostion + strlen('SggO')));
354 $info['avdataend'] = $this->ftell();
355 $info['ogg']['pageheader']['eos'] = $this->ParseOggPageHeader();
356 $info['ogg']['samples'] = $info['ogg']['pageheader']['eos']['pcm_abs_position'];
357 if ($info['ogg']['samples'] == 0) {
361 if (!empty($info['audio']['sample_rate'])) {
362 …$info['ogg']['bitrate_average'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / ($info['ogg…
368 if (!empty($info['ogg']['bitrate_average'])) {
369 $info['audio']['bitrate'] = $info['ogg']['bitrate_average'];
370 } elseif (!empty($info['ogg']['bitrate_nominal'])) {
371 $info['audio']['bitrate'] = $info['ogg']['bitrate_nominal'];
372 } elseif (!empty($info['ogg']['bitrate_min']) && !empty($info['ogg']['bitrate_max'])) {
373 $info['audio']['bitrate'] = ($info['ogg']['bitrate_min'] + $info['ogg']['bitrate_max']) / 2;
375 if (isset($info['audio']['bitrate']) && !isset($info['playtime_seconds'])) {
376 if ($info['audio']['bitrate'] == 0) {
380 …$info['playtime_seconds'] = (float) ((($info['avdataend'] - $info['avdataoffset']) * 8) / $info['a…
383 if (isset($info['ogg']['vendor'])) {
384 $info['audio']['encoder'] = preg_replace('/^Encoded with /', '', $info['ogg']['vendor']);
387 if ($info['audio']['dataformat'] == 'vorbis') {
390 if (preg_match('/^Xiph.Org/', $info['audio']['encoder'])) {
392 if ($info['audio']['bitrate_mode'] == 'abr') {
395 $info['audio']['encoder_options'] = '-b '.round($info['ogg']['bitrate_nominal'] / 1000);
397 … elseif (($info['audio']['bitrate_mode'] == 'vbr') && ($info['audio']['channels'] == 2) && ($info[…
399 …$info['audio']['encoder_options'] = '-q '.$this->get_quality_from_nominal_bitrate($info['ogg']['bi…
404 if (empty($info['audio']['encoder_options']) && !empty($info['ogg']['bitrate_nominal'])) {
405 …$info['audio']['encoder_options'] = 'Nominal bitrate: '.intval(round($info['ogg']['bitrate_nominal…
421 $info = &$this->getid3->info;
422 $info['audio']['dataformat'] = 'vorbis';
423 $info['audio']['lossless'] = false;
425 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['packet_type'] = getid3_lib::LittleEndian2I…
427 …$info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['stream_type'] = substr($filedata, $filedat…
429 …$info['ogg']['bitstreamversion'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
431 …$info['ogg']['numberofchannels'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
433 $info['audio']['channels'] = $info['ogg']['numberofchannels'];
434 …$info['ogg']['samplerate'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
436 if ($info['ogg']['samplerate'] == 0) {
440 $info['audio']['sample_rate'] = $info['ogg']['samplerate'];
441 $info['ogg']['samples'] = 0; // filled in later
442 $info['ogg']['bitrate_average'] = 0; // filled in later
443 …$info['ogg']['bitrate_max'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
445 …$info['ogg']['bitrate_nominal'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
447 …$info['ogg']['bitrate_min'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
449 …$info['ogg']['blocksize_small'] = pow(2, getid3_lib::LittleEndian2Int(substr($filedata, $filedat…
450 …$info['ogg']['blocksize_large'] = pow(2, (getid3_lib::LittleEndian2Int(substr($filedata, $filedat…
451 …$info['ogg']['stop_bit'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,…
453 $info['audio']['bitrate_mode'] = 'vbr'; // overridden if actually abr
454 if ($info['ogg']['bitrate_max'] == 0xFFFFFFFF) {
455 unset($info['ogg']['bitrate_max']);
456 $info['audio']['bitrate_mode'] = 'abr';
458 if ($info['ogg']['bitrate_nominal'] == 0xFFFFFFFF) {
459 unset($info['ogg']['bitrate_nominal']);
461 if ($info['ogg']['bitrate_min'] == 0xFFFFFFFF) {
462 unset($info['ogg']['bitrate_min']);
463 $info['audio']['bitrate_mode'] = 'abr';
478 $info = &$this->getid3->info;
479 $info['audio']['dataformat'] = 'opus';
480 $info['mime_type'] = 'audio/ogg; codecs=opus';
483 $info['audio']['bitrate_mode'] = 'vbr';
485 $info['audio']['lossless'] = false;
487 …$info['ogg']['pageheader']['opus']['opus_magic'] = substr($filedata, $filedataoffset, 8); // hard-…
489 …$info['ogg']['pageheader']['opus']['version'] = getid3_lib::LittleEndian2Int(substr($filedata, …
492 …if ($info['ogg']['pageheader']['opus']['version'] < 1 || $info['ogg']['pageheader']['opus']['versi…
497 …$info['ogg']['pageheader']['opus']['out_channel_count'] = getid3_lib::LittleEndian2Int(substr($fil…
500 if ($info['ogg']['pageheader']['opus']['out_channel_count'] == 0) {
505 …$info['ogg']['pageheader']['opus']['pre_skip'] = getid3_lib::LittleEndian2Int(substr($filedata, $f…
508 …$info['ogg']['pageheader']['opus']['input_sample_rate'] = getid3_lib::LittleEndian2Int(substr($fil…
517 $info['opus']['opus_version'] = $info['ogg']['pageheader']['opus']['version'];
518 $info['opus']['sample_rate_input'] = $info['ogg']['pageheader']['opus']['input_sample_rate'];
519 $info['opus']['out_channel_count'] = $info['ogg']['pageheader']['opus']['out_channel_count'];
521 $info['audio']['channels'] = $info['opus']['out_channel_count'];
522 $info['audio']['sample_rate_input'] = $info['opus']['sample_rate_input'];
523 …$info['audio']['sample_rate'] = 48000; // "All Opus audio is coded at 48 kHz, and should als…
587 $info = &$this->getid3->info;
595 switch ($info['audio']['dataformat']) {
599 …$CommentStartOffset = $info['ogg']['pageheader'][$VorbisCommentPage]['page_start_offset']; // Sec…
601 $commentdataoffset = 27 + $info['ogg']['pageheader'][$VorbisCommentPage]['page_segments'];
602 …$commentdata = $this->fread(self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPa…
604 if ($info['audio']['dataformat'] == 'vorbis') {
607 else if ($info['audio']['dataformat'] == 'opus') {
614 $CommentStartOffset = $info['flac']['VORBIS_COMMENT']['raw']['offset'] + 4;
616 $commentdata = $this->fread($info['flac']['VORBIS_COMMENT']['raw']['block_length']);
626 $info['ogg']['vendor'] = substr($commentdata, $commentdataoffset, $VendorSize);
631 $info['avdataoffset'] = $CommentStartOffset + $commentdataoffset;
634 $ThisFileInfo_ogg_comments_raw = &$info['ogg']['comments_raw'];
647 $info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
658 …$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['pa…
659 …$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments'…
665 …$commentdata .= $this->fread($this->OggPageSegmentLength($info['ogg']['pageheader'][$VorbisComment…
672 …$info['avdataoffset'] = $ThisFileInfo_ogg_comments_raw[$i]['dataoffset'] + $ThisFileInfo_ogg_comme…
676 …if (($ThisFileInfo_ogg_comments_raw[$i]['size'] > $info['avdataend']) || ($ThisFileInfo_ogg_commen…
684 $info['ogg']['pageheader'][$oggpageinfo['page_seqno']] = $oggpageinfo;
693 …$commentdata .= str_repeat("\x00", 27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['pa…
694 …$commentdataoffset += (27 + $info['ogg']['pageheader'][$oggpageinfo['page_seqno']]['page_segments'…
700 if (!isset($info['ogg']['pageheader'][$VorbisCommentPage])) {
704 $readlength = self::OggPageSegmentLength($info['ogg']['pageheader'][$VorbisCommentPage], 1);
736 $info['ogg']['comments']['picture'][] = $flac->getid3->info['flac']['PICTURE'][0];
752 $info['ogg']['comments']['picture'][] = array(
764 …$info['ogg']['comments'][strtolower($ThisFileInfo_ogg_comments_raw[$i]['key'])][] = $ThisFileInfo_…
780 if (isset($info['ogg']['comments']) && is_array($info['ogg']['comments'])) {
781 foreach ($info['ogg']['comments'] as $index => $commentvalue) {
785 $info['replay_gain']['album']['adjustment'] = (double) $commentvalue[0];
786 unset($info['ogg']['comments'][$index]);
791 $info['replay_gain']['track']['adjustment'] = (double) $commentvalue[0];
792 unset($info['ogg']['comments'][$index]);
796 $info['replay_gain']['album']['peak'] = (double) $commentvalue[0];
797 unset($info['ogg']['comments'][$index]);
802 $info['replay_gain']['track']['peak'] = (double) $commentvalue[0];
803 unset($info['ogg']['comments'][$index]);
807 $info['replay_gain']['reference_volume'] = (double) $commentvalue[0];
808 unset($info['ogg']['comments'][$index]);