- Timestamp:
- 09/11/2014 07:06:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.audio-video.matroska.php
r24696 r29734 4 4 // available at http://getid3.sourceforge.net // 5 5 // or http://www.getid3.org // 6 // also https://github.com/JamesHeinrich/getID3 // 6 7 ///////////////////////////////////////////////////////////////// 7 8 // See readme.txt for more details // … … 282 283 switch ($trackarray['CodecID']) { 283 284 case 'V_MS/VFW/FOURCC': 284 if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, false)) { 285 $this->warning('Unable to parse codec private data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio-video.riff.php"'); 286 break; 287 } 285 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true); 286 288 287 $parsed = getid3_riff::ParseBITMAPINFOHEADER($trackarray['CodecPrivate']); 289 288 $track_info['codec'] = getid3_riff::fourccLookup($parsed['fourcc']); … … 336 335 case 'A_MPEG/L2': 337 336 case 'A_FLAC': 338 if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']).'.php', __FILE__, false)) { 339 $this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio.'.$track_info['dataformat'].'.php"'); 340 break; 341 } 337 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.'.($track_info['dataformat'] == 'mp2' ? 'mp3' : $track_info['dataformat']).'.php', __FILE__, true); 342 338 343 339 if (!isset($info['matroska']['track_data_offsets'][$trackarray['TrackNumber']])) { … … 386 382 if (!empty($getid3_temp->info['warning'])) { 387 383 foreach ($getid3_temp->info['warning'] as $newerror) { 388 if ($track_info['dataformat'] == 'mp3' && preg_match('/^Probable truncated file: expecting \d+ bytes of audio data, only found \d+ \(short by \d+ bytes\)$/', $newerror)) {389 // LAME/Xing header is probably set, but audio data is chunked into Matroska file and near-impossible to verify if audio stream is complete, so ignore useless warning390 continue;391 }392 384 $this->warning($class.'() says: ['.$newerror.']'); 393 385 } … … 401 393 case 'A_AAC/MPEG4/LC': 402 394 case 'A_AAC/MPEG4/LC/SBR': 403 395 $this->warning($trackarray['CodecID'].' audio data contains no header, audio/video bitrates can\'t be calculated'); 404 396 break; 405 397 … … 416 408 $vorbis_offset -= 1; 417 409 418 if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, false)) { 419 $this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio.ogg.php"'); 420 break; 421 } 410 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.ogg.php', __FILE__, true); 422 411 423 412 // create temp instance … … 456 445 457 446 case 'A_MS/ACM': 458 if (!getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, false)) { 459 $this->warning('Unable to parse audio data ['.basename(__FILE__).':'.__LINE__.'] because cannot include "module.audio-video.riff.php"'); 460 break; 461 } 447 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true); 462 448 463 449 $parsed = getid3_riff::parseWAVEFORMATex($trackarray['CodecPrivate']); … … 516 502 517 503 case EBML_ID_EBML: 518 $info['fileformat'] = 'matroska';519 504 $info['matroska']['header']['offset'] = $top_element['offset']; 520 505 $info['matroska']['header']['length'] = $top_element['length']; … … 535 520 $element_data['data'] = getid3_lib::trimNullByte($element_data['data']); 536 521 $info['matroska']['doctype'] = $element_data['data']; 522 $info['fileformat'] = $element_data['data']; 537 523 break; 538 524 … … 1527 1513 $CodecIDlist['V_MPEG4/ISO/SP'] = 'mpeg4'; 1528 1514 $CodecIDlist['V_VP8'] = 'vp8'; 1529 $CodecIDlist['V_MS/VFW/FOURCC'] = ' riff';1530 $CodecIDlist['A_MS/ACM'] = ' riff';1515 $CodecIDlist['V_MS/VFW/FOURCC'] = 'vcm'; // Microsoft (TM) Video Codec Manager (VCM) 1516 $CodecIDlist['A_MS/ACM'] = 'acm'; // Microsoft (TM) Audio Codec Manager (ACM) 1531 1517 } 1532 1518 return (isset($CodecIDlist[$codecid]) ? $CodecIDlist[$codecid] : $codecid);
Note: See TracChangeset
for help on using the changeset viewer.