Changeset 24696 for trunk/wp-includes/ID3/module.audio-video.matroska.php
- Timestamp:
- 07/13/2013 12:37:36 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ID3/module.audio-video.matroska.php
r23766 r24696 217 217 // public options 218 218 public static $hide_clusters = true; // if true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE] 219 public static $parse_whole_file = false; // true to parse the whole file, not only header [default: FALSE]220 221 // private parser settings/placeholders222 private $EBMLbuffer = '';223 private $EBMLbuffer_offset = 0;224 private $EBMLbuffer_length = 0;225 private $current_offset = 0;226 private $unuseful_elements = array(EBML_ID_CRC32, EBML_ID_VOID);219 public static $parse_whole_file = false; // true to parse the whole file, not only header [default: FALSE] 220 221 // private parser settings/placeholders 222 private $EBMLbuffer = ''; 223 private $EBMLbuffer_offset = 0; 224 private $EBMLbuffer_length = 0; 225 private $current_offset = 0; 226 private $unuseful_elements = array(EBML_ID_CRC32, EBML_ID_VOID); 227 227 228 228 public function Analyze() … … 496 496 } 497 497 498 // determine mime type498 // determine mime type 499 499 if (!empty($info['video']['streams'])) { 500 500 $info['mime_type'] = ($info['matroska']['doctype'] == 'webm' ? 'video/webm' : 'video/x-matroska'); … … 508 508 } 509 509 510 private function parseEBML(&$info) {510 private function parseEBML(&$info) { 511 511 // http://www.matroska.org/technical/specs/index.html#EBMLBasics 512 512 $this->current_offset = $info['avdataoffset']; … … 537 537 break; 538 538 539 case EBML_ID_CRC32: // not useful, ignore540 $this->current_offset = $element_data['end'];541 unset($element_data);542 break;543 544 539 default: 545 540 $this->unhandledElement('header', __LINE__, $element_data); 546 541 } 547 if (!empty($element_data)) { 548 unset($element_data['offset'], $element_data['end']); 549 $info['matroska']['header']['elements'][] = $element_data; 550 } 542 543 unset($element_data['offset'], $element_data['end']); 544 $info['matroska']['header']['elements'][] = $element_data; 551 545 } 552 546 break; … … 875 869 876 870 case EBML_ID_CUETRACKPOSITIONS: 877 $cuetrackpositions_entry = array();871 $cuetrackpositions_entry = array(); 878 872 879 873 while ($this->getEBMLelement($sub_sub_subelement, $sub_subelement['end'], true)) { … … 913 907 914 908 case EBML_ID_TAGS: // Element containing elements specific to Tracks/Chapters. 915 $tags_entry = array();909 $tags_entry = array(); 916 910 917 911 while ($this->getEBMLelement($subelement, $element_data['end'], false)) { … … 1210 1204 } 1211 1205 } 1212 }1206 } 1213 1207 1214 1208 private function EnsureBufferHasEnoughData($min_data=1024) { … … 1392 1386 $block_data['flags']['lacing_type'] = self::BlockLacingType($block_data['flags']['lacing']); 1393 1387 1394 // Lace (when lacing bit is set)1388 // Lace (when lacing bit is set) 1395 1389 if ($block_data['flags']['lacing'] > 0) { 1396 1390 $block_data['lace_frames'] = getid3_lib::BigEndian2Int($this->readEBMLelementData(1)) + 1; // Number of frames in the lace-1 (uint8)
Note: See TracChangeset
for help on using the changeset viewer.