Analyze example

$info['avdataend'] = $lyrics3offset;
            $this->getLyrics3Data($lyrics3offset$lyrics3version$lyrics3size);

            if (!isset($info['ape'])) {
                if (isset($info['lyrics3']['tag_offset_start'])) {
                    $GETID3_ERRORARRAY = &$info['warning'];
                    getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.apetag.php', __FILE__, true);
                    $getid3_temp = new getID3();
                    $getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize']$this->getid3->fp);
                    $getid3_apetag = new getid3_apetag($getid3_temp);
                    $getid3_apetag->overrideendoffset = $info['lyrics3']['tag_offset_start'];
                    $getid3_apetag->Analyze();
                    if (!empty($getid3_temp->info['ape'])) {
                        $info['ape'] = $getid3_temp->info['ape'];
                    }
                    if (!empty($getid3_temp->info['replay_gain'])) {
                        $info['replay_gain'] = $getid3_temp->info['replay_gain'];
                    }
                    unset($getid3_temp$getid3_apetag);
                } else {
                    $this->warning('Lyrics3 and APE tags appear to have become entangled (most likely due to updating the APE tags with a non-Lyrics3-aware tagger)');
                }
            }

        }
return $this->info;
            }

            // Handle tags             foreach (array('id3v2'=>'id3v2', 'id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
                $option_tag = 'option_tag_'.$tag_name;
                if ($this->$option_tag) {
                    $this->include_module('tag.'.$tag_name);
                    try {
                        $tag_class = 'getid3_'.$tag_name;
                        $tag = new $tag_class($this);
                        $tag->Analyze();
                    }
                    catch (getid3_exception $e) {
                        throw $e;
                    }
                }
            }
            if (isset($this->info['id3v2']['tag_offset_start'])) {
                $this->info['avdataoffset'] = max($this->info['avdataoffset']$this->info['id3v2']['tag_offset_end']);
            }
            foreach (array('id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
                if (isset($this->info[$tag_key]['tag_offset_start'])) {
                    
$getid3_temp->info['avdataend'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'] + $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['length'];
                                }

                                // analyze                                 $class = 'getid3_'.$module_dataformat;
                                $header_data_key = $track_info['dataformat'][0] == 'm' ? 'mpeg' : $track_info['dataformat'];
                                $getid3_audio = new $class($getid3_temp, __CLASS__);
                                if ($track_info['dataformat'] == 'flac') {
                                    $getid3_audio->AnalyzeString($trackarray['CodecPrivate']);
                                }
                                else {
                                    $getid3_audio->Analyze();
                                }
                                if (!empty($getid3_temp->info[$header_data_key])) {
                                    $info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $getid3_temp->info[$header_data_key];
                                    if (isset($getid3_temp->info['audio']) && is_array($getid3_temp->info['audio'])) {
                                        foreach ($getid3_temp->info['audio'] as $sub_key => $value) {
                                            $track_info[$sub_key] = $value;
                                        }
                                    }
                                }
                                else {
                                    $this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because '.$class.'::Analyze() failed at offset '.$getid3_temp->info['avdataoffset']);
                                }
case 'CDXA':
                $info['fileformat'] = 'vcd'; // Asume Video CD                 $info['mime_type']  = 'video/mpeg';

                if (!empty($thisfile_riff['CDXA']['data'][0]['size'])) {
                    getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.mpeg.php', __FILE__, true);

                    $getid3_temp = new getID3();
                    $getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize']$this->getid3->fp);
                    $getid3_mpeg = new getid3_mpeg($getid3_temp);
                    $getid3_mpeg->Analyze();
                    if (empty($getid3_temp->info['error'])) {
                        $info['audio']   = $getid3_temp->info['audio'];
                        $info['video']   = $getid3_temp->info['video'];
                        $info['mpeg']    = $getid3_temp->info['mpeg'];
                        $info['warning'] = $getid3_temp->info['warning'];
                    }
                    unset($getid3_temp$getid3_mpeg);
                }
                break;

            case 'WEBP':
                
unset($mdat_offset$chapter_string_length$chapter_matches);
                    break;

                case 'ID32': // ID3v2                     getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true);

                    $getid3_temp = new getID3();
                    $getid3_temp->openfile($this->getid3->filename, $this->getid3->info['filesize']$this->getid3->fp);
                    $getid3_id3v2 = new getid3_id3v2($getid3_temp);
                    $getid3_id3v2->StartingOffset = $atom_structure['offset'] + 14; // framelength(4)+framename(4)+flags(4)+??(2)                     if ($atom_structure['valid'] = $getid3_id3v2->Analyze()) {
                        $atom_structure['id3v2'] = $getid3_temp->info['id3v2'];
                    } else {
                        $this->warning('ID32 frame at offset '.$atom_structure['offset'].' did not parse');
                    }
                    unset($getid3_temp$getid3_id3v2);
                    break;

                case 'free': // FREE space atom                 case 'skip': // SKIP atom                 case 'wide': // 64-bit expansion placeholder atom                     // 'free', 'skip' and 'wide' are just padding, contains no useful data at all
Home | Imprint | This part of the site doesn't use cookies.