getid3_id3v2 example



                    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 'isvbr':
                                if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']) {
                                    $thisfile_audio['bitrate_mode'] = 'vbr';
                                    $thisfile_video['bitrate_mode'] = 'vbr';
                                }
                                break;

                            case 'id3':
                                $this->getid3->include_module('tag.id3v2');

                                $getid3_id3v2 = new getid3_id3v2($this->getid3);
                                $getid3_id3v2->AnalyzeString($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
                                unset($getid3_id3v2);

                                if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] > 1024) {
                                    $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = '<value too large to display>';
                                }
                                break;

                            case 'wm/encodingtime':
                                $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
                                $thisfile_asf_comments['encoding_time_unix'] = array($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix']);
                                
if (isset($thisfile_riff[$RIFFsubtype][$ID3v2_key_bad]) && !array_key_exists($ID3v2_key_good$thisfile_riff[$RIFFsubtype])) {
                        $thisfile_riff[$RIFFsubtype][$ID3v2_key_good] = $thisfile_riff[$RIFFsubtype][$ID3v2_key_bad];
                        $this->warning('mapping "'.$ID3v2_key_bad.'" chunk to "'.$ID3v2_key_good.'"');
                    }
                }

                if (isset($thisfile_riff[$RIFFsubtype]['id3 '])) {
                    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 = $thisfile_riff[$RIFFsubtype]['id3 '][0]['offset'] + 8;
                    if ($thisfile_riff[$RIFFsubtype]['id3 '][0]['valid'] = $getid3_id3v2->Analyze()) {
                        $info['id3v2'] = $getid3_temp->info['id3v2'];
                    }
                    unset($getid3_temp$getid3_id3v2);
                }
                break;
        }

        if (isset($thisfile_riff_WAVE['DISP']) && is_array($thisfile_riff_WAVE['DISP'])) {
            $thisfile_riff['comments']['title'][] = trim(substr($thisfile_riff_WAVE['DISP'][count($thisfile_riff_WAVE['DISP']) - 1]['data'], 4));
        }
Home | Imprint | This part of the site doesn't use cookies.