AnalyzeString example


                                $getid3_temp->info['avdataoffset'] = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'];
                                if ($track_info['dataformat'][0] == 'm' || $track_info['dataformat'] == 'flac') {
                                    $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 {
                                        // Dolby Digital WAV                                         // AC-3 content, but not encoded in same format as normal AC-3 file                                         // For one thing, byte order is swapped                                         $ac3_data = '';
                                        for ($i = 0; $i < 28; $i += 2) {
                                            $ac3_data .= substr($testData, 8 + $i + 1, 1);
                                            $ac3_data .= substr($testData, 8 + $i + 0, 1);
                                        }
                                        $getid3_ac3->getid3->info['avdataoffset'] = 0;
                                        $getid3_ac3->getid3->info['avdataend']    = strlen($ac3_data);
                                        $getid3_ac3->AnalyzeString($ac3_data);
                                    }

                                    if (empty($getid3_temp->info['error'])) {
                                        $info['audio'] = $getid3_temp->info['audio'];
                                        $info['ac3']   = $getid3_temp->info['ac3'];
                                        if (!empty($getid3_temp->info['warning'])) {
                                            foreach ($getid3_temp->info['warning'] as $newerror) {
                                                $this->warning('getid3_ac3() says: ['.$newerror.']');
                                            }
                                        }
                                    }
                                    
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']);
                                break;

                            
Home | Imprint | This part of the site doesn't use cookies.