ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
GetId3\Module\AudioVideo\Asf Class Reference

GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //. More...

+ Inheritance diagram for GetId3\Module\AudioVideo\Asf:
+ Collaboration diagram for GetId3\Module\AudioVideo\Asf:

Public Member Functions

 __construct (GetId3Core $getid3)
 
 analyze ()
 
 ASF_HeaderExtensionObjectDataParse (&$asf_header_extension_object_data, &$unhandled_sections)
 
 ASF_WMpicture (&$data)
 
- Public Member Functions inherited from GetId3\Handler\BaseHandler
 __construct (GetId3Core $getid3, $call_module=null)
 
 analyze ()
 Analyze from file pointer. More...
 
 AnalyzeString (&$string)
 Analyze from string instead. More...
 
 saveAttachment (&$ThisFileInfoIndex, $filename, $offset, $length)
 

Static Public Member Functions

static ASFCodecListObjectTypeLookup ($CodecListType)
 
static KnownGUIDs ()
 
static GUIDname ($GUIDstring)
 
static ASFIndexObjectIndexTypeLookup ($id)
 
static GUIDtoBytestring ($GUIDstring)
 
static BytestringToGUID ($Bytestring)
 
static FILETIMEtoUNIXtime ($FILETIME, $round=true)
 
static WMpictureTypeLookup ($WMpictureType)
 
static ASFmetadataLibraryObjectDataTypeLookup ($id)
 
static TrimConvert ($string)
 
static TrimTerm ($string)
 

Static Protected Attributes

static $GETID3_ASF_Extended_Stream_Properties_Object
 
static $GETID3_ASF_Padding_Object
 
static $GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio
 
static $GETID3_ASF_Script_Command_Object
 
static $GETID3_ASF_No_Error_Correction
 
static $GETID3_ASF_Content_Branding_Object
 
static $GETID3_ASF_Content_Encryption_Object
 
static $GETID3_ASF_Digital_Signature_Object
 
static $GETID3_ASF_Extended_Content_Encryption_Object
 
static $GETID3_ASF_Simple_Index_Object
 
static $GETID3_ASF_Degradable_JPEG_Media
 
static $GETID3_ASF_Payload_Extension_System_Timecode
 
static $GETID3_ASF_Binary_Media
 
static $GETID3_ASF_Timecode_Index_Object
 
static $GETID3_ASF_Metadata_Library_Object
 
static $GETID3_ASF_Reserved_3
 
static $GETID3_ASF_Reserved_4
 
static $GETID3_ASF_Command_Media
 
static $GETID3_ASF_Header_Extension_Object
 
static $GETID3_ASF_Media_Object_Index_Parameters_Obj
 
static $GETID3_ASF_Header_Object
 
static $GETID3_ASF_Content_Description_Object
 
static $GETID3_ASF_Error_Correction_Object
 
static $GETID3_ASF_Data_Object
 
static $GETID3_ASF_Web_Stream_Media_Subtype
 
static $GETID3_ASF_Stream_Bitrate_Properties_Object
 
static $GETID3_ASF_Language_List_Object
 
static $GETID3_ASF_Codec_List_Object
 
static $GETID3_ASF_Reserved_2
 
static $GETID3_ASF_File_Properties_Object
 
static $GETID3_ASF_File_Transfer_Media
 
static $GETID3_ASF_Old_RTP_Extension_Data
 
static $GETID3_ASF_Advanced_Mutual_Exclusion_Object
 
static $GETID3_ASF_Bandwidth_Sharing_Object
 
static $GETID3_ASF_Reserved_1
 
static $GETID3_ASF_Bandwidth_Sharing_Exclusive
 
static $GETID3_ASF_Bandwidth_Sharing_Partial
 
static $GETID3_ASF_JFIF_Media
 
static $GETID3_ASF_Stream_Properties_Object
 
static $GETID3_ASF_Video_Media
 
static $GETID3_ASF_Audio_Spread
 
static $GETID3_ASF_Metadata_Object
 
static $GETID3_ASF_Payload_Ext_Syst_Sample_Duration
 
static $GETID3_ASF_Group_Mutual_Exclusion_Object
 
static $GETID3_ASF_Extended_Content_Description_Object
 
static $GETID3_ASF_Stream_Prioritization_Object
 
static $GETID3_ASF_Payload_Ext_System_Content_Type
 
static $GETID3_ASF_Old_File_Properties_Object
 
static $GETID3_ASF_Old_ASF_Header_Object
 
static $GETID3_ASF_Old_ASF_Data_Object
 
static $GETID3_ASF_Index_Object
 
static $GETID3_ASF_Old_Stream_Properties_Object
 
static $GETID3_ASF_Old_Content_Description_Object
 
static $GETID3_ASF_Old_Script_Command_Object
 
static $GETID3_ASF_Old_Marker_Object
 
static $GETID3_ASF_Old_Component_Download_Object
 
static $GETID3_ASF_Old_Stream_Group_Object
 
static $GETID3_ASF_Old_Scalable_Object
 
static $GETID3_ASF_Old_Prioritization_Object
 
static $GETID3_ASF_Bitrate_Mutual_Exclusion_Object
 
static $GETID3_ASF_Old_Inter_Media_Dependency_Object
 
static $GETID3_ASF_Old_Rating_Object
 
static $GETID3_ASF_Index_Parameters_Object
 
static $GETID3_ASF_Old_Color_Table_Object
 
static $GETID3_ASF_Old_Language_List_Object
 
static $GETID3_ASF_Old_Audio_Media
 
static $GETID3_ASF_Old_Video_Media
 
static $GETID3_ASF_Old_Image_Media
 
static $GETID3_ASF_Old_Timecode_Media
 
static $GETID3_ASF_Old_Text_Media
 
static $GETID3_ASF_Old_MIDI_Media
 
static $GETID3_ASF_Old_Command_Media
 
static $GETID3_ASF_Old_No_Error_Concealment
 
static $GETID3_ASF_Old_Scrambled_Audio
 
static $GETID3_ASF_Old_No_Color_Table
 
static $GETID3_ASF_Old_SMPTE_Time
 
static $GETID3_ASF_Old_ASCII_Text
 
static $GETID3_ASF_Old_Unicode_Text
 
static $GETID3_ASF_Old_HTML_Text
 
static $GETID3_ASF_Old_URL_Command
 
static $GETID3_ASF_Old_Filename_Command
 
static $GETID3_ASF_Old_ACM_Codec
 
static $GETID3_ASF_Old_VCM_Codec
 
static $GETID3_ASF_Old_QuickTime_Codec
 
static $GETID3_ASF_Old_DirectShow_Transform_Filter
 
static $GETID3_ASF_Old_DirectShow_Rendering_Filter
 
static $GETID3_ASF_Old_No_Enhancement
 
static $GETID3_ASF_Old_Unknown_Enhancement_Type
 
static $GETID3_ASF_Old_Temporal_Enhancement
 
static $GETID3_ASF_Old_Spatial_Enhancement
 
static $GETID3_ASF_Old_Quality_Enhancement
 
static $GETID3_ASF_Old_Number_of_Channels_Enhancement
 
static $GETID3_ASF_Old_Frequency_Response_Enhancement
 
static $GETID3_ASF_Old_Media_Object
 
static $GETID3_ASF_Mutex_Language
 
static $GETID3_ASF_Mutex_Bitrate
 
static $GETID3_ASF_Mutex_Unknown
 
static $GETID3_ASF_Old_ASF_Placeholder_Object
 
static $GETID3_ASF_Old_Data_Unit_Extension_Object
 
static $GETID3_ASF_Web_Stream_Format
 
static $GETID3_ASF_Payload_Ext_System_File_Name
 
static $GETID3_ASF_Marker_Object
 
static $GETID3_ASF_Timecode_Index_Parameters_Object
 
static $GETID3_ASF_Audio_Media
 
static $GETID3_ASF_Media_Object_Index_Object
 
static $GETID3_ASF_Alt_Extended_Content_Encryption_Obj
 
static $GETID3_ASF_Index_Placeholder_Object
 
static $GETID3_ASF_Compatibility_Object
 

Additional Inherited Members

- Protected Member Functions inherited from GetId3\Handler\BaseHandler
 ftell ()
 
 fread ($bytes)
 
 fseek ($bytes, $whence=SEEK_SET)
 
 feof ()
 
 isDependencyFor ($module)
 
 error ($text)
 
 warning ($text)
 
- Protected Attributes inherited from GetId3\Handler\BaseHandler
 $getid3
 
 $data_string_flag = false
 
 $data_string = ''
 
 $data_string_position = 0
 
 $data_string_length = 0
 

Detailed Description

GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.

module for analyzing ASF, WMA and WMV files

Author
James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g GetId3 http://www.getid3.org

Definition at line 32 of file Asf.php.

Constructor & Destructor Documentation

◆ __construct()

GetId3\Module\AudioVideo\Asf::__construct ( GetId3Core  $getid3)

Definition at line 154 of file Asf.php.

155  {
156  parent::__construct($getid3); // extends GetId3_handler::__construct()
157  // initialize all GUID statics
158  $GUIDarray = self::KnownGUIDs();
159  foreach ($GUIDarray as $GUIDname => $hexstringvalue) {
160  if (property_exists($this, $GUIDname)) {
161  self::$$GUIDname = self::GUIDtoBytestring($hexstringvalue);
162  }
163  }
164  }

Member Function Documentation

◆ analyze()

GetId3\Module\AudioVideo\Asf::analyze ( )
Returns
boolean

Definition at line 170 of file Asf.php.

References $info, array, GetId3\Lib\Helper\array_merge_noclobber(), GetId3\Module\AudioVideo\Asf\ASF_HeaderExtensionObjectDataParse(), GetId3\Module\AudioVideo\Asf\ASF_WMpicture(), GetId3\Module\AudioVideo\Asf\ASFCodecListObjectTypeLookup(), GetId3\Module\AudioVideo\Asf\ASFIndexObjectIndexTypeLookup(), GetId3\Handler\BaseHandler\fread(), GetId3\Handler\BaseHandler\fseek(), GetId3\Handler\BaseHandler\ftell(), GetId3\GetId3Core\getTempDir(), GetId3\Lib\Helper\LittleEndian2Int(), GetId3\Lib\Helper\PrintHexBytes(), GetId3\Module\AudioVideo\Riff\RIFFfourccLookup(), and GetId3\Module\AudioVideo\Riff\RIFFparseWAVEFORMATex().

171  {
172  $info = &$this->getid3->info;
173 
174  // Shortcuts
175  $thisfile_audio = &$info['audio'];
176  $thisfile_video = &$info['video'];
177  $info['asf'] = array();
178  $thisfile_asf = &$info['asf'];
179  $thisfile_asf['comments'] = array();
180  $thisfile_asf_comments = &$thisfile_asf['comments'];
181  $thisfile_asf['header_object'] = array();
182  $thisfile_asf_headerobject = &$thisfile_asf['header_object'];
183 
184  // ASF structure:
185  // * Header Object [required]
186  // * File Properties Object [required] (global file attributes)
187  // * Stream Properties Object [required] (defines media stream & characteristics)
188  // * Header Extension Object [required] (additional functionality)
189  // * Content Description Object (bibliographic information)
190  // * Script Command Object (commands for during playback)
191  // * Marker Object (named jumped points within the file)
192  // * Data Object [required]
193  // * Data Packets
194  // * Index Object
195  // Header Object: (mandatory, one only)
196  // Field Name Field Type Size (bits)
197  // Object ID GUID 128 // GUID for header object - GETID3_ASF_Header_Object
198  // Object Size QWORD 64 // size of header object, including 30 bytes of Header Object header
199  // Number of Header Objects DWORD 32 // number of objects in header object
200  // Reserved1 BYTE 8 // hardcoded: 0x01
201  // Reserved2 BYTE 8 // hardcoded: 0x02
202 
203  $info['fileformat'] = 'asf';
204 
205  fseek($this->getid3->fp, $info['avdataoffset'], SEEK_SET);
206  $HeaderObjectData = fread($this->getid3->fp, 30);
207 
208  $thisfile_asf_headerobject['objectid'] = substr($HeaderObjectData, 0, 16);
209  $thisfile_asf_headerobject['objectid_guid'] = self::BytestringToGUID($thisfile_asf_headerobject['objectid']);
210  if ($thisfile_asf_headerobject['objectid'] != self::$GETID3_ASF_Header_Object) {
211  $info['warning'][] = 'ASF header GUID {' . self::BytestringToGUID($thisfile_asf_headerobject['objectid']) . '} does not match expected "GETID3_ASF_Header_Object" GUID {' . self::BytestringToGUID(self::$GETID3_ASF_Header_Object) . '}';
212  unset($info['fileformat']);
213  unset($info['asf']);
214 
215  return false;
216  }
217  $thisfile_asf_headerobject['objectsize'] = Helper::LittleEndian2Int(substr($HeaderObjectData,
218  16,
219  8));
220  $thisfile_asf_headerobject['headerobjects'] = Helper::LittleEndian2Int(substr($HeaderObjectData,
221  24,
222  4));
223  $thisfile_asf_headerobject['reserved1'] = Helper::LittleEndian2Int(substr($HeaderObjectData,
224  28,
225  1));
226  $thisfile_asf_headerobject['reserved2'] = Helper::LittleEndian2Int(substr($HeaderObjectData,
227  29,
228  1));
229 
230  $NextObjectOffset = ftell($this->getid3->fp);
231  $ASFHeaderData = fread($this->getid3->fp,
232  $thisfile_asf_headerobject['objectsize'] - 30);
233  $offset = 0;
234 
235  for ($HeaderObjectsCounter = 0;
236  $HeaderObjectsCounter < $thisfile_asf_headerobject['headerobjects'];
237  $HeaderObjectsCounter++) {
238  $NextObjectGUID = substr($ASFHeaderData, $offset, 16);
239  $offset += 16;
240  $NextObjectGUIDtext = self::BytestringToGUID($NextObjectGUID);
241  $NextObjectSize = Helper::LittleEndian2Int(substr($ASFHeaderData,
242  $offset,
243  8));
244  $offset += 8;
245  switch ($NextObjectGUID) {
246 
247  case self::$GETID3_ASF_File_Properties_Object:
248  // File Properties Object: (mandatory, one only)
249  // Field Name Field Type Size (bits)
250  // Object ID GUID 128 // GUID for file properties object - GETID3_ASF_File_Properties_Object
251  // Object Size QWORD 64 // size of file properties object, including 104 bytes of File Properties Object header
252  // File ID GUID 128 // unique ID - identical to File ID in Data Object
253  // File Size QWORD 64 // entire file in bytes. Invalid if Broadcast Flag == 1
254  // Creation Date QWORD 64 // date & time of file creation. Maybe invalid if Broadcast Flag == 1
255  // Data Packets Count QWORD 64 // number of data packets in Data Object. Invalid if Broadcast Flag == 1
256  // Play Duration QWORD 64 // playtime, in 100-nanosecond units. Invalid if Broadcast Flag == 1
257  // Send Duration QWORD 64 // time needed to send file, in 100-nanosecond units. Players can ignore this value. Invalid if Broadcast Flag == 1
258  // Preroll QWORD 64 // time to buffer data before starting to play file, in 1-millisecond units. If <> 0, PlayDuration and PresentationTime have been offset by this amount
259  // Flags DWORD 32 //
260  // * Broadcast Flag bits 1 (0x01) // file is currently being written, some header values are invalid
261  // * Seekable Flag bits 1 (0x02) // is file seekable
262  // * Reserved bits 30 (0xFFFFFFFC) // reserved - set to zero
263  // Minimum Data Packet Size DWORD 32 // in bytes. should be same as Maximum Data Packet Size. Invalid if Broadcast Flag == 1
264  // Maximum Data Packet Size DWORD 32 // in bytes. should be same as Minimum Data Packet Size. Invalid if Broadcast Flag == 1
265  // Maximum Bitrate DWORD 32 // maximum instantaneous bitrate in bits per second for entire file, including all data streams and ASF overhead
266  // shortcut
267  $thisfile_asf['file_properties_object'] = array();
268  $thisfile_asf_filepropertiesobject = &$thisfile_asf['file_properties_object'];
269 
270  $thisfile_asf_filepropertiesobject['offset'] = $NextObjectOffset + $offset;
271  $thisfile_asf_filepropertiesobject['objectid'] = $NextObjectGUID;
272  $thisfile_asf_filepropertiesobject['objectid_guid'] = $NextObjectGUIDtext;
273  $thisfile_asf_filepropertiesobject['objectsize'] = $NextObjectSize;
274  $thisfile_asf_filepropertiesobject['fileid'] = substr($ASFHeaderData,
275  $offset,
276  16);
277  $offset += 16;
278  $thisfile_asf_filepropertiesobject['fileid_guid'] = self::BytestringToGUID($thisfile_asf_filepropertiesobject['fileid']);
279  $thisfile_asf_filepropertiesobject['filesize'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
280  $offset,
281  8));
282  $offset += 8;
283  $thisfile_asf_filepropertiesobject['creation_date'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
284  $offset,
285  8));
286  $thisfile_asf_filepropertiesobject['creation_date_unix'] = self::FILETIMEtoUNIXtime($thisfile_asf_filepropertiesobject['creation_date']);
287  $offset += 8;
288  $thisfile_asf_filepropertiesobject['data_packets'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
289  $offset,
290  8));
291  $offset += 8;
292  $thisfile_asf_filepropertiesobject['play_duration'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
293  $offset,
294  8));
295  $offset += 8;
296  $thisfile_asf_filepropertiesobject['send_duration'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
297  $offset,
298  8));
299  $offset += 8;
300  $thisfile_asf_filepropertiesobject['preroll'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
301  $offset,
302  8));
303  $offset += 8;
304  $thisfile_asf_filepropertiesobject['flags_raw'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
305  $offset,
306  4));
307  $offset += 4;
308  $thisfile_asf_filepropertiesobject['flags']['broadcast'] = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0001);
309  $thisfile_asf_filepropertiesobject['flags']['seekable'] = (bool) ($thisfile_asf_filepropertiesobject['flags_raw'] & 0x0002);
310 
311  $thisfile_asf_filepropertiesobject['min_packet_size'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
312  $offset,
313  4));
314  $offset += 4;
315  $thisfile_asf_filepropertiesobject['max_packet_size'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
316  $offset,
317  4));
318  $offset += 4;
319  $thisfile_asf_filepropertiesobject['max_bitrate'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
320  $offset,
321  4));
322  $offset += 4;
323 
324  if ($thisfile_asf_filepropertiesobject['flags']['broadcast']) {
325 
326  // broadcast flag is set, some values invalid
327  unset($thisfile_asf_filepropertiesobject['filesize']);
328  unset($thisfile_asf_filepropertiesobject['data_packets']);
329  unset($thisfile_asf_filepropertiesobject['play_duration']);
330  unset($thisfile_asf_filepropertiesobject['send_duration']);
331  unset($thisfile_asf_filepropertiesobject['min_packet_size']);
332  unset($thisfile_asf_filepropertiesobject['max_packet_size']);
333  } else {
334 
335  // broadcast flag NOT set, perform calculations
336  $info['playtime_seconds'] = ($thisfile_asf_filepropertiesobject['play_duration'] / 10000000) - ($thisfile_asf_filepropertiesobject['preroll'] / 1000);
337 
338  //$info['bitrate'] = $thisfile_asf_filepropertiesobject['max_bitrate'];
339  $info['bitrate'] = ((isset($thisfile_asf_filepropertiesobject['filesize']) ? $thisfile_asf_filepropertiesobject['filesize'] : $info['filesize']) * 8) / $info['playtime_seconds'];
340  }
341  break;
342 
343  case self::$GETID3_ASF_Stream_Properties_Object:
344  // Stream Properties Object: (mandatory, one per media stream)
345  // Field Name Field Type Size (bits)
346  // Object ID GUID 128 // GUID for stream properties object - GETID3_ASF_Stream_Properties_Object
347  // Object Size QWORD 64 // size of stream properties object, including 78 bytes of Stream Properties Object header
348  // Stream Type GUID 128 // GETID3_ASF_Audio_Media, GETID3_ASF_Video_Media or GETID3_ASF_Command_Media
349  // Error Correction Type GUID 128 // GETID3_ASF_Audio_Spread for audio-only streams, GETID3_ASF_No_Error_Correction for other stream types
350  // Time Offset QWORD 64 // 100-nanosecond units. typically zero. added to all timestamps of samples in the stream
351  // Type-Specific Data Length DWORD 32 // number of bytes for Type-Specific Data field
352  // Error Correction Data Length DWORD 32 // number of bytes for Error Correction Data field
353  // Flags WORD 16 //
354  // * Stream Number bits 7 (0x007F) // number of this stream. 1 <= valid <= 127
355  // * Reserved bits 8 (0x7F80) // reserved - set to zero
356  // * Encrypted Content Flag bits 1 (0x8000) // stream contents encrypted if set
357  // Reserved DWORD 32 // reserved - set to zero
358  // Type-Specific Data BYTESTREAM variable // type-specific format data, depending on value of Stream Type
359  // Error Correction Data BYTESTREAM variable // error-correction-specific format data, depending on value of Error Correct Type
360  // There is one self::$GETID3_ASF_Stream_Properties_Object for each stream (audio, video) but the
361  // stream number isn't known until halfway through decoding the structure, hence it
362  // it is decoded to a temporary variable and then stuck in the appropriate index later
363  $StreamPropertiesObjectData = array();
364  $StreamPropertiesObjectData['offset'] = $NextObjectOffset + $offset;
365  $StreamPropertiesObjectData['objectid'] = $NextObjectGUID;
366  $StreamPropertiesObjectData['objectid_guid'] = $NextObjectGUIDtext;
367  $StreamPropertiesObjectData['objectsize'] = $NextObjectSize;
368  $StreamPropertiesObjectData['stream_type'] = substr($ASFHeaderData,
369  $offset,
370  16);
371  $offset += 16;
372  $StreamPropertiesObjectData['stream_type_guid'] = self::BytestringToGUID($StreamPropertiesObjectData['stream_type']);
373  $StreamPropertiesObjectData['error_correct_type'] = substr($ASFHeaderData,
374  $offset,
375  16);
376  $offset += 16;
377  $StreamPropertiesObjectData['error_correct_guid'] = self::BytestringToGUID($StreamPropertiesObjectData['error_correct_type']);
378  $StreamPropertiesObjectData['time_offset'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
379  $offset,
380  8));
381  $offset += 8;
382  $StreamPropertiesObjectData['type_data_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
383  $offset,
384  4));
385  $offset += 4;
386  $StreamPropertiesObjectData['error_data_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
387  $offset,
388  4));
389  $offset += 4;
390  $StreamPropertiesObjectData['flags_raw'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
391  $offset,
392  2));
393  $offset += 2;
394  $StreamPropertiesObjectStreamNumber = $StreamPropertiesObjectData['flags_raw'] & 0x007F;
395  $StreamPropertiesObjectData['flags']['encrypted'] = (bool) ($StreamPropertiesObjectData['flags_raw'] & 0x8000);
396 
397  $offset += 4; // reserved - DWORD
398  $StreamPropertiesObjectData['type_specific_data'] = substr($ASFHeaderData,
399  $offset,
400  $StreamPropertiesObjectData['type_data_length']);
401  $offset += $StreamPropertiesObjectData['type_data_length'];
402  $StreamPropertiesObjectData['error_correct_data'] = substr($ASFHeaderData,
403  $offset,
404  $StreamPropertiesObjectData['error_data_length']);
405  $offset += $StreamPropertiesObjectData['error_data_length'];
406 
407  switch ($StreamPropertiesObjectData['stream_type']) {
408 
409  case self::$GETID3_ASF_Audio_Media:
410  $thisfile_audio['dataformat'] = (!empty($thisfile_audio['dataformat']) ? $thisfile_audio['dataformat'] : 'asf');
411  $thisfile_audio['bitrate_mode'] = (!empty($thisfile_audio['bitrate_mode']) ? $thisfile_audio['bitrate_mode'] : 'cbr');
412 
413  $audiodata = Riff::RIFFparseWAVEFORMATex(substr($StreamPropertiesObjectData['type_specific_data'],
414  0,
415  16));
416  unset($audiodata['raw']);
417  $thisfile_audio = Helper::array_merge_noclobber($audiodata,
418  $thisfile_audio);
419  break;
420 
421  case self::$GETID3_ASF_Video_Media:
422  $thisfile_video['dataformat'] = (!empty($thisfile_video['dataformat']) ? $thisfile_video['dataformat'] : 'asf');
423  $thisfile_video['bitrate_mode'] = (!empty($thisfile_video['bitrate_mode']) ? $thisfile_video['bitrate_mode'] : 'cbr');
424  break;
425 
426  case self::$GETID3_ASF_Command_Media:
427  default:
428  // do nothing
429  break;
430  }
431 
432  $thisfile_asf['stream_properties_object'][$StreamPropertiesObjectStreamNumber] = $StreamPropertiesObjectData;
433  unset($StreamPropertiesObjectData); // clear for next stream, if any
434  break;
435 
436  case self::$GETID3_ASF_Header_Extension_Object:
437  // Header Extension Object: (mandatory, one only)
438  // Field Name Field Type Size (bits)
439  // Object ID GUID 128 // GUID for Header Extension object - GETID3_ASF_Header_Extension_Object
440  // Object Size QWORD 64 // size of Header Extension object, including 46 bytes of Header Extension Object header
441  // Reserved Field 1 GUID 128 // hardcoded: GETID3_ASF_Reserved_1
442  // Reserved Field 2 WORD 16 // hardcoded: 0x00000006
443  // Header Extension Data Size DWORD 32 // in bytes. valid: 0, or > 24. equals object size minus 46
444  // Header Extension Data BYTESTREAM variable // array of zero or more extended header objects
445  // shortcut
446  $thisfile_asf['header_extension_object'] = array();
447  $thisfile_asf_headerextensionobject = &$thisfile_asf['header_extension_object'];
448 
449  $thisfile_asf_headerextensionobject['offset'] = $NextObjectOffset + $offset;
450  $thisfile_asf_headerextensionobject['objectid'] = $NextObjectGUID;
451  $thisfile_asf_headerextensionobject['objectid_guid'] = $NextObjectGUIDtext;
452  $thisfile_asf_headerextensionobject['objectsize'] = $NextObjectSize;
453  $thisfile_asf_headerextensionobject['reserved_1'] = substr($ASFHeaderData,
454  $offset,
455  16);
456  $offset += 16;
457  $thisfile_asf_headerextensionobject['reserved_1_guid'] = self::BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']);
458  if ($thisfile_asf_headerextensionobject['reserved_1'] != self::$GETID3_ASF_Reserved_1) {
459  $info['warning'][] = 'header_extension_object.reserved_1 GUID (' . self::BytestringToGUID($thisfile_asf_headerextensionobject['reserved_1']) . ') does not match expected "GETID3_ASF_Reserved_1" GUID (' . self::BytestringToGUID(self::$GETID3_ASF_Reserved_1) . ')';
460  //return false;
461  break;
462  }
463  $thisfile_asf_headerextensionobject['reserved_2'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
464  $offset,
465  2));
466  $offset += 2;
467  if ($thisfile_asf_headerextensionobject['reserved_2'] != 6) {
468  $info['warning'][] = 'header_extension_object.reserved_2 (' . Helper::PrintHexBytes($thisfile_asf_headerextensionobject['reserved_2']) . ') does not match expected value of "6"';
469  //return false;
470  break;
471  }
472  $thisfile_asf_headerextensionobject['extension_data_size'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
473  $offset,
474  4));
475  $offset += 4;
476  $thisfile_asf_headerextensionobject['extension_data'] = substr($ASFHeaderData,
477  $offset,
478  $thisfile_asf_headerextensionobject['extension_data_size']);
479  $unhandled_sections = 0;
480  $thisfile_asf_headerextensionobject['extension_data_parsed'] = $this->ASF_HeaderExtensionObjectDataParse($thisfile_asf_headerextensionobject['extension_data'],
481  $unhandled_sections);
482  if ($unhandled_sections === 0) {
483  unset($thisfile_asf_headerextensionobject['extension_data']);
484  }
485  $offset += $thisfile_asf_headerextensionobject['extension_data_size'];
486  break;
487 
488  case self::$GETID3_ASF_Codec_List_Object:
489  // Codec List Object: (optional, one only)
490  // Field Name Field Type Size (bits)
491  // Object ID GUID 128 // GUID for Codec List object - GETID3_ASF_Codec_List_Object
492  // Object Size QWORD 64 // size of Codec List object, including 44 bytes of Codec List Object header
493  // Reserved GUID 128 // hardcoded: 86D15241-311D-11D0-A3A4-00A0C90348F6
494  // Codec Entries Count DWORD 32 // number of entries in Codec Entries array
495  // Codec Entries array of: variable //
496  // * Type WORD 16 // 0x0001 = Video Codec, 0x0002 = Audio Codec, 0xFFFF = Unknown Codec
497  // * Codec Name Length WORD 16 // number of Unicode characters stored in the Codec Name field
498  // * Codec Name WCHAR variable // array of Unicode characters - name of codec used to create the content
499  // * Codec Description Length WORD 16 // number of Unicode characters stored in the Codec Description field
500  // * Codec Description WCHAR variable // array of Unicode characters - description of format used to create the content
501  // * Codec Information Length WORD 16 // number of Unicode characters stored in the Codec Information field
502  // * Codec Information BYTESTREAM variable // opaque array of information bytes about the codec used to create the content
503  // shortcut
504  $thisfile_asf['codec_list_object'] = array();
505  $thisfile_asf_codeclistobject = &$thisfile_asf['codec_list_object'];
506 
507  $thisfile_asf_codeclistobject['offset'] = $NextObjectOffset + $offset;
508  $thisfile_asf_codeclistobject['objectid'] = $NextObjectGUID;
509  $thisfile_asf_codeclistobject['objectid_guid'] = $NextObjectGUIDtext;
510  $thisfile_asf_codeclistobject['objectsize'] = $NextObjectSize;
511  $thisfile_asf_codeclistobject['reserved'] = substr($ASFHeaderData,
512  $offset,
513  16);
514  $offset += 16;
515  $thisfile_asf_codeclistobject['reserved_guid'] = self::BytestringToGUID($thisfile_asf_codeclistobject['reserved']);
516  if ($thisfile_asf_codeclistobject['reserved'] != self::GUIDtoBytestring('86D15241-311D-11D0-A3A4-00A0C90348F6')) {
517  $info['warning'][] = 'codec_list_object.reserved GUID {' . self::BytestringToGUID($thisfile_asf_codeclistobject['reserved']) . '} does not match expected "GETID3_ASF_Reserved_1" GUID {86D15241-311D-11D0-A3A4-00A0C90348F6}';
518  //return false;
519  break;
520  }
521  $thisfile_asf_codeclistobject['codec_entries_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
522  $offset,
523  4));
524  $offset += 4;
525  for ($CodecEntryCounter = 0;
526  $CodecEntryCounter < $thisfile_asf_codeclistobject['codec_entries_count'];
527  $CodecEntryCounter++) {
528  // shortcut
529  $thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter] = array();
530  $thisfile_asf_codeclistobject_codecentries_current = &$thisfile_asf_codeclistobject['codec_entries'][$CodecEntryCounter];
531 
532  $thisfile_asf_codeclistobject_codecentries_current['type_raw'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
533  $offset,
534  2));
535  $offset += 2;
536  $thisfile_asf_codeclistobject_codecentries_current['type'] = $this->ASFCodecListObjectTypeLookup($thisfile_asf_codeclistobject_codecentries_current['type_raw']);
537 
538  $CodecNameLength = Helper::LittleEndian2Int(substr($ASFHeaderData,
539  $offset,
540  2)) * 2; // 2 bytes per character
541  $offset += 2;
542  $thisfile_asf_codeclistobject_codecentries_current['name'] = substr($ASFHeaderData,
543  $offset,
544  $CodecNameLength);
545  $offset += $CodecNameLength;
546 
547  $CodecDescriptionLength = Helper::LittleEndian2Int(substr($ASFHeaderData,
548  $offset,
549  2)) * 2; // 2 bytes per character
550  $offset += 2;
551  $thisfile_asf_codeclistobject_codecentries_current['description'] = substr($ASFHeaderData,
552  $offset,
553  $CodecDescriptionLength);
554  $offset += $CodecDescriptionLength;
555 
556  $CodecInformationLength = Helper::LittleEndian2Int(substr($ASFHeaderData,
557  $offset,
558  2));
559  $offset += 2;
560  $thisfile_asf_codeclistobject_codecentries_current['information'] = substr($ASFHeaderData,
561  $offset,
562  $CodecInformationLength);
563  $offset += $CodecInformationLength;
564 
565  if ($thisfile_asf_codeclistobject_codecentries_current['type_raw'] == 2) { // audio codec
566  if (strpos($thisfile_asf_codeclistobject_codecentries_current['description'],
567  ',') === false) {
568  $info['warning'][] = '[asf][codec_list_object][codec_entries][' . $CodecEntryCounter . '][description] expected to contain comma-seperated list of parameters: "' . $thisfile_asf_codeclistobject_codecentries_current['description'] . '"';
569  } else {
570 
571  list($AudioCodecBitrate, $AudioCodecFrequency, $AudioCodecChannels) = explode(',',
572  self::TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']));
573  $thisfile_audio['codec'] = self::TrimConvert($thisfile_asf_codeclistobject_codecentries_current['name']);
574 
575  if (!isset($thisfile_audio['bitrate']) && strstr($AudioCodecBitrate,
576  'kbps')) {
577  $thisfile_audio['bitrate'] = (int) (trim(str_replace('kbps',
578  '',
579  $AudioCodecBitrate)) * 1000);
580  }
581  //if (!isset($thisfile_video['bitrate']) && isset($thisfile_audio['bitrate']) && isset($thisfile_asf['file_properties_object']['max_bitrate']) && ($thisfile_asf_codeclistobject['codec_entries_count'] > 1)) {
582  if (empty($thisfile_video['bitrate']) && !empty($thisfile_audio['bitrate']) && !empty($info['bitrate'])) {
583  //$thisfile_video['bitrate'] = $thisfile_asf['file_properties_object']['max_bitrate'] - $thisfile_audio['bitrate'];
584  $thisfile_video['bitrate'] = $info['bitrate'] - $thisfile_audio['bitrate'];
585  }
586 
587  $AudioCodecFrequency = (int) trim(str_replace('kHz',
588  '',
589  $AudioCodecFrequency));
590  switch ($AudioCodecFrequency) {
591  case 8:
592  case 8000:
593  $thisfile_audio['sample_rate'] = 8000;
594  break;
595 
596  case 11:
597  case 11025:
598  $thisfile_audio['sample_rate'] = 11025;
599  break;
600 
601  case 12:
602  case 12000:
603  $thisfile_audio['sample_rate'] = 12000;
604  break;
605 
606  case 16:
607  case 16000:
608  $thisfile_audio['sample_rate'] = 16000;
609  break;
610 
611  case 22:
612  case 22050:
613  $thisfile_audio['sample_rate'] = 22050;
614  break;
615 
616  case 24:
617  case 24000:
618  $thisfile_audio['sample_rate'] = 24000;
619  break;
620 
621  case 32:
622  case 32000:
623  $thisfile_audio['sample_rate'] = 32000;
624  break;
625 
626  case 44:
627  case 441000:
628  $thisfile_audio['sample_rate'] = 44100;
629  break;
630 
631  case 48:
632  case 48000:
633  $thisfile_audio['sample_rate'] = 48000;
634  break;
635 
636  default:
637  $info['warning'][] = 'unknown frequency: "' . $AudioCodecFrequency . '" (' . self::TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']) . ')';
638  break;
639  }
640 
641  if (!isset($thisfile_audio['channels'])) {
642  if (strstr($AudioCodecChannels, 'stereo')) {
643  $thisfile_audio['channels'] = 2;
644  } elseif (strstr($AudioCodecChannels, 'mono')) {
645  $thisfile_audio['channels'] = 1;
646  }
647  }
648  }
649  }
650  }
651  break;
652 
653  case self::$GETID3_ASF_Script_Command_Object:
654  // Script Command Object: (optional, one only)
655  // Field Name Field Type Size (bits)
656  // Object ID GUID 128 // GUID for Script Command object - GETID3_ASF_Script_Command_Object
657  // Object Size QWORD 64 // size of Script Command object, including 44 bytes of Script Command Object header
658  // Reserved GUID 128 // hardcoded: 4B1ACBE3-100B-11D0-A39B-00A0C90348F6
659  // Commands Count WORD 16 // number of Commands structures in the Script Commands Objects
660  // Command Types Count WORD 16 // number of Command Types structures in the Script Commands Objects
661  // Command Types array of: variable //
662  // * Command Type Name Length WORD 16 // number of Unicode characters for Command Type Name
663  // * Command Type Name WCHAR variable // array of Unicode characters - name of a type of command
664  // Commands array of: variable //
665  // * Presentation Time DWORD 32 // presentation time of that command, in milliseconds
666  // * Type Index WORD 16 // type of this command, as a zero-based index into the array of Command Types of this object
667  // * Command Name Length WORD 16 // number of Unicode characters for Command Name
668  // * Command Name WCHAR variable // array of Unicode characters - name of this command
669  // shortcut
670  $thisfile_asf['script_command_object'] = array();
671  $thisfile_asf_scriptcommandobject = &$thisfile_asf['script_command_object'];
672 
673  $thisfile_asf_scriptcommandobject['offset'] = $NextObjectOffset + $offset;
674  $thisfile_asf_scriptcommandobject['objectid'] = $NextObjectGUID;
675  $thisfile_asf_scriptcommandobject['objectid_guid'] = $NextObjectGUIDtext;
676  $thisfile_asf_scriptcommandobject['objectsize'] = $NextObjectSize;
677  $thisfile_asf_scriptcommandobject['reserved'] = substr($ASFHeaderData,
678  $offset,
679  16);
680  $offset += 16;
681  $thisfile_asf_scriptcommandobject['reserved_guid'] = self::BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']);
682  if ($thisfile_asf_scriptcommandobject['reserved'] != self::GUIDtoBytestring('4B1ACBE3-100B-11D0-A39B-00A0C90348F6')) {
683  $info['warning'][] = 'script_command_object.reserved GUID {' . self::BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']) . '} does not match expected "GETID3_ASF_Reserved_1" GUID {4B1ACBE3-100B-11D0-A39B-00A0C90348F6}';
684  //return false;
685  break;
686  }
687  $thisfile_asf_scriptcommandobject['commands_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
688  $offset,
689  2));
690  $offset += 2;
691  $thisfile_asf_scriptcommandobject['command_types_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
692  $offset,
693  2));
694  $offset += 2;
695  for ($CommandTypesCounter = 0;
696  $CommandTypesCounter < $thisfile_asf_scriptcommandobject['command_types_count'];
697  $CommandTypesCounter++) {
698  $CommandTypeNameLength = Helper::LittleEndian2Int(substr($ASFHeaderData,
699  $offset,
700  2)) * 2; // 2 bytes per character
701  $offset += 2;
702  $thisfile_asf_scriptcommandobject['command_types'][$CommandTypesCounter]['name'] = substr($ASFHeaderData,
703  $offset,
704  $CommandTypeNameLength);
705  $offset += $CommandTypeNameLength;
706  }
707  for ($CommandsCounter = 0;
708  $CommandsCounter < $thisfile_asf_scriptcommandobject['commands_count'];
709  $CommandsCounter++) {
710  $thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['presentation_time'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
711  $offset,
712  4));
713  $offset += 4;
714  $thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['type_index'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
715  $offset,
716  2));
717  $offset += 2;
718 
719  $CommandTypeNameLength = Helper::LittleEndian2Int(substr($ASFHeaderData,
720  $offset,
721  2)) * 2; // 2 bytes per character
722  $offset += 2;
723  $thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['name'] = substr($ASFHeaderData,
724  $offset,
725  $CommandTypeNameLength);
726  $offset += $CommandTypeNameLength;
727  }
728  break;
729 
730  case self::$GETID3_ASF_Marker_Object:
731  // Marker Object: (optional, one only)
732  // Field Name Field Type Size (bits)
733  // Object ID GUID 128 // GUID for Marker object - GETID3_ASF_Marker_Object
734  // Object Size QWORD 64 // size of Marker object, including 48 bytes of Marker Object header
735  // Reserved GUID 128 // hardcoded: 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB
736  // Markers Count DWORD 32 // number of Marker structures in Marker Object
737  // Reserved WORD 16 // hardcoded: 0x0000
738  // Name Length WORD 16 // number of bytes in the Name field
739  // Name WCHAR variable // name of the Marker Object
740  // Markers array of: variable //
741  // * Offset QWORD 64 // byte offset into Data Object
742  // * Presentation Time QWORD 64 // in 100-nanosecond units
743  // * Entry Length WORD 16 // length in bytes of (Send Time + Flags + Marker Description Length + Marker Description + Padding)
744  // * Send Time DWORD 32 // in milliseconds
745  // * Flags DWORD 32 // hardcoded: 0x00000000
746  // * Marker Description Length DWORD 32 // number of bytes in Marker Description field
747  // * Marker Description WCHAR variable // array of Unicode characters - description of marker entry
748  // * Padding BYTESTREAM variable // optional padding bytes
749  // shortcut
750  $thisfile_asf['marker_object'] = array();
751  $thisfile_asf_markerobject = &$thisfile_asf['marker_object'];
752 
753  $thisfile_asf_markerobject['offset'] = $NextObjectOffset + $offset;
754  $thisfile_asf_markerobject['objectid'] = $NextObjectGUID;
755  $thisfile_asf_markerobject['objectid_guid'] = $NextObjectGUIDtext;
756  $thisfile_asf_markerobject['objectsize'] = $NextObjectSize;
757  $thisfile_asf_markerobject['reserved'] = substr($ASFHeaderData,
758  $offset, 16);
759  $offset += 16;
760  $thisfile_asf_markerobject['reserved_guid'] = self::BytestringToGUID($thisfile_asf_markerobject['reserved']);
761  if ($thisfile_asf_markerobject['reserved'] != self::GUIDtoBytestring('4CFEDB20-75F6-11CF-9C0F-00A0C90349CB')) {
762  $info['warning'][] = 'marker_object.reserved GUID {' . self::BytestringToGUID($thisfile_asf_markerobject['reserved_1']) . '} does not match expected "GETID3_ASF_Reserved_1" GUID {4CFEDB20-75F6-11CF-9C0F-00A0C90349CB}';
763  break;
764  }
765  $thisfile_asf_markerobject['markers_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
766  $offset,
767  4));
768  $offset += 4;
769  $thisfile_asf_markerobject['reserved_2'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
770  $offset,
771  2));
772  $offset += 2;
773  if ($thisfile_asf_markerobject['reserved_2'] != 0) {
774  $info['warning'][] = 'marker_object.reserved_2 (' . Helper::PrintHexBytes($thisfile_asf_markerobject['reserved_2']) . ') does not match expected value of "0"';
775  break;
776  }
777  $thisfile_asf_markerobject['name_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
778  $offset,
779  2));
780  $offset += 2;
781  $thisfile_asf_markerobject['name'] = substr($ASFHeaderData,
782  $offset,
783  $thisfile_asf_markerobject['name_length']);
784  $offset += $thisfile_asf_markerobject['name_length'];
785  for ($MarkersCounter = 0;
786  $MarkersCounter < $thisfile_asf_markerobject['markers_count'];
787  $MarkersCounter++) {
788  $thisfile_asf_markerobject['markers'][$MarkersCounter]['offset'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
789  $offset,
790  8));
791  $offset += 8;
792  $thisfile_asf_markerobject['markers'][$MarkersCounter]['presentation_time'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
793  $offset,
794  8));
795  $offset += 8;
796  $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
797  $offset,
798  2));
799  $offset += 2;
800  $thisfile_asf_markerobject['markers'][$MarkersCounter]['send_time'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
801  $offset,
802  4));
803  $offset += 4;
804  $thisfile_asf_markerobject['markers'][$MarkersCounter]['flags'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
805  $offset,
806  4));
807  $offset += 4;
808  $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
809  $offset,
810  4));
811  $offset += 4;
812  $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description'] = substr($ASFHeaderData,
813  $offset,
814  $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length']);
815  $offset += $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
816  $PaddingLength = $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] - 4 - 4 - 4 - $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
817  if ($PaddingLength > 0) {
818  $thisfile_asf_markerobject['markers'][$MarkersCounter]['padding'] = substr($ASFHeaderData,
819  $offset,
820  $PaddingLength);
821  $offset += $PaddingLength;
822  }
823  }
824  break;
825 
826  case self::$GETID3_ASF_Bitrate_Mutual_Exclusion_Object:
827  // Bitrate Mutual Exclusion Object: (optional)
828  // Field Name Field Type Size (bits)
829  // Object ID GUID 128 // GUID for Bitrate Mutual Exclusion object - GETID3_ASF_Bitrate_Mutual_Exclusion_Object
830  // Object Size QWORD 64 // size of Bitrate Mutual Exclusion object, including 42 bytes of Bitrate Mutual Exclusion Object header
831  // Exlusion Type GUID 128 // nature of mutual exclusion relationship. one of: (GETID3_ASF_Mutex_Bitrate, GETID3_ASF_Mutex_Unknown)
832  // Stream Numbers Count WORD 16 // number of video streams
833  // Stream Numbers WORD variable // array of mutually exclusive video stream numbers. 1 <= valid <= 127
834  // shortcut
835  $thisfile_asf['bitrate_mutual_exclusion_object'] = array();
836  $thisfile_asf_bitratemutualexclusionobject = &$thisfile_asf['bitrate_mutual_exclusion_object'];
837 
838  $thisfile_asf_bitratemutualexclusionobject['offset'] = $NextObjectOffset + $offset;
839  $thisfile_asf_bitratemutualexclusionobject['objectid'] = $NextObjectGUID;
840  $thisfile_asf_bitratemutualexclusionobject['objectid_guid'] = $NextObjectGUIDtext;
841  $thisfile_asf_bitratemutualexclusionobject['objectsize'] = $NextObjectSize;
842  $thisfile_asf_bitratemutualexclusionobject['reserved'] = substr($ASFHeaderData,
843  $offset,
844  16);
845  $thisfile_asf_bitratemutualexclusionobject['reserved_guid'] = self::BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']);
846  $offset += 16;
847  if (($thisfile_asf_bitratemutualexclusionobject['reserved'] != self::$GETID3_ASF_Mutex_Bitrate) && ($thisfile_asf_bitratemutualexclusionobject['reserved'] != self::$GETID3_ASF_Mutex_Unknown)) {
848  $info['warning'][] = 'bitrate_mutual_exclusion_object.reserved GUID {' . self::BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']) . '} does not match expected "GETID3_ASF_Mutex_Bitrate" GUID {' . self::BytestringToGUID(self::$GETID3_ASF_Mutex_Bitrate) . '} or "GETID3_ASF_Mutex_Unknown" GUID {' . self::BytestringToGUID(self::$GETID3_ASF_Mutex_Unknown) . '}';
849  //return false;
850  break;
851  }
852  $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
853  $offset,
854  2));
855  $offset += 2;
856  for ($StreamNumberCounter = 0;
857  $StreamNumberCounter < $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'];
858  $StreamNumberCounter++) {
859  $thisfile_asf_bitratemutualexclusionobject['stream_numbers'][$StreamNumberCounter] = Helper::LittleEndian2Int(substr($ASFHeaderData,
860  $offset,
861  2));
862  $offset += 2;
863  }
864  break;
865 
866  case self::$GETID3_ASF_Error_Correction_Object:
867  // Error Correction Object: (optional, one only)
868  // Field Name Field Type Size (bits)
869  // Object ID GUID 128 // GUID for Error Correction object - GETID3_ASF_Error_Correction_Object
870  // Object Size QWORD 64 // size of Error Correction object, including 44 bytes of Error Correction Object header
871  // Error Correction Type GUID 128 // type of error correction. one of: (GETID3_ASF_No_Error_Correction, GETID3_ASF_Audio_Spread)
872  // Error Correction Data Length DWORD 32 // number of bytes in Error Correction Data field
873  // Error Correction Data BYTESTREAM variable // structure depends on value of Error Correction Type field
874  // shortcut
875  $thisfile_asf['error_correction_object'] = array();
876  $thisfile_asf_errorcorrectionobject = &$thisfile_asf['error_correction_object'];
877 
878  $thisfile_asf_errorcorrectionobject['offset'] = $NextObjectOffset + $offset;
879  $thisfile_asf_errorcorrectionobject['objectid'] = $NextObjectGUID;
880  $thisfile_asf_errorcorrectionobject['objectid_guid'] = $NextObjectGUIDtext;
881  $thisfile_asf_errorcorrectionobject['objectsize'] = $NextObjectSize;
882  $thisfile_asf_errorcorrectionobject['error_correction_type'] = substr($ASFHeaderData,
883  $offset,
884  16);
885  $offset += 16;
886  $thisfile_asf_errorcorrectionobject['error_correction_guid'] = self::BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']);
887  $thisfile_asf_errorcorrectionobject['error_correction_data_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
888  $offset,
889  4));
890  $offset += 4;
891  switch ($thisfile_asf_errorcorrectionobject['error_correction_type']) {
892  case self::$GETID3_ASF_No_Error_Correction:
893  // should be no data, but just in case there is, skip to the end of the field
894  $offset += $thisfile_asf_errorcorrectionobject['error_correction_data_length'];
895  break;
896 
897  case self::$GETID3_ASF_Audio_Spread:
898  // Field Name Field Type Size (bits)
899  // Span BYTE 8 // number of packets over which audio will be spread.
900  // Virtual Packet Length WORD 16 // size of largest audio payload found in audio stream
901  // Virtual Chunk Length WORD 16 // size of largest audio payload found in audio stream
902  // Silence Data Length WORD 16 // number of bytes in Silence Data field
903  // Silence Data BYTESTREAM variable // hardcoded: 0x00 * (Silence Data Length) bytes
904 
905  $thisfile_asf_errorcorrectionobject['span'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
906  $offset,
907  1));
908  $offset += 1;
909  $thisfile_asf_errorcorrectionobject['virtual_packet_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
910  $offset,
911  2));
912  $offset += 2;
913  $thisfile_asf_errorcorrectionobject['virtual_chunk_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
914  $offset,
915  2));
916  $offset += 2;
917  $thisfile_asf_errorcorrectionobject['silence_data_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
918  $offset,
919  2));
920  $offset += 2;
921  $thisfile_asf_errorcorrectionobject['silence_data'] = substr($ASFHeaderData,
922  $offset,
923  $thisfile_asf_errorcorrectionobject['silence_data_length']);
924  $offset += $thisfile_asf_errorcorrectionobject['silence_data_length'];
925  break;
926 
927  default:
928  $info['warning'][] = 'error_correction_object.error_correction_type GUID {' . self::BytestringToGUID($thisfile_asf_errorcorrectionobject['reserved']) . '} does not match expected "GETID3_ASF_No_Error_Correction" GUID {' . self::BytestringToGUID(self::$GETID3_ASF_No_Error_Correction) . '} or "GETID3_ASF_Audio_Spread" GUID {' . self::BytestringToGUID(self::$GETID3_ASF_Audio_Spread) . '}';
929  //return false;
930  break;
931  }
932 
933  break;
934 
935  case self::$GETID3_ASF_Content_Description_Object:
936  // Content Description Object: (optional, one only)
937  // Field Name Field Type Size (bits)
938  // Object ID GUID 128 // GUID for Content Description object - GETID3_ASF_Content_Description_Object
939  // Object Size QWORD 64 // size of Content Description object, including 34 bytes of Content Description Object header
940  // Title Length WORD 16 // number of bytes in Title field
941  // Author Length WORD 16 // number of bytes in Author field
942  // Copyright Length WORD 16 // number of bytes in Copyright field
943  // Description Length WORD 16 // number of bytes in Description field
944  // Rating Length WORD 16 // number of bytes in Rating field
945  // Title WCHAR 16 // array of Unicode characters - Title
946  // Author WCHAR 16 // array of Unicode characters - Author
947  // Copyright WCHAR 16 // array of Unicode characters - Copyright
948  // Description WCHAR 16 // array of Unicode characters - Description
949  // Rating WCHAR 16 // array of Unicode characters - Rating
950  // shortcut
951  $thisfile_asf['content_description_object'] = array();
952  $thisfile_asf_contentdescriptionobject = &$thisfile_asf['content_description_object'];
953 
954  $thisfile_asf_contentdescriptionobject['offset'] = $NextObjectOffset + $offset;
955  $thisfile_asf_contentdescriptionobject['objectid'] = $NextObjectGUID;
956  $thisfile_asf_contentdescriptionobject['objectid_guid'] = $NextObjectGUIDtext;
957  $thisfile_asf_contentdescriptionobject['objectsize'] = $NextObjectSize;
958  $thisfile_asf_contentdescriptionobject['title_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
959  $offset,
960  2));
961  $offset += 2;
962  $thisfile_asf_contentdescriptionobject['author_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
963  $offset,
964  2));
965  $offset += 2;
966  $thisfile_asf_contentdescriptionobject['copyright_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
967  $offset,
968  2));
969  $offset += 2;
970  $thisfile_asf_contentdescriptionobject['description_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
971  $offset,
972  2));
973  $offset += 2;
974  $thisfile_asf_contentdescriptionobject['rating_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
975  $offset,
976  2));
977  $offset += 2;
978  $thisfile_asf_contentdescriptionobject['title'] = substr($ASFHeaderData,
979  $offset,
980  $thisfile_asf_contentdescriptionobject['title_length']);
981  $offset += $thisfile_asf_contentdescriptionobject['title_length'];
982  $thisfile_asf_contentdescriptionobject['author'] = substr($ASFHeaderData,
983  $offset,
984  $thisfile_asf_contentdescriptionobject['author_length']);
985  $offset += $thisfile_asf_contentdescriptionobject['author_length'];
986  $thisfile_asf_contentdescriptionobject['copyright'] = substr($ASFHeaderData,
987  $offset,
988  $thisfile_asf_contentdescriptionobject['copyright_length']);
989  $offset += $thisfile_asf_contentdescriptionobject['copyright_length'];
990  $thisfile_asf_contentdescriptionobject['description'] = substr($ASFHeaderData,
991  $offset,
992  $thisfile_asf_contentdescriptionobject['description_length']);
993  $offset += $thisfile_asf_contentdescriptionobject['description_length'];
994  $thisfile_asf_contentdescriptionobject['rating'] = substr($ASFHeaderData,
995  $offset,
996  $thisfile_asf_contentdescriptionobject['rating_length']);
997  $offset += $thisfile_asf_contentdescriptionobject['rating_length'];
998 
999  $ASFcommentKeysToCopy = array('title' => 'title', 'author' => 'artist', 'copyright' => 'copyright', 'description' => 'comment', 'rating' => 'rating');
1000  foreach ($ASFcommentKeysToCopy as $keytocopyfrom => $keytocopyto) {
1001  if (!empty($thisfile_asf_contentdescriptionobject[$keytocopyfrom])) {
1002  $thisfile_asf_comments[$keytocopyto][] = self::TrimTerm($thisfile_asf_contentdescriptionobject[$keytocopyfrom]);
1003  }
1004  }
1005  break;
1006 
1007  case self::$GETID3_ASF_Extended_Content_Description_Object:
1008  // Extended Content Description Object: (optional, one only)
1009  // Field Name Field Type Size (bits)
1010  // Object ID GUID 128 // GUID for Extended Content Description object - GETID3_ASF_Extended_Content_Description_Object
1011  // Object Size QWORD 64 // size of ExtendedContent Description object, including 26 bytes of Extended Content Description Object header
1012  // Content Descriptors Count WORD 16 // number of entries in Content Descriptors list
1013  // Content Descriptors array of: variable //
1014  // * Descriptor Name Length WORD 16 // size in bytes of Descriptor Name field
1015  // * Descriptor Name WCHAR variable // array of Unicode characters - Descriptor Name
1016  // * Descriptor Value Data Type WORD 16 // Lookup array:
1017  // 0x0000 = Unicode String (variable length)
1018  // 0x0001 = BYTE array (variable length)
1019  // 0x0002 = BOOL (DWORD, 32 bits)
1020  // 0x0003 = DWORD (DWORD, 32 bits)
1021  // 0x0004 = QWORD (QWORD, 64 bits)
1022  // 0x0005 = WORD (WORD, 16 bits)
1023  // * Descriptor Value Length WORD 16 // number of bytes stored in Descriptor Value field
1024  // * Descriptor Value variable variable // value for Content Descriptor
1025  // shortcut
1026  $thisfile_asf['extended_content_description_object'] = array();
1027  $thisfile_asf_extendedcontentdescriptionobject = &$thisfile_asf['extended_content_description_object'];
1028 
1029  $thisfile_asf_extendedcontentdescriptionobject['offset'] = $NextObjectOffset + $offset;
1030  $thisfile_asf_extendedcontentdescriptionobject['objectid'] = $NextObjectGUID;
1031  $thisfile_asf_extendedcontentdescriptionobject['objectid_guid'] = $NextObjectGUIDtext;
1032  $thisfile_asf_extendedcontentdescriptionobject['objectsize'] = $NextObjectSize;
1033  $thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1034  $offset,
1035  2));
1036  $offset += 2;
1037  for ($ExtendedContentDescriptorsCounter = 0;
1038  $ExtendedContentDescriptorsCounter < $thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count'];
1039  $ExtendedContentDescriptorsCounter++) {
1040  // shortcut
1041  $thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter] = array();
1042  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current = &$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter];
1043 
1044  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['base_offset'] = $offset + 30;
1045  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1046  $offset,
1047  2));
1048  $offset += 2;
1049  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'] = substr($ASFHeaderData,
1050  $offset,
1051  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']);
1052  $offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'];
1053  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1054  $offset,
1055  2));
1056  $offset += 2;
1057  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1058  $offset,
1059  2));
1060  $offset += 2;
1061  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = substr($ASFHeaderData,
1062  $offset,
1063  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length']);
1064  $offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'];
1065  switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
1066  case 0x0000: // Unicode string
1067  break;
1068 
1069  case 0x0001: // BYTE array
1070  // do nothing
1071  break;
1072 
1073  case 0x0002: // BOOL
1074  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = (bool) Helper::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1075  break;
1076 
1077  case 0x0003: // DWORD
1078  case 0x0004: // QWORD
1079  case 0x0005: // WORD
1080  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = Helper::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1081  break;
1082 
1083  default:
1084  $info['warning'][] = 'extended_content_description.content_descriptors.' . $ExtendedContentDescriptorsCounter . '.value_type is invalid (' . $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'] . ')';
1085  //return false;
1086  break;
1087  }
1088  switch (self::TrimConvert(strtolower($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']))) {
1089 
1090  case 'wm/albumartist':
1091  case 'artist':
1092  // Note: not 'artist', that comes from 'author' tag
1093  $thisfile_asf_comments['albumartist'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1094  break;
1095 
1096  case 'wm/albumtitle':
1097  case 'album':
1098  $thisfile_asf_comments['album'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1099  break;
1100 
1101  case 'wm/genre':
1102  case 'genre':
1103  $thisfile_asf_comments['genre'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1104  break;
1105 
1106  case 'wm/partofset':
1107  $thisfile_asf_comments['partofset'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1108  break;
1109 
1110  case 'wm/tracknumber':
1111  case 'tracknumber':
1112  // be careful casting to int: casting unicode strings to int gives unexpected results (stops parsing at first non-numeric character)
1113  $thisfile_asf_comments['track'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1114  foreach ($thisfile_asf_comments['track'] as $key => $value) {
1115  if (preg_match('/^[0-9\x00]+$/', $value)) {
1116  $thisfile_asf_comments['track'][$key] = intval(str_replace("\x00",
1117  '',
1118  $value));
1119  }
1120  }
1121  break;
1122 
1123  case 'wm/track':
1124  if (empty($thisfile_asf_comments['track'])) {
1125  $thisfile_asf_comments['track'] = array(1 + self::TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1126  }
1127  break;
1128 
1129  case 'wm/year':
1130  case 'year':
1131  case 'date':
1132  $thisfile_asf_comments['year'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1133  break;
1134 
1135  case 'wm/lyrics':
1136  case 'lyrics':
1137  $thisfile_asf_comments['lyrics'] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1138  break;
1139 
1140  case 'isvbr':
1141  if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']) {
1142  $thisfile_audio['bitrate_mode'] = 'vbr';
1143  $thisfile_video['bitrate_mode'] = 'vbr';
1144  }
1145  break;
1146 
1147  case 'id3':
1148  // id3v2 module might not be loaded
1149  if (class_exists('getid3_id3v2')) {
1150  $tempfile = tempnam(GetId3Core::getTempDir(),
1151  'getID3');
1152  $tempfilehandle = fopen($tempfile, 'wb');
1153  $tempThisfileInfo = array('encoding' => $info['encoding']);
1154  fwrite($tempfilehandle,
1155  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1156  fclose($tempfilehandle);
1157 
1158  $getid3_temp = new GetId3Core();
1159  $getid3_temp->openfile($tempfile);
1160  $getid3_id3v2 = new Id3v2($getid3_temp);
1161  $getid3_id3v2->analyze();
1162  $info['id3v2'] = $getid3_temp->info['id3v2'];
1163  unset($getid3_temp, $getid3_id3v2);
1164 
1165  unlink($tempfile);
1166  }
1167  break;
1168 
1169  case 'wm/encodingtime':
1170  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix'] = self::FILETIMEtoUNIXtime($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1171  $thisfile_asf_comments['encoding_time_unix'] = array($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix']);
1172  break;
1173 
1174  case 'wm/picture':
1175  $WMpicture = $this->ASF_WMpicture($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1176  foreach ($WMpicture as $key => $value) {
1177  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current[$key] = $value;
1178  }
1179  unset($WMpicture);
1180  /*
1181  $wm_picture_offset = 0;
1182  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id'] = GetId3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 1));
1183  $wm_picture_offset += 1;
1184  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type'] = $this->WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
1185  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_size'] = GetId3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 4));
1186  $wm_picture_offset += 4;
1187 
1188  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
1189  do {
1190  $next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
1191  $wm_picture_offset += 2;
1192  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] .= $next_byte_pair;
1193  } while ($next_byte_pair !== "\x00\x00");
1194 
1195  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] = '';
1196  do {
1197  $next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
1198  $wm_picture_offset += 2;
1199  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] .= $next_byte_pair;
1200  } while ($next_byte_pair !== "\x00\x00");
1201 
1202  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['dataoffset'] = $wm_picture_offset;
1203  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'] = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset);
1204  unset($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
1205 
1206  $imageinfo = array();
1207  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
1208  $imagechunkcheck = GetId3_lib::GetDataImageSize($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], $imageinfo);
1209  unset($imageinfo);
1210  if (!empty($imagechunkcheck)) {
1211  $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
1212  }
1213  if (!isset($thisfile_asf_comments['picture'])) {
1214  $thisfile_asf_comments['picture'] = array();
1215  }
1216  $thisfile_asf_comments['picture'][] = array('data'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], 'image_mime'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime']);
1217  */
1218  break;
1219 
1220  default:
1221  switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
1222  case 0: // Unicode string
1223  if (substr(self::TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']),
1224  0, 3) == 'WM/') {
1225  $thisfile_asf_comments[str_replace('wm/',
1226  '',
1227  strtolower(self::TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'])))] = array(self::TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
1228  }
1229  break;
1230 
1231  case 1:
1232  break;
1233  }
1234  break;
1235  }
1236  }
1237  break;
1238 
1239  case self::$GETID3_ASF_Stream_Bitrate_Properties_Object:
1240  // Stream Bitrate Properties Object: (optional, one only)
1241  // Field Name Field Type Size (bits)
1242  // Object ID GUID 128 // GUID for Stream Bitrate Properties object - GETID3_ASF_Stream_Bitrate_Properties_Object
1243  // Object Size QWORD 64 // size of Extended Content Description object, including 26 bytes of Stream Bitrate Properties Object header
1244  // Bitrate Records Count WORD 16 // number of records in Bitrate Records
1245  // Bitrate Records array of: variable //
1246  // * Flags WORD 16 //
1247  // * * Stream Number bits 7 (0x007F) // number of this stream
1248  // * * Reserved bits 9 (0xFF80) // hardcoded: 0
1249  // * Average Bitrate DWORD 32 // in bits per second
1250  // shortcut
1251  $thisfile_asf['stream_bitrate_properties_object'] = array();
1252  $thisfile_asf_streambitratepropertiesobject = &$thisfile_asf['stream_bitrate_properties_object'];
1253 
1254  $thisfile_asf_streambitratepropertiesobject['offset'] = $NextObjectOffset + $offset;
1255  $thisfile_asf_streambitratepropertiesobject['objectid'] = $NextObjectGUID;
1256  $thisfile_asf_streambitratepropertiesobject['objectid_guid'] = $NextObjectGUIDtext;
1257  $thisfile_asf_streambitratepropertiesobject['objectsize'] = $NextObjectSize;
1258  $thisfile_asf_streambitratepropertiesobject['bitrate_records_count'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1259  $offset,
1260  2));
1261  $offset += 2;
1262  for ($BitrateRecordsCounter = 0;
1263  $BitrateRecordsCounter < $thisfile_asf_streambitratepropertiesobject['bitrate_records_count'];
1264  $BitrateRecordsCounter++) {
1265  $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1266  $offset,
1267  2));
1268  $offset += 2;
1269  $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags']['stream_number'] = $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] & 0x007F;
1270  $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['bitrate'] = Helper::LittleEndian2Int(substr($ASFHeaderData,
1271  $offset,
1272  4));
1273  $offset += 4;
1274  }
1275  break;
1276 
1277  case self::$GETID3_ASF_Padding_Object:
1278  // Padding Object: (optional)
1279  // Field Name Field Type Size (bits)
1280  // Object ID GUID 128 // GUID for Padding object - GETID3_ASF_Padding_Object
1281  // Object Size QWORD 64 // size of Padding object, including 24 bytes of ASF Padding Object header
1282  // Padding Data BYTESTREAM variable // ignore
1283  // shortcut
1284  $thisfile_asf['padding_object'] = array();
1285  $thisfile_asf_paddingobject = &$thisfile_asf['padding_object'];
1286 
1287  $thisfile_asf_paddingobject['offset'] = $NextObjectOffset + $offset;
1288  $thisfile_asf_paddingobject['objectid'] = $NextObjectGUID;
1289  $thisfile_asf_paddingobject['objectid_guid'] = $NextObjectGUIDtext;
1290  $thisfile_asf_paddingobject['objectsize'] = $NextObjectSize;
1291  $thisfile_asf_paddingobject['padding_length'] = $thisfile_asf_paddingobject['objectsize'] - 16 - 8;
1292  $thisfile_asf_paddingobject['padding'] = substr($ASFHeaderData,
1293  $offset,
1294  $thisfile_asf_paddingobject['padding_length']);
1295  $offset += ($NextObjectSize - 16 - 8);
1296  break;
1297 
1298  case self::$GETID3_ASF_Extended_Content_Encryption_Object:
1299  case self::$GETID3_ASF_Content_Encryption_Object:
1300  // WMA DRM - just ignore
1301  $offset += ($NextObjectSize - 16 - 8);
1302  break;
1303 
1304  default:
1305  // Implementations shall ignore any standard or non-standard object that they do not know how to handle.
1306  if (self::GUIDname($NextObjectGUIDtext)) {
1307  $info['warning'][] = 'unhandled GUID "' . self::GUIDname($NextObjectGUIDtext) . '" {' . $NextObjectGUIDtext . '} in ASF header at offset ' . ($offset - 16 - 8);
1308  } else {
1309  $info['warning'][] = 'unknown GUID {' . $NextObjectGUIDtext . '} in ASF header at offset ' . ($offset - 16 - 8);
1310  }
1311  $offset += ($NextObjectSize - 16 - 8);
1312  break;
1313  }
1314  }
1315  if (isset($thisfile_asf_streambitrateproperties['bitrate_records_count'])) {
1316  $ASFbitrateAudio = 0;
1317  $ASFbitrateVideo = 0;
1318  for ($BitrateRecordsCounter = 0;
1319  $BitrateRecordsCounter < $thisfile_asf_streambitrateproperties['bitrate_records_count'];
1320  $BitrateRecordsCounter++) {
1321  if (isset($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter])) {
1322  switch ($thisfile_asf_codeclistobject['codec_entries'][$BitrateRecordsCounter]['type_raw']) {
1323  case 1:
1324  $ASFbitrateVideo += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
1325  break;
1326 
1327  case 2:
1328  $ASFbitrateAudio += $thisfile_asf_streambitrateproperties['bitrate_records'][$BitrateRecordsCounter]['bitrate'];
1329  break;
1330 
1331  default:
1332  // do nothing
1333  break;
1334  }
1335  }
1336  }
1337  if ($ASFbitrateAudio > 0) {
1338  $thisfile_audio['bitrate'] = $ASFbitrateAudio;
1339  }
1340  if ($ASFbitrateVideo > 0) {
1341  $thisfile_video['bitrate'] = $ASFbitrateVideo;
1342  }
1343  }
1344  if (isset($thisfile_asf['stream_properties_object']) && is_array($thisfile_asf['stream_properties_object'])) {
1345 
1346  $thisfile_audio['bitrate'] = 0;
1347  $thisfile_video['bitrate'] = 0;
1348 
1349  foreach ($thisfile_asf['stream_properties_object'] as $streamnumber => $streamdata) {
1350 
1351  switch ($streamdata['stream_type']) {
1352  case self::$GETID3_ASF_Audio_Media:
1353  // Field Name Field Type Size (bits)
1354  // Codec ID / Format Tag WORD 16 // unique ID of audio codec - defined as wFormatTag field of WAVEFORMATEX structure
1355  // Number of Channels WORD 16 // number of channels of audio - defined as nChannels field of WAVEFORMATEX structure
1356  // Samples Per Second DWORD 32 // in Hertz - defined as nSamplesPerSec field of WAVEFORMATEX structure
1357  // Average number of Bytes/sec DWORD 32 // bytes/sec of audio stream - defined as nAvgBytesPerSec field of WAVEFORMATEX structure
1358  // Block Alignment WORD 16 // block size in bytes of audio codec - defined as nBlockAlign field of WAVEFORMATEX structure
1359  // Bits per sample WORD 16 // bits per sample of mono data. set to zero for variable bitrate codecs. defined as wBitsPerSample field of WAVEFORMATEX structure
1360  // Codec Specific Data Size WORD 16 // size in bytes of Codec Specific Data buffer - defined as cbSize field of WAVEFORMATEX structure
1361  // Codec Specific Data BYTESTREAM variable // array of codec-specific data bytes
1362  // shortcut
1363  $thisfile_asf['audio_media'][$streamnumber] = array();
1364  $thisfile_asf_audiomedia_currentstream = &$thisfile_asf['audio_media'][$streamnumber];
1365 
1366  $audiomediaoffset = 0;
1367 
1368  $thisfile_asf_audiomedia_currentstream = Riff::RIFFparseWAVEFORMATex(substr($streamdata['type_specific_data'],
1369  $audiomediaoffset,
1370  16));
1371  $audiomediaoffset += 16;
1372 
1373  $thisfile_audio['lossless'] = false;
1374  switch ($thisfile_asf_audiomedia_currentstream['raw']['wFormatTag']) {
1375  case 0x0001: // PCM
1376  case 0x0163: // WMA9 Lossless
1377  $thisfile_audio['lossless'] = true;
1378  break;
1379  }
1380 
1381  if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
1382  foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
1383  if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
1384  $thisfile_asf_audiomedia_currentstream['bitrate'] = $dataarray['bitrate'];
1385  $thisfile_audio['bitrate'] += $dataarray['bitrate'];
1386  break;
1387  }
1388  }
1389  } else {
1390  if (!empty($thisfile_asf_audiomedia_currentstream['bytes_sec'])) {
1391  $thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bytes_sec'] * 8;
1392  } elseif (!empty($thisfile_asf_audiomedia_currentstream['bitrate'])) {
1393  $thisfile_audio['bitrate'] += $thisfile_asf_audiomedia_currentstream['bitrate'];
1394  }
1395  }
1396  $thisfile_audio['streams'][$streamnumber] = $thisfile_asf_audiomedia_currentstream;
1397  $thisfile_audio['streams'][$streamnumber]['wformattag'] = $thisfile_asf_audiomedia_currentstream['raw']['wFormatTag'];
1398  $thisfile_audio['streams'][$streamnumber]['lossless'] = $thisfile_audio['lossless'];
1399  $thisfile_audio['streams'][$streamnumber]['bitrate'] = $thisfile_audio['bitrate'];
1400  $thisfile_audio['streams'][$streamnumber]['dataformat'] = 'wma';
1401  unset($thisfile_audio['streams'][$streamnumber]['raw']);
1402 
1403  $thisfile_asf_audiomedia_currentstream['codec_data_size'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1404  $audiomediaoffset,
1405  2));
1406  $audiomediaoffset += 2;
1407  $thisfile_asf_audiomedia_currentstream['codec_data'] = substr($streamdata['type_specific_data'],
1408  $audiomediaoffset,
1409  $thisfile_asf_audiomedia_currentstream['codec_data_size']);
1410  $audiomediaoffset += $thisfile_asf_audiomedia_currentstream['codec_data_size'];
1411 
1412  break;
1413 
1414  case self::$GETID3_ASF_Video_Media:
1415  // Field Name Field Type Size (bits)
1416  // Encoded Image Width DWORD 32 // width of image in pixels
1417  // Encoded Image Height DWORD 32 // height of image in pixels
1418  // Reserved Flags BYTE 8 // hardcoded: 0x02
1419  // Format Data Size WORD 16 // size of Format Data field in bytes
1420  // Format Data array of: variable //
1421  // * Format Data Size DWORD 32 // number of bytes in Format Data field, in bytes - defined as biSize field of BITMAPINFOHEADER structure
1422  // * Image Width LONG 32 // width of encoded image in pixels - defined as biWidth field of BITMAPINFOHEADER structure
1423  // * Image Height LONG 32 // height of encoded image in pixels - defined as biHeight field of BITMAPINFOHEADER structure
1424  // * Reserved WORD 16 // hardcoded: 0x0001 - defined as biPlanes field of BITMAPINFOHEADER structure
1425  // * Bits Per Pixel Count WORD 16 // bits per pixel - defined as biBitCount field of BITMAPINFOHEADER structure
1426  // * Compression ID FOURCC 32 // fourcc of video codec - defined as biCompression field of BITMAPINFOHEADER structure
1427  // * Image Size DWORD 32 // image size in bytes - defined as biSizeImage field of BITMAPINFOHEADER structure
1428  // * Horizontal Pixels / Meter DWORD 32 // horizontal resolution of target device in pixels per meter - defined as biXPelsPerMeter field of BITMAPINFOHEADER structure
1429  // * Vertical Pixels / Meter DWORD 32 // vertical resolution of target device in pixels per meter - defined as biYPelsPerMeter field of BITMAPINFOHEADER structure
1430  // * Colors Used Count DWORD 32 // number of color indexes in the color table that are actually used - defined as biClrUsed field of BITMAPINFOHEADER structure
1431  // * Important Colors Count DWORD 32 // number of color index required for displaying bitmap. if zero, all colors are required. defined as biClrImportant field of BITMAPINFOHEADER structure
1432  // * Codec Specific Data BYTESTREAM variable // array of codec-specific data bytes
1433  // shortcut
1434  $thisfile_asf['video_media'][$streamnumber] = array();
1435  $thisfile_asf_videomedia_currentstream = &$thisfile_asf['video_media'][$streamnumber];
1436 
1437  $videomediaoffset = 0;
1438  $thisfile_asf_videomedia_currentstream['image_width'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1439  $videomediaoffset,
1440  4));
1441  $videomediaoffset += 4;
1442  $thisfile_asf_videomedia_currentstream['image_height'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1443  $videomediaoffset,
1444  4));
1445  $videomediaoffset += 4;
1446  $thisfile_asf_videomedia_currentstream['flags'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1447  $videomediaoffset,
1448  1));
1449  $videomediaoffset += 1;
1450  $thisfile_asf_videomedia_currentstream['format_data_size'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1451  $videomediaoffset,
1452  2));
1453  $videomediaoffset += 2;
1454  $thisfile_asf_videomedia_currentstream['format_data']['format_data_size'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1455  $videomediaoffset,
1456  4));
1457  $videomediaoffset += 4;
1458  $thisfile_asf_videomedia_currentstream['format_data']['image_width'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1459  $videomediaoffset,
1460  4));
1461  $videomediaoffset += 4;
1462  $thisfile_asf_videomedia_currentstream['format_data']['image_height'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1463  $videomediaoffset,
1464  4));
1465  $videomediaoffset += 4;
1466  $thisfile_asf_videomedia_currentstream['format_data']['reserved'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1467  $videomediaoffset,
1468  2));
1469  $videomediaoffset += 2;
1470  $thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1471  $videomediaoffset,
1472  2));
1473  $videomediaoffset += 2;
1474  $thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc'] = substr($streamdata['type_specific_data'],
1475  $videomediaoffset,
1476  4);
1477  $videomediaoffset += 4;
1478  $thisfile_asf_videomedia_currentstream['format_data']['image_size'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1479  $videomediaoffset,
1480  4));
1481  $videomediaoffset += 4;
1482  $thisfile_asf_videomedia_currentstream['format_data']['horizontal_pels'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1483  $videomediaoffset,
1484  4));
1485  $videomediaoffset += 4;
1486  $thisfile_asf_videomedia_currentstream['format_data']['vertical_pels'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1487  $videomediaoffset,
1488  4));
1489  $videomediaoffset += 4;
1490  $thisfile_asf_videomedia_currentstream['format_data']['colors_used'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1491  $videomediaoffset,
1492  4));
1493  $videomediaoffset += 4;
1494  $thisfile_asf_videomedia_currentstream['format_data']['colors_important'] = Helper::LittleEndian2Int(substr($streamdata['type_specific_data'],
1495  $videomediaoffset,
1496  4));
1497  $videomediaoffset += 4;
1498  $thisfile_asf_videomedia_currentstream['format_data']['codec_data'] = substr($streamdata['type_specific_data'],
1499  $videomediaoffset);
1500 
1501  if (!empty($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'])) {
1502  foreach ($thisfile_asf['stream_bitrate_properties_object']['bitrate_records'] as $dummy => $dataarray) {
1503  if (isset($dataarray['flags']['stream_number']) && ($dataarray['flags']['stream_number'] == $streamnumber)) {
1504  $thisfile_asf_videomedia_currentstream['bitrate'] = $dataarray['bitrate'];
1505  $thisfile_video['streams'][$streamnumber]['bitrate'] = $dataarray['bitrate'];
1506  $thisfile_video['bitrate'] += $dataarray['bitrate'];
1507  break;
1508  }
1509  }
1510  }
1511 
1512  $thisfile_asf_videomedia_currentstream['format_data']['codec'] = Riff::RIFFfourccLookup($thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc']);
1513 
1514  $thisfile_video['streams'][$streamnumber]['fourcc'] = $thisfile_asf_videomedia_currentstream['format_data']['codec_fourcc'];
1515  $thisfile_video['streams'][$streamnumber]['codec'] = $thisfile_asf_videomedia_currentstream['format_data']['codec'];
1516  $thisfile_video['streams'][$streamnumber]['resolution_x'] = $thisfile_asf_videomedia_currentstream['image_width'];
1517  $thisfile_video['streams'][$streamnumber]['resolution_y'] = $thisfile_asf_videomedia_currentstream['image_height'];
1518  $thisfile_video['streams'][$streamnumber]['bits_per_sample'] = $thisfile_asf_videomedia_currentstream['format_data']['bits_per_pixel'];
1519  break;
1520 
1521  default:
1522  break;
1523  }
1524  }
1525  } while (ftell($this->getid3->fp) < $info['avdataend']) {
1526  $NextObjectDataHeader = fread($this->getid3->fp, 24);
1527  $offset = 0;
1528  $NextObjectGUID = substr($NextObjectDataHeader, 0, 16);
1529  $offset += 16;
1530  $NextObjectGUIDtext = self::BytestringToGUID($NextObjectGUID);
1531  $NextObjectSize = Helper::LittleEndian2Int(substr($NextObjectDataHeader,
1532  $offset,
1533  8));
1534  $offset += 8;
1535 
1536  switch ($NextObjectGUID) {
1537  case self::$GETID3_ASF_Data_Object:
1538  // Data Object: (mandatory, one only)
1539  // Field Name Field Type Size (bits)
1540  // Object ID GUID 128 // GUID for Data object - GETID3_ASF_Data_Object
1541  // Object Size QWORD 64 // size of Data object, including 50 bytes of Data Object header. may be 0 if FilePropertiesObject.BroadcastFlag == 1
1542  // File ID GUID 128 // unique identifier. identical to File ID field in Header Object
1543  // Total Data Packets QWORD 64 // number of Data Packet entries in Data Object. invalid if FilePropertiesObject.BroadcastFlag == 1
1544  // Reserved WORD 16 // hardcoded: 0x0101
1545  // shortcut
1546  $thisfile_asf['data_object'] = array();
1547  $thisfile_asf_dataobject = &$thisfile_asf['data_object'];
1548 
1549  $DataObjectData = $NextObjectDataHeader . fread($this->getid3->fp,
1550  50 - 24);
1551  $offset = 24;
1552 
1553  $thisfile_asf_dataobject['objectid'] = $NextObjectGUID;
1554  $thisfile_asf_dataobject['objectid_guid'] = $NextObjectGUIDtext;
1555  $thisfile_asf_dataobject['objectsize'] = $NextObjectSize;
1556 
1557  $thisfile_asf_dataobject['fileid'] = substr($DataObjectData,
1558  $offset, 16);
1559  $offset += 16;
1560  $thisfile_asf_dataobject['fileid_guid'] = self::BytestringToGUID($thisfile_asf_dataobject['fileid']);
1561  $thisfile_asf_dataobject['total_data_packets'] = Helper::LittleEndian2Int(substr($DataObjectData,
1562  $offset,
1563  8));
1564  $offset += 8;
1565  $thisfile_asf_dataobject['reserved'] = Helper::LittleEndian2Int(substr($DataObjectData,
1566  $offset,
1567  2));
1568  $offset += 2;
1569  if ($thisfile_asf_dataobject['reserved'] != 0x0101) {
1570  $info['warning'][] = 'data_object.reserved (' . Helper::PrintHexBytes($thisfile_asf_dataobject['reserved']) . ') does not match expected value of "0x0101"';
1571  //return false;
1572  break;
1573  }
1574 
1575  // Data Packets array of: variable //
1576  // * Error Correction Flags BYTE 8 //
1577  // * * Error Correction Data Length bits 4 // if Error Correction Length Type == 00, size of Error Correction Data in bytes, else hardcoded: 0000
1578  // * * Opaque Data Present bits 1 //
1579  // * * Error Correction Length Type bits 2 // number of bits for size of the error correction data. hardcoded: 00
1580  // * * Error Correction Present bits 1 // If set, use Opaque Data Packet structure, else use Payload structure
1581  // * Error Correction Data
1582 
1583  $info['avdataoffset'] = ftell($this->getid3->fp);
1584  fseek($this->getid3->fp,
1585  ($thisfile_asf_dataobject['objectsize'] - 50),
1586  SEEK_CUR); // skip actual audio/video data
1587  $info['avdataend'] = ftell($this->getid3->fp);
1588  break;
1589 
1590  case self::$GETID3_ASF_Simple_Index_Object:
1591  // Simple Index Object: (optional, recommended, one per video stream)
1592  // Field Name Field Type Size (bits)
1593  // Object ID GUID 128 // GUID for Simple Index object - GETID3_ASF_Data_Object
1594  // Object Size QWORD 64 // size of Simple Index object, including 56 bytes of Simple Index Object header
1595  // File ID GUID 128 // unique identifier. may be zero or identical to File ID field in Data Object and Header Object
1596  // Index Entry Time Interval QWORD 64 // interval between index entries in 100-nanosecond units
1597  // Maximum Packet Count DWORD 32 // maximum packet count for all index entries
1598  // Index Entries Count DWORD 32 // number of Index Entries structures
1599  // Index Entries array of: variable //
1600  // * Packet Number DWORD 32 // number of the Data Packet associated with this index entry
1601  // * Packet Count WORD 16 // number of Data Packets to sent at this index entry
1602  // shortcut
1603  $thisfile_asf['simple_index_object'] = array();
1604  $thisfile_asf_simpleindexobject = &$thisfile_asf['simple_index_object'];
1605 
1606  $SimpleIndexObjectData = $NextObjectDataHeader . fread($this->getid3->fp,
1607  56 - 24);
1608  $offset = 24;
1609 
1610  $thisfile_asf_simpleindexobject['objectid'] = $NextObjectGUID;
1611  $thisfile_asf_simpleindexobject['objectid_guid'] = $NextObjectGUIDtext;
1612  $thisfile_asf_simpleindexobject['objectsize'] = $NextObjectSize;
1613 
1614  $thisfile_asf_simpleindexobject['fileid'] = substr($SimpleIndexObjectData,
1615  $offset,
1616  16);
1617  $offset += 16;
1618  $thisfile_asf_simpleindexobject['fileid_guid'] = self::BytestringToGUID($thisfile_asf_simpleindexobject['fileid']);
1619  $thisfile_asf_simpleindexobject['index_entry_time_interval'] = Helper::LittleEndian2Int(substr($SimpleIndexObjectData,
1620  $offset,
1621  8));
1622  $offset += 8;
1623  $thisfile_asf_simpleindexobject['maximum_packet_count'] = Helper::LittleEndian2Int(substr($SimpleIndexObjectData,
1624  $offset,
1625  4));
1626  $offset += 4;
1627  $thisfile_asf_simpleindexobject['index_entries_count'] = Helper::LittleEndian2Int(substr($SimpleIndexObjectData,
1628  $offset,
1629  4));
1630  $offset += 4;
1631 
1632  $IndexEntriesData = $SimpleIndexObjectData . fread($this->getid3->fp,
1633  6 * $thisfile_asf_simpleindexobject['index_entries_count']);
1634  for ($IndexEntriesCounter = 0;
1635  $IndexEntriesCounter < $thisfile_asf_simpleindexobject['index_entries_count'];
1636  $IndexEntriesCounter++) {
1637  $thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_number'] = Helper::LittleEndian2Int(substr($IndexEntriesData,
1638  $offset,
1639  4));
1640  $offset += 4;
1641  $thisfile_asf_simpleindexobject['index_entries'][$IndexEntriesCounter]['packet_count'] = Helper::LittleEndian2Int(substr($IndexEntriesData,
1642  $offset,
1643  4));
1644  $offset += 2;
1645  }
1646 
1647  break;
1648 
1649  case self::$GETID3_ASF_Index_Object:
1650  // 6.2 ASF top-level Index Object (optional but recommended when appropriate, 0 or 1)
1651  // Field Name Field Type Size (bits)
1652  // Object ID GUID 128 // GUID for the Index Object - GETID3_ASF_Index_Object
1653  // Object Size QWORD 64 // Specifies the size, in bytes, of the Index Object, including at least 34 bytes of Index Object header
1654  // Index Entry Time Interval DWORD 32 // Specifies the time interval between each index entry in ms.
1655  // Index Specifiers Count WORD 16 // Specifies the number of Index Specifiers structures in this Index Object.
1656  // Index Blocks Count DWORD 32 // Specifies the number of Index Blocks structures in this Index Object.
1657  // Index Entry Time Interval DWORD 32 // Specifies the time interval between index entries in milliseconds. This value cannot be 0.
1658  // Index Specifiers Count WORD 16 // Specifies the number of entries in the Index Specifiers list. Valid values are 1 and greater.
1659  // Index Specifiers array of: varies //
1660  // * Stream Number WORD 16 // Specifies the stream number that the Index Specifiers refer to. Valid values are between 1 and 127.
1661  // * Index Type WORD 16 // Specifies Index Type values as follows:
1662  // 1 = Nearest Past Data Packet - indexes point to the data packet whose presentation time is closest to the index entry time.
1663  // 2 = Nearest Past Media Object - indexes point to the closest data packet containing an entire object or first fragment of an object.
1664  // 3 = Nearest Past Cleanpoint. - indexes point to the closest data packet containing an entire object (or first fragment of an object) that has the Cleanpoint Flag set.
1665  // Nearest Past Cleanpoint is the most common type of index.
1666  // Index Entry Count DWORD 32 // Specifies the number of Index Entries in the block.
1667  // * Block Positions QWORD varies // Specifies a list of byte offsets of the beginnings of the blocks relative to the beginning of the first Data Packet (i.e., the beginning of the Data Object + 50 bytes). The number of entries in this list is specified by the value of the Index Specifiers Count field. The order of those byte offsets is tied to the order in which Index Specifiers are listed.
1668  // * Index Entries array of: varies //
1669  // * * Offsets DWORD varies // An offset value of 0xffffffff indicates an invalid offset value
1670  // shortcut
1671  $thisfile_asf['asf_index_object'] = array();
1672  $thisfile_asf_asfindexobject = &$thisfile_asf['asf_index_object'];
1673 
1674  $ASFIndexObjectData = $NextObjectDataHeader . fread($this->getid3->fp,
1675  34 - 24);
1676  $offset = 24;
1677 
1678  $thisfile_asf_asfindexobject['objectid'] = $NextObjectGUID;
1679  $thisfile_asf_asfindexobject['objectid_guid'] = $NextObjectGUIDtext;
1680  $thisfile_asf_asfindexobject['objectsize'] = $NextObjectSize;
1681 
1682  $thisfile_asf_asfindexobject['entry_time_interval'] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1683  $offset,
1684  4));
1685  $offset += 4;
1686  $thisfile_asf_asfindexobject['index_specifiers_count'] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1687  $offset,
1688  2));
1689  $offset += 2;
1690  $thisfile_asf_asfindexobject['index_blocks_count'] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1691  $offset,
1692  4));
1693  $offset += 4;
1694 
1695  $ASFIndexObjectData .= fread($this->getid3->fp,
1696  4 * $thisfile_asf_asfindexobject['index_specifiers_count']);
1697  for ($IndexSpecifiersCounter = 0;
1698  $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count'];
1699  $IndexSpecifiersCounter++) {
1700  $IndexSpecifierStreamNumber = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1701  $offset,
1702  2));
1703  $offset += 2;
1704  $thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['stream_number'] = $IndexSpecifierStreamNumber;
1705  $thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type'] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1706  $offset,
1707  2));
1708  $offset += 2;
1709  $thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type_text'] = $this->ASFIndexObjectIndexTypeLookup($thisfile_asf_asfindexobject['index_specifiers'][$IndexSpecifiersCounter]['index_type']);
1710  }
1711 
1712  $ASFIndexObjectData .= fread($this->getid3->fp, 4);
1713  $thisfile_asf_asfindexobject['index_entry_count'] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1714  $offset,
1715  4));
1716  $offset += 4;
1717 
1718  $ASFIndexObjectData .= fread($this->getid3->fp,
1719  8 * $thisfile_asf_asfindexobject['index_specifiers_count']);
1720  for ($IndexSpecifiersCounter = 0;
1721  $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count'];
1722  $IndexSpecifiersCounter++) {
1723  $thisfile_asf_asfindexobject['block_positions'][$IndexSpecifiersCounter] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1724  $offset,
1725  8));
1726  $offset += 8;
1727  }
1728 
1729  $ASFIndexObjectData .= fread($this->getid3->fp,
1730  4 * $thisfile_asf_asfindexobject['index_specifiers_count'] * $thisfile_asf_asfindexobject['index_entry_count']);
1731  for ($IndexEntryCounter = 0;
1732  $IndexEntryCounter < $thisfile_asf_asfindexobject['index_entry_count'];
1733  $IndexEntryCounter++) {
1734  for ($IndexSpecifiersCounter = 0;
1735  $IndexSpecifiersCounter < $thisfile_asf_asfindexobject['index_specifiers_count'];
1736  $IndexSpecifiersCounter++) {
1737  $thisfile_asf_asfindexobject['offsets'][$IndexSpecifiersCounter][$IndexEntryCounter] = Helper::LittleEndian2Int(substr($ASFIndexObjectData,
1738  $offset,
1739  4));
1740  $offset += 4;
1741  }
1742  }
1743  break;
1744 
1745 
1746  default:
1747  // Implementations shall ignore any standard or non-standard object that they do not know how to handle.
1748  if (self::GUIDname($NextObjectGUIDtext)) {
1749  $info['warning'][] = 'unhandled GUID "' . self::GUIDname($NextObjectGUIDtext) . '" {' . $NextObjectGUIDtext . '} in ASF body at offset ' . ($offset - 16 - 8);
1750  } else {
1751  $info['warning'][] = 'unknown GUID {' . $NextObjectGUIDtext . '} in ASF body at offset ' . (ftell($this->getid3->fp) - 16 - 8);
1752  }
1753  fseek($this->getid3->fp, ($NextObjectSize - 16 - 8),
1754  SEEK_CUR);
1755  break;
1756  }
1757  }
1758 
1759  if (isset($thisfile_asf_codeclistobject['codec_entries']) && is_array($thisfile_asf_codeclistobject['codec_entries'])) {
1760  foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
1761  switch ($streamdata['information']) {
1762  case 'WMV1':
1763  case 'WMV2':
1764  case 'WMV3':
1765  case 'MSS1':
1766  case 'MSS2':
1767  case 'WMVA':
1768  case 'WVC1':
1769  case 'WMVP':
1770  case 'WVP2':
1771  $thisfile_video['dataformat'] = 'wmv';
1772  $info['mime_type'] = 'video/x-ms-wmv';
1773  break;
1774 
1775  case 'MP42':
1776  case 'MP43':
1777  case 'MP4S':
1778  case 'mp4s':
1779  $thisfile_video['dataformat'] = 'asf';
1780  $info['mime_type'] = 'video/x-ms-asf';
1781  break;
1782 
1783  default:
1784  switch ($streamdata['type_raw']) {
1785  case 1:
1786  if (strstr(self::TrimConvert($streamdata['name']),
1787  'Windows Media')) {
1788  $thisfile_video['dataformat'] = 'wmv';
1789  if ($info['mime_type'] == 'video/x-ms-asf') {
1790  $info['mime_type'] = 'video/x-ms-wmv';
1791  }
1792  }
1793  break;
1794 
1795  case 2:
1796  if (strstr(self::TrimConvert($streamdata['name']),
1797  'Windows Media')) {
1798  $thisfile_audio['dataformat'] = 'wma';
1799  if ($info['mime_type'] == 'video/x-ms-asf') {
1800  $info['mime_type'] = 'audio/x-ms-wma';
1801  }
1802  }
1803  break;
1804  }
1805  break;
1806  }
1807  }
1808  }
1809 
1810  switch (isset($thisfile_audio['codec']) ? $thisfile_audio['codec'] : '') {
1811  case 'MPEG Layer-3':
1812  $thisfile_audio['dataformat'] = 'mp3';
1813  break;
1814 
1815  default:
1816  break;
1817  }
1818 
1819  if (isset($thisfile_asf_codeclistobject['codec_entries'])) {
1820  foreach ($thisfile_asf_codeclistobject['codec_entries'] as $streamnumber => $streamdata) {
1821  switch ($streamdata['type_raw']) {
1822 
1823  case 1: // video
1824  $thisfile_video['encoder'] = self::TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);
1825  break;
1826 
1827  case 2: // audio
1828  $thisfile_audio['encoder'] = self::TrimConvert($thisfile_asf_codeclistobject['codec_entries'][$streamnumber]['name']);
1829 
1830  // AH 2003-10-01
1831  $thisfile_audio['encoder_options'] = self::TrimConvert($thisfile_asf_codeclistobject['codec_entries'][0]['description']);
1832 
1833  $thisfile_audio['codec'] = $thisfile_audio['encoder'];
1834  break;
1835 
1836  default:
1837  $info['warning'][] = 'Unknown streamtype: [codec_list_object][codec_entries][' . $streamnumber . '][type_raw] == ' . $streamdata['type_raw'];
1838  break;
1839  }
1840  }
1841  }
1842 
1843  if (isset($info['audio'])) {
1844  $thisfile_audio['lossless'] = (isset($thisfile_audio['lossless']) ? $thisfile_audio['lossless'] : false);
1845  $thisfile_audio['dataformat'] = (!empty($thisfile_audio['dataformat']) ? $thisfile_audio['dataformat'] : 'asf');
1846  }
1847  if (!empty($thisfile_video['dataformat'])) {
1848  $thisfile_video['lossless'] = (isset($thisfile_audio['lossless']) ? $thisfile_audio['lossless'] : false);
1849  $thisfile_video['pixel_aspect_ratio'] = (isset($thisfile_audio['pixel_aspect_ratio']) ? $thisfile_audio['pixel_aspect_ratio'] : (float) 1);
1850  $thisfile_video['dataformat'] = (!empty($thisfile_video['dataformat']) ? $thisfile_video['dataformat'] : 'asf');
1851  }
1852  if (!empty($thisfile_video['streams'])) {
1853  $thisfile_video['streams']['resolution_x'] = 0;
1854  $thisfile_video['streams']['resolution_y'] = 0;
1855  foreach ($thisfile_video['streams'] as $key => $valuearray) {
1856  if (($valuearray['resolution_x'] > $thisfile_video['streams']['resolution_x']) || ($valuearray['resolution_y'] > $thisfile_video['streams']['resolution_y'])) {
1857  $thisfile_video['resolution_x'] = $valuearray['resolution_x'];
1858  $thisfile_video['resolution_y'] = $valuearray['resolution_y'];
1859  }
1860  }
1861  }
1862  $info['bitrate'] = (isset($thisfile_audio['bitrate']) ? $thisfile_audio['bitrate'] : 0) + (isset($thisfile_video['bitrate']) ? $thisfile_video['bitrate'] : 0);
1863 
1864  if ((!isset($info['playtime_seconds']) || ($info['playtime_seconds'] <= 0)) && ($info['bitrate'] > 0)) {
1865  $info['playtime_seconds'] = ($info['filesize'] - $info['avdataoffset']) / ($info['bitrate'] / 8);
1866  }
1867 
1868  return true;
1869  }
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Definition: Helper.php:36
static RIFFparseWAVEFORMATex($WaveFormatExData)
Definition: Riff.php:1707
static RIFFfourccLookup($fourcc)
Definition: Riff.php:2101
fseek($bytes, $whence=SEEK_SET)
$info
Definition: example_052.php:80
static ASFIndexObjectIndexTypeLookup($id)
Definition: Asf.php:2009
Create styles array
The data for the language used.
static ASFCodecListObjectTypeLookup($CodecListType)
Definition: Asf.php:1871
ASF_HeaderExtensionObjectDataParse(&$asf_header_extension_object_data, &$unhandled_sections)
Definition: Asf.php:2171
static LittleEndian2Int($byteword, $signed=false)
Definition: Helper.php:413
static array_merge_noclobber($array1, $array2)
Definition: Helper.php:587
+ Here is the call graph for this function:

◆ ASF_HeaderExtensionObjectDataParse()

GetId3\Module\AudioVideo\Asf::ASF_HeaderExtensionObjectDataParse ( $asf_header_extension_object_data,
$unhandled_sections 
)
Parameters
type$asf_header_extension_object_data
type$unhandled_sections
Returns
type http://msdn.microsoft.com/en-us/library/bb643323.aspx

Definition at line 2171 of file Asf.php.

References array, GetId3\Module\AudioVideo\Asf\ASF_WMpicture(), and GetId3\Lib\Helper\LittleEndian2Int().

Referenced by GetId3\Module\AudioVideo\Asf\analyze().

2173  {
2174  $offset = 0;
2175  $objectOffset = 0;
2176  $HeaderExtensionObjectParsed = array();
2177  while ($objectOffset < strlen($asf_header_extension_object_data)) {
2178  $offset = $objectOffset;
2179  $thisObject = array();
2180 
2181  $thisObject['guid'] = substr($asf_header_extension_object_data,
2182  $offset, 16);
2183  $offset += 16;
2184  $thisObject['guid_text'] = self::BytestringToGUID($thisObject['guid']);
2185  $thisObject['guid_name'] = self::GUIDname($thisObject['guid_text']);
2186 
2187  $thisObject['size'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2188  $offset,
2189  8));
2190  $offset += 8;
2191  if ($thisObject['size'] <= 0) {
2192  break;
2193  }
2194 
2195  switch ($thisObject['guid']) {
2196  case self::$GETID3_ASF_Extended_Stream_Properties_Object:
2197  $thisObject['start_time'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2198  $offset,
2199  8));
2200  $offset += 8;
2201  $thisObject['start_time_unix'] = self::FILETIMEtoUNIXtime($thisObject['start_time']);
2202 
2203  $thisObject['end_time'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2204  $offset,
2205  8));
2206  $offset += 8;
2207  $thisObject['end_time_unix'] = self::FILETIMEtoUNIXtime($thisObject['end_time']);
2208 
2209  $thisObject['data_bitrate'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2210  $offset,
2211  4));
2212  $offset += 4;
2213 
2214  $thisObject['buffer_size'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2215  $offset,
2216  4));
2217  $offset += 4;
2218 
2219  $thisObject['initial_buffer_fullness'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2220  $offset,
2221  4));
2222  $offset += 4;
2223 
2224  $thisObject['alternate_data_bitrate'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2225  $offset,
2226  4));
2227  $offset += 4;
2228 
2229  $thisObject['alternate_buffer_size'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2230  $offset,
2231  4));
2232  $offset += 4;
2233 
2234  $thisObject['alternate_initial_buffer_fullness'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2235  $offset,
2236  4));
2237  $offset += 4;
2238 
2239  $thisObject['maximum_object_size'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2240  $offset,
2241  4));
2242  $offset += 4;
2243 
2244  $thisObject['flags_raw'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2245  $offset,
2246  4));
2247  $offset += 4;
2248  $thisObject['flags']['reliable'] = (bool) $thisObject['flags_raw'] & 0x00000001;
2249  $thisObject['flags']['seekable'] = (bool) $thisObject['flags_raw'] & 0x00000002;
2250  $thisObject['flags']['no_cleanpoints'] = (bool) $thisObject['flags_raw'] & 0x00000004;
2251  $thisObject['flags']['resend_live_cleanpoints'] = (bool) $thisObject['flags_raw'] & 0x00000008;
2252 
2253  $thisObject['stream_number'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2254  $offset,
2255  2));
2256  $offset += 2;
2257 
2258  $thisObject['stream_language_id_index'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2259  $offset,
2260  2));
2261  $offset += 2;
2262 
2263  $thisObject['average_time_per_frame'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2264  $offset,
2265  4));
2266  $offset += 4;
2267 
2268  $thisObject['stream_name_count'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2269  $offset,
2270  2));
2271  $offset += 2;
2272 
2273  $thisObject['payload_extension_system_count'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2274  $offset,
2275  2));
2276  $offset += 2;
2277 
2278  for ($i = 0; $i < $thisObject['stream_name_count']; $i++) {
2279  $streamName = array();
2280 
2281  $streamName['language_id_index'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2282  $offset,
2283  2));
2284  $offset += 2;
2285 
2286  $streamName['stream_name_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2287  $offset,
2288  2));
2289  $offset += 2;
2290 
2291  $streamName['stream_name'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2292  $offset,
2293  $streamName['stream_name_length']));
2294  $offset += $streamName['stream_name_length'];
2295 
2296  $thisObject['stream_names'][$i] = $streamName;
2297  }
2298 
2299  for ($i = 0;
2300  $i < $thisObject['payload_extension_system_count'];
2301  $i++) {
2302  $payloadExtensionSystem = array();
2303 
2304  $payloadExtensionSystem['extension_system_id'] = substr($asf_header_extension_object_data,
2305  $offset,
2306  16);
2307  $offset += 16;
2308  $payloadExtensionSystem['extension_system_id_text'] = self::BytestringToGUID($payloadExtensionSystem['extension_system_id']);
2309 
2310  $payloadExtensionSystem['extension_system_size'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2311  $offset,
2312  2));
2313  $offset += 2;
2314  if ($payloadExtensionSystem['extension_system_size'] <= 0) {
2315  break 2;
2316  }
2317 
2318  $payloadExtensionSystem['extension_system_info_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2319  $offset,
2320  4));
2321  $offset += 4;
2322 
2323  $payloadExtensionSystem['extension_system_info_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2324  $offset,
2325  $payloadExtensionSystem['extension_system_info_length']));
2326  $offset += $payloadExtensionSystem['extension_system_info_length'];
2327 
2328  $thisObject['payload_extension_systems'][$i] = $payloadExtensionSystem;
2329  }
2330 
2331  break;
2332 
2333  case self::$GETID3_ASF_Padding_Object:
2334  // padding, skip it
2335  break;
2336 
2337  case self::$GETID3_ASF_Metadata_Object:
2338  $thisObject['description_record_counts'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2339  $offset,
2340  2));
2341  $offset += 2;
2342 
2343  for ($i = 0; $i < $thisObject['description_record_counts'];
2344  $i++) {
2345  $descriptionRecord = array();
2346 
2347  $descriptionRecord['reserved_1'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2348  $offset,
2349  2)); // must be zero
2350  $offset += 2;
2351 
2352  $descriptionRecord['stream_number'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2353  $offset,
2354  2));
2355  $offset += 2;
2356 
2357  $descriptionRecord['name_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2358  $offset,
2359  2));
2360  $offset += 2;
2361 
2362  $descriptionRecord['data_type'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2363  $offset,
2364  2));
2365  $offset += 2;
2366  $descriptionRecord['data_type_text'] = self::ASFmetadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
2367 
2368  $descriptionRecord['data_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2369  $offset,
2370  4));
2371  $offset += 4;
2372 
2373  $descriptionRecord['name'] = substr($asf_header_extension_object_data,
2374  $offset,
2375  $descriptionRecord['name_length']);
2376  $offset += $descriptionRecord['name_length'];
2377 
2378  $descriptionRecord['data'] = substr($asf_header_extension_object_data,
2379  $offset,
2380  $descriptionRecord['data_length']);
2381  $offset += $descriptionRecord['data_length'];
2382  switch ($descriptionRecord['data_type']) {
2383  case 0x0000: // Unicode string
2384  break;
2385 
2386  case 0x0001: // BYTE array
2387  // do nothing
2388  break;
2389 
2390  case 0x0002: // BOOL
2391  $descriptionRecord['data'] = (bool) Helper::LittleEndian2Int($descriptionRecord['data']);
2392  break;
2393 
2394  case 0x0003: // DWORD
2395  case 0x0004: // QWORD
2396  case 0x0005: // WORD
2397  $descriptionRecord['data'] = Helper::LittleEndian2Int($descriptionRecord['data']);
2398  break;
2399 
2400  case 0x0006: // GUID
2401  $descriptionRecord['data_text'] = self::BytestringToGUID($descriptionRecord['data']);
2402  break;
2403  }
2404 
2405  $thisObject['description_record'][$i] = $descriptionRecord;
2406  }
2407  break;
2408 
2409  case self::$GETID3_ASF_Language_List_Object:
2410  $thisObject['language_id_record_counts'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2411  $offset,
2412  2));
2413  $offset += 2;
2414 
2415  for ($i = 0; $i < $thisObject['language_id_record_counts'];
2416  $i++) {
2417  $languageIDrecord = array();
2418 
2419  $languageIDrecord['language_id_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2420  $offset,
2421  1));
2422  $offset += 1;
2423 
2424  $languageIDrecord['language_id'] = substr($asf_header_extension_object_data,
2425  $offset,
2426  $languageIDrecord['language_id_length']);
2427  $offset += $languageIDrecord['language_id_length'];
2428 
2429  $thisObject['language_id_record'][$i] = $languageIDrecord;
2430  }
2431  break;
2432 
2433  case self::$GETID3_ASF_Metadata_Library_Object:
2434  $thisObject['description_records_count'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2435  $offset,
2436  2));
2437  $offset += 2;
2438 
2439  for ($i = 0; $i < $thisObject['description_records_count'];
2440  $i++) {
2441  $descriptionRecord = array();
2442 
2443  $descriptionRecord['language_list_index'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2444  $offset,
2445  2));
2446  $offset += 2;
2447 
2448  $descriptionRecord['stream_number'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2449  $offset,
2450  2));
2451  $offset += 2;
2452 
2453  $descriptionRecord['name_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2454  $offset,
2455  2));
2456  $offset += 2;
2457 
2458  $descriptionRecord['data_type'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2459  $offset,
2460  2));
2461  $offset += 2;
2462  $descriptionRecord['data_type_text'] = self::ASFmetadataLibraryObjectDataTypeLookup($descriptionRecord['data_type']);
2463 
2464  $descriptionRecord['data_length'] = Helper::LittleEndian2Int(substr($asf_header_extension_object_data,
2465  $offset,
2466  4));
2467  $offset += 4;
2468 
2469  $descriptionRecord['name'] = substr($asf_header_extension_object_data,
2470  $offset,
2471  $descriptionRecord['name_length']);
2472  $offset += $descriptionRecord['name_length'];
2473 
2474  $descriptionRecord['data'] = substr($asf_header_extension_object_data,
2475  $offset,
2476  $descriptionRecord['data_length']);
2477  $offset += $descriptionRecord['data_length'];
2478 
2479  if (preg_match('#^WM/Picture$#',
2480  str_replace("\x00", '',
2481  trim($descriptionRecord['name'])))) {
2482  $WMpicture = $this->ASF_WMpicture($descriptionRecord['data']);
2483  foreach ($WMpicture as $key => $value) {
2484  $descriptionRecord['data'] = $WMpicture;
2485  }
2486  unset($WMpicture);
2487  }
2488 
2489  $thisObject['description_record'][$i] = $descriptionRecord;
2490  }
2491  break;
2492 
2493  default:
2494  $unhandled_sections++;
2495  if (self::GUIDname($thisObject['guid_text'])) {
2496  $this->getid3->info['warning'][] = 'unhandled Header Extension Object GUID "' . self::GUIDname($thisObject['guid_text']) . '" {' . $thisObject['guid_text'] . '} at offset ' . ($offset - 16 - 8);
2497  } else {
2498  $this->getid3->info['warning'][] = 'unknown Header Extension Object GUID {' . $thisObject['guid_text'] . '} in at offset ' . ($offset - 16 - 8);
2499  }
2500  break;
2501  }
2502  $HeaderExtensionObjectParsed[] = $thisObject;
2503 
2504  $objectOffset += $thisObject['size'];
2505  }
2506 
2507  return $HeaderExtensionObjectParsed;
2508  }
Create styles array
The data for the language used.
static LittleEndian2Int($byteword, $signed=false)
Definition: Helper.php:413
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ASF_WMpicture()

GetId3\Module\AudioVideo\Asf::ASF_WMpicture ( $data)

Definition at line 2525 of file Asf.php.

References $data, array, GetId3\Lib\Helper\GetDataImageSize(), GetId3\Lib\Helper\LittleEndian2Int(), and GetId3\Module\AudioVideo\Asf\WMpictureTypeLookup().

Referenced by GetId3\Module\AudioVideo\Asf\analyze(), and GetId3\Module\AudioVideo\Asf\ASF_HeaderExtensionObjectDataParse().

2526  {
2527  //typedef struct _WMPicture{
2528  // LPWSTR pwszMIMEType;
2529  // BYTE bPictureType;
2530  // LPWSTR pwszDescription;
2531  // DWORD dwDataLen;
2532  // BYTE* pbData;
2533  //} WM_PICTURE;
2534 
2535  $WMpicture = array();
2536 
2537  $offset = 0;
2538  $WMpicture['image_type_id'] = Helper::LittleEndian2Int(substr($data,
2539  $offset,
2540  1));
2541  $offset += 1;
2542  $WMpicture['image_type'] = $this->WMpictureTypeLookup($WMpicture['image_type_id']);
2543  $WMpicture['image_size'] = Helper::LittleEndian2Int(substr($data,
2544  $offset,
2545  4));
2546  $offset += 4;
2547 
2548  $WMpicture['image_mime'] = '';
2549  do {
2550  $next_byte_pair = substr($data, $offset, 2);
2551  $offset += 2;
2552  $WMpicture['image_mime'] .= $next_byte_pair;
2553  } while ($next_byte_pair !== "\x00\x00");
2554 
2555  $WMpicture['image_description'] = '';
2556  do {
2557  $next_byte_pair = substr($data, $offset, 2);
2558  $offset += 2;
2559  $WMpicture['image_description'] .= $next_byte_pair;
2560  } while ($next_byte_pair !== "\x00\x00");
2561 
2562  $WMpicture['dataoffset'] = $offset;
2563  $WMpicture['data'] = substr($data, $offset);
2564 
2565  $imageinfo = array();
2566  $WMpicture['image_mime'] = '';
2567  $imagechunkcheck = Helper::GetDataImageSize($WMpicture['data'],
2568  $imageinfo);
2569  unset($imageinfo);
2570  if (!empty($imagechunkcheck)) {
2571  $WMpicture['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
2572  }
2573  if (!isset($this->getid3->info['asf']['comments']['picture'])) {
2574  $this->getid3->info['asf']['comments']['picture'] = array();
2575  }
2576  $this->getid3->info['asf']['comments']['picture'][] = array('data' => $WMpicture['data'], 'image_mime' => $WMpicture['image_mime']);
2577 
2578  return $WMpicture;
2579  }
static GetDataImageSize($imgData, &$imageinfo)
string $tempdir
Definition: Helper.php:1622
static WMpictureTypeLookup($WMpictureType)
Definition: Asf.php:2101
Create styles array
The data for the language used.
static LittleEndian2Int($byteword, $signed=false)
Definition: Helper.php:413
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ASFCodecListObjectTypeLookup()

static GetId3\Module\AudioVideo\Asf::ASFCodecListObjectTypeLookup (   $CodecListType)
static

Definition at line 1871 of file Asf.php.

References array.

Referenced by GetId3\Module\AudioVideo\Asf\analyze().

1872  {
1873  static $ASFCodecListObjectTypeLookup = array();
1874  if (empty($ASFCodecListObjectTypeLookup)) {
1875  $ASFCodecListObjectTypeLookup[0x0001] = 'Video Codec';
1876  $ASFCodecListObjectTypeLookup[0x0002] = 'Audio Codec';
1877  $ASFCodecListObjectTypeLookup[0xFFFF] = 'Unknown Codec';
1878  }
1879 
1880  return (isset($ASFCodecListObjectTypeLookup[$CodecListType]) ? $ASFCodecListObjectTypeLookup[$CodecListType] : 'Invalid Codec Type');
1881  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ ASFIndexObjectIndexTypeLookup()

static GetId3\Module\AudioVideo\Asf::ASFIndexObjectIndexTypeLookup (   $id)
static

Definition at line 2009 of file Asf.php.

References array.

Referenced by GetId3\Module\AudioVideo\Asf\analyze().

2010  {
2011  static $ASFIndexObjectIndexTypeLookup = array();
2012  if (empty($ASFIndexObjectIndexTypeLookup)) {
2013  $ASFIndexObjectIndexTypeLookup[1] = 'Nearest Past Data Packet';
2014  $ASFIndexObjectIndexTypeLookup[2] = 'Nearest Past Media Object';
2015  $ASFIndexObjectIndexTypeLookup[3] = 'Nearest Past Cleanpoint';
2016  }
2017 
2018  return (isset($ASFIndexObjectIndexTypeLookup[$id]) ? $ASFIndexObjectIndexTypeLookup[$id] : 'invalid');
2019  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ ASFmetadataLibraryObjectDataTypeLookup()

static GetId3\Module\AudioVideo\Asf::ASFmetadataLibraryObjectDataTypeLookup (   $id)
static

Definition at line 2510 of file Asf.php.

References array.

2511  {
2512  static $ASFmetadataLibraryObjectDataTypeLookup = array(
2513  0x0000 => 'Unicode string', // The data consists of a sequence of Unicode characters
2514  0x0001 => 'BYTE array', // The type of the data is implementation-specific
2515  0x0002 => 'BOOL', // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer. Only 0x0000 or 0x0001 are permitted values
2516  0x0003 => 'DWORD', // The data is 4 bytes long and should be interpreted as a 32-bit unsigned integer
2517  0x0004 => 'QWORD', // The data is 8 bytes long and should be interpreted as a 64-bit unsigned integer
2518  0x0005 => 'WORD', // The data is 2 bytes long and should be interpreted as a 16-bit unsigned integer
2519  0x0006 => 'GUID', // The data is 16 bytes long and should be interpreted as a 128-bit GUID
2520  );
2521 
2522  return (isset($ASFmetadataLibraryObjectDataTypeLookup[$id]) ? $ASFmetadataLibraryObjectDataTypeLookup[$id] : 'invalid');
2523  }
Create styles array
The data for the language used.

◆ BytestringToGUID()

static GetId3\Module\AudioVideo\Asf::BytestringToGUID (   $Bytestring)
static

Definition at line 2056 of file Asf.php.

2057  {
2058  $GUIDstring = str_pad(dechex(ord($Bytestring{3})), 2, '0', STR_PAD_LEFT);
2059  $GUIDstring .= str_pad(dechex(ord($Bytestring{2})), 2, '0', STR_PAD_LEFT);
2060  $GUIDstring .= str_pad(dechex(ord($Bytestring{1})), 2, '0', STR_PAD_LEFT);
2061  $GUIDstring .= str_pad(dechex(ord($Bytestring{0})), 2, '0', STR_PAD_LEFT);
2062  $GUIDstring .= '-';
2063  $GUIDstring .= str_pad(dechex(ord($Bytestring{5})), 2, '0', STR_PAD_LEFT);
2064  $GUIDstring .= str_pad(dechex(ord($Bytestring{4})), 2, '0', STR_PAD_LEFT);
2065  $GUIDstring .= '-';
2066  $GUIDstring .= str_pad(dechex(ord($Bytestring{7})), 2, '0', STR_PAD_LEFT);
2067  $GUIDstring .= str_pad(dechex(ord($Bytestring{6})), 2, '0', STR_PAD_LEFT);
2068  $GUIDstring .= '-';
2069  $GUIDstring .= str_pad(dechex(ord($Bytestring{8})), 2, '0', STR_PAD_LEFT);
2070  $GUIDstring .= str_pad(dechex(ord($Bytestring{9})), 2, '0', STR_PAD_LEFT);
2071  $GUIDstring .= '-';
2072  $GUIDstring .= str_pad(dechex(ord($Bytestring{10})), 2, '0',
2073  STR_PAD_LEFT);
2074  $GUIDstring .= str_pad(dechex(ord($Bytestring{11})), 2, '0',
2075  STR_PAD_LEFT);
2076  $GUIDstring .= str_pad(dechex(ord($Bytestring{12})), 2, '0',
2077  STR_PAD_LEFT);
2078  $GUIDstring .= str_pad(dechex(ord($Bytestring{13})), 2, '0',
2079  STR_PAD_LEFT);
2080  $GUIDstring .= str_pad(dechex(ord($Bytestring{14})), 2, '0',
2081  STR_PAD_LEFT);
2082  $GUIDstring .= str_pad(dechex(ord($Bytestring{15})), 2, '0',
2083  STR_PAD_LEFT);
2084 
2085  return strtoupper($GUIDstring);
2086  }

◆ FILETIMEtoUNIXtime()

static GetId3\Module\AudioVideo\Asf::FILETIMEtoUNIXtime (   $FILETIME,
  $round = true 
)
static

Definition at line 2088 of file Asf.php.

2089  {
2090  // FILETIME is a 64-bit unsigned integer representing
2091  // the number of 100-nanosecond intervals since January 1, 1601
2092  // UNIX timestamp is number of seconds since January 1, 1970
2093  // 116444736000000000 = 10000000 * 60 * 60 * 24 * 365 * 369 + 89 leap days
2094  if ($round) {
2095  return intval(round(($FILETIME - 116444736000000000) / 10000000));
2096  }
2097 
2098  return ($FILETIME - 116444736000000000) / 10000000;
2099  }

◆ GUIDname()

static GetId3\Module\AudioVideo\Asf::GUIDname (   $GUIDstring)
static

Definition at line 1999 of file Asf.php.

References array.

2000  {
2001  static $GUIDarray = array();
2002  if (empty($GUIDarray)) {
2003  $GUIDarray = self::KnownGUIDs();
2004  }
2005 
2006  return array_search($GUIDstring, $GUIDarray);
2007  }
Create styles array
The data for the language used.

◆ GUIDtoBytestring()

static GetId3\Module\AudioVideo\Asf::GUIDtoBytestring (   $GUIDstring)
static

Definition at line 2021 of file Asf.php.

2022  {
2023  // Microsoft defines these 16-byte (128-bit) GUIDs in the strangest way:
2024  // first 4 bytes are in little-endian order
2025  // next 2 bytes are appended in little-endian order
2026  // next 2 bytes are appended in little-endian order
2027  // next 2 bytes are appended in big-endian order
2028  // next 6 bytes are appended in big-endian order
2029  // AaBbCcDd-EeFf-GgHh-IiJj-KkLlMmNnOoPp is stored as this 16-byte string:
2030  // $Dd $Cc $Bb $Aa $Ff $Ee $Hh $Gg $Ii $Jj $Kk $Ll $Mm $Nn $Oo $Pp
2031 
2032  $hexbytecharstring = chr(hexdec(substr($GUIDstring, 6, 2)));
2033  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 4, 2)));
2034  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 2, 2)));
2035  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 0, 2)));
2036 
2037  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 11, 2)));
2038  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 9, 2)));
2039 
2040  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 16, 2)));
2041  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 14, 2)));
2042 
2043  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 19, 2)));
2044  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 21, 2)));
2045 
2046  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 24, 2)));
2047  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 26, 2)));
2048  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 28, 2)));
2049  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 30, 2)));
2050  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 32, 2)));
2051  $hexbytecharstring .= chr(hexdec(substr($GUIDstring, 34, 2)));
2052 
2053  return $hexbytecharstring;
2054  }

◆ KnownGUIDs()

static GetId3\Module\AudioVideo\Asf::KnownGUIDs ( )
static

Definition at line 1883 of file Asf.php.

References array.

1884  {
1885  static $GUIDarray = array(
1886  'GETID3_ASF_Extended_Stream_Properties_Object' => '14E6A5CB-C672-4332-8399-A96952065B5A',
1887  'GETID3_ASF_Padding_Object' => '1806D474-CADF-4509-A4BA-9AABCB96AAE8',
1888  'GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio' => '1B1EE554-F9EA-4BC8-821A-376B74E4C4B8',
1889  'GETID3_ASF_Script_Command_Object' => '1EFB1A30-0B62-11D0-A39B-00A0C90348F6',
1890  'GETID3_ASF_No_Error_Correction' => '20FB5700-5B55-11CF-A8FD-00805F5C442B',
1891  'GETID3_ASF_Content_Branding_Object' => '2211B3FA-BD23-11D2-B4B7-00A0C955FC6E',
1892  'GETID3_ASF_Content_Encryption_Object' => '2211B3FB-BD23-11D2-B4B7-00A0C955FC6E',
1893  'GETID3_ASF_Digital_Signature_Object' => '2211B3FC-BD23-11D2-B4B7-00A0C955FC6E',
1894  'GETID3_ASF_Extended_Content_Encryption_Object' => '298AE614-2622-4C17-B935-DAE07EE9289C',
1895  'GETID3_ASF_Simple_Index_Object' => '33000890-E5B1-11CF-89F4-00A0C90349CB',
1896  'GETID3_ASF_Degradable_JPEG_Media' => '35907DE0-E415-11CF-A917-00805F5C442B',
1897  'GETID3_ASF_Payload_Extension_System_Timecode' => '399595EC-8667-4E2D-8FDB-98814CE76C1E',
1898  'GETID3_ASF_Binary_Media' => '3AFB65E2-47EF-40F2-AC2C-70A90D71D343',
1899  'GETID3_ASF_Timecode_Index_Object' => '3CB73FD0-0C4A-4803-953D-EDF7B6228F0C',
1900  'GETID3_ASF_Metadata_Library_Object' => '44231C94-9498-49D1-A141-1D134E457054',
1901  'GETID3_ASF_Reserved_3' => '4B1ACBE3-100B-11D0-A39B-00A0C90348F6',
1902  'GETID3_ASF_Reserved_4' => '4CFEDB20-75F6-11CF-9C0F-00A0C90349CB',
1903  'GETID3_ASF_Command_Media' => '59DACFC0-59E6-11D0-A3AC-00A0C90348F6',
1904  'GETID3_ASF_Header_Extension_Object' => '5FBF03B5-A92E-11CF-8EE3-00C00C205365',
1905  'GETID3_ASF_Media_Object_Index_Parameters_Obj' => '6B203BAD-3F11-4E84-ACA8-D7613DE2CFA7',
1906  'GETID3_ASF_Header_Object' => '75B22630-668E-11CF-A6D9-00AA0062CE6C',
1907  'GETID3_ASF_Content_Description_Object' => '75B22633-668E-11CF-A6D9-00AA0062CE6C',
1908  'GETID3_ASF_Error_Correction_Object' => '75B22635-668E-11CF-A6D9-00AA0062CE6C',
1909  'GETID3_ASF_Data_Object' => '75B22636-668E-11CF-A6D9-00AA0062CE6C',
1910  'GETID3_ASF_Web_Stream_Media_Subtype' => '776257D4-C627-41CB-8F81-7AC7FF1C40CC',
1911  'GETID3_ASF_Stream_Bitrate_Properties_Object' => '7BF875CE-468D-11D1-8D82-006097C9A2B2',
1912  'GETID3_ASF_Language_List_Object' => '7C4346A9-EFE0-4BFC-B229-393EDE415C85',
1913  'GETID3_ASF_Codec_List_Object' => '86D15240-311D-11D0-A3A4-00A0C90348F6',
1914  'GETID3_ASF_Reserved_2' => '86D15241-311D-11D0-A3A4-00A0C90348F6',
1915  'GETID3_ASF_File_Properties_Object' => '8CABDCA1-A947-11CF-8EE4-00C00C205365',
1916  'GETID3_ASF_File_Transfer_Media' => '91BD222C-F21C-497A-8B6D-5AA86BFC0185',
1917  'GETID3_ASF_Old_RTP_Extension_Data' => '96800C63-4C94-11D1-837B-0080C7A37F95',
1918  'GETID3_ASF_Advanced_Mutual_Exclusion_Object' => 'A08649CF-4775-4670-8A16-6E35357566CD',
1919  'GETID3_ASF_Bandwidth_Sharing_Object' => 'A69609E6-517B-11D2-B6AF-00C04FD908E9',
1920  'GETID3_ASF_Reserved_1' => 'ABD3D211-A9BA-11cf-8EE6-00C00C205365',
1921  'GETID3_ASF_Bandwidth_Sharing_Exclusive' => 'AF6060AA-5197-11D2-B6AF-00C04FD908E9',
1922  'GETID3_ASF_Bandwidth_Sharing_Partial' => 'AF6060AB-5197-11D2-B6AF-00C04FD908E9',
1923  'GETID3_ASF_JFIF_Media' => 'B61BE100-5B4E-11CF-A8FD-00805F5C442B',
1924  'GETID3_ASF_Stream_Properties_Object' => 'B7DC0791-A9B7-11CF-8EE6-00C00C205365',
1925  'GETID3_ASF_Video_Media' => 'BC19EFC0-5B4D-11CF-A8FD-00805F5C442B',
1926  'GETID3_ASF_Audio_Spread' => 'BFC3CD50-618F-11CF-8BB2-00AA00B4E220',
1927  'GETID3_ASF_Metadata_Object' => 'C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA',
1928  'GETID3_ASF_Payload_Ext_Syst_Sample_Duration' => 'C6BD9450-867F-4907-83A3-C77921B733AD',
1929  'GETID3_ASF_Group_Mutual_Exclusion_Object' => 'D1465A40-5A79-4338-B71B-E36B8FD6C249',
1930  'GETID3_ASF_Extended_Content_Description_Object' => 'D2D0A440-E307-11D2-97F0-00A0C95EA850',
1931  'GETID3_ASF_Stream_Prioritization_Object' => 'D4FED15B-88D3-454F-81F0-ED5C45999E24',
1932  'GETID3_ASF_Payload_Ext_System_Content_Type' => 'D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC',
1933  'GETID3_ASF_Old_File_Properties_Object' => 'D6E229D0-35DA-11D1-9034-00A0C90349BE',
1934  'GETID3_ASF_Old_ASF_Header_Object' => 'D6E229D1-35DA-11D1-9034-00A0C90349BE',
1935  'GETID3_ASF_Old_ASF_Data_Object' => 'D6E229D2-35DA-11D1-9034-00A0C90349BE',
1936  'GETID3_ASF_Index_Object' => 'D6E229D3-35DA-11D1-9034-00A0C90349BE',
1937  'GETID3_ASF_Old_Stream_Properties_Object' => 'D6E229D4-35DA-11D1-9034-00A0C90349BE',
1938  'GETID3_ASF_Old_Content_Description_Object' => 'D6E229D5-35DA-11D1-9034-00A0C90349BE',
1939  'GETID3_ASF_Old_Script_Command_Object' => 'D6E229D6-35DA-11D1-9034-00A0C90349BE',
1940  'GETID3_ASF_Old_Marker_Object' => 'D6E229D7-35DA-11D1-9034-00A0C90349BE',
1941  'GETID3_ASF_Old_Component_Download_Object' => 'D6E229D8-35DA-11D1-9034-00A0C90349BE',
1942  'GETID3_ASF_Old_Stream_Group_Object' => 'D6E229D9-35DA-11D1-9034-00A0C90349BE',
1943  'GETID3_ASF_Old_Scalable_Object' => 'D6E229DA-35DA-11D1-9034-00A0C90349BE',
1944  'GETID3_ASF_Old_Prioritization_Object' => 'D6E229DB-35DA-11D1-9034-00A0C90349BE',
1945  'GETID3_ASF_Bitrate_Mutual_Exclusion_Object' => 'D6E229DC-35DA-11D1-9034-00A0C90349BE',
1946  'GETID3_ASF_Old_Inter_Media_Dependency_Object' => 'D6E229DD-35DA-11D1-9034-00A0C90349BE',
1947  'GETID3_ASF_Old_Rating_Object' => 'D6E229DE-35DA-11D1-9034-00A0C90349BE',
1948  'GETID3_ASF_Index_Parameters_Object' => 'D6E229DF-35DA-11D1-9034-00A0C90349BE',
1949  'GETID3_ASF_Old_Color_Table_Object' => 'D6E229E0-35DA-11D1-9034-00A0C90349BE',
1950  'GETID3_ASF_Old_Language_List_Object' => 'D6E229E1-35DA-11D1-9034-00A0C90349BE',
1951  'GETID3_ASF_Old_Audio_Media' => 'D6E229E2-35DA-11D1-9034-00A0C90349BE',
1952  'GETID3_ASF_Old_Video_Media' => 'D6E229E3-35DA-11D1-9034-00A0C90349BE',
1953  'GETID3_ASF_Old_Image_Media' => 'D6E229E4-35DA-11D1-9034-00A0C90349BE',
1954  'GETID3_ASF_Old_Timecode_Media' => 'D6E229E5-35DA-11D1-9034-00A0C90349BE',
1955  'GETID3_ASF_Old_Text_Media' => 'D6E229E6-35DA-11D1-9034-00A0C90349BE',
1956  'GETID3_ASF_Old_MIDI_Media' => 'D6E229E7-35DA-11D1-9034-00A0C90349BE',
1957  'GETID3_ASF_Old_Command_Media' => 'D6E229E8-35DA-11D1-9034-00A0C90349BE',
1958  'GETID3_ASF_Old_No_Error_Concealment' => 'D6E229EA-35DA-11D1-9034-00A0C90349BE',
1959  'GETID3_ASF_Old_Scrambled_Audio' => 'D6E229EB-35DA-11D1-9034-00A0C90349BE',
1960  'GETID3_ASF_Old_No_Color_Table' => 'D6E229EC-35DA-11D1-9034-00A0C90349BE',
1961  'GETID3_ASF_Old_SMPTE_Time' => 'D6E229ED-35DA-11D1-9034-00A0C90349BE',
1962  'GETID3_ASF_Old_ASCII_Text' => 'D6E229EE-35DA-11D1-9034-00A0C90349BE',
1963  'GETID3_ASF_Old_Unicode_Text' => 'D6E229EF-35DA-11D1-9034-00A0C90349BE',
1964  'GETID3_ASF_Old_HTML_Text' => 'D6E229F0-35DA-11D1-9034-00A0C90349BE',
1965  'GETID3_ASF_Old_URL_Command' => 'D6E229F1-35DA-11D1-9034-00A0C90349BE',
1966  'GETID3_ASF_Old_Filename_Command' => 'D6E229F2-35DA-11D1-9034-00A0C90349BE',
1967  'GETID3_ASF_Old_ACM_Codec' => 'D6E229F3-35DA-11D1-9034-00A0C90349BE',
1968  'GETID3_ASF_Old_VCM_Codec' => 'D6E229F4-35DA-11D1-9034-00A0C90349BE',
1969  'GETID3_ASF_Old_QuickTime_Codec' => 'D6E229F5-35DA-11D1-9034-00A0C90349BE',
1970  'GETID3_ASF_Old_DirectShow_Transform_Filter' => 'D6E229F6-35DA-11D1-9034-00A0C90349BE',
1971  'GETID3_ASF_Old_DirectShow_Rendering_Filter' => 'D6E229F7-35DA-11D1-9034-00A0C90349BE',
1972  'GETID3_ASF_Old_No_Enhancement' => 'D6E229F8-35DA-11D1-9034-00A0C90349BE',
1973  'GETID3_ASF_Old_Unknown_Enhancement_Type' => 'D6E229F9-35DA-11D1-9034-00A0C90349BE',
1974  'GETID3_ASF_Old_Temporal_Enhancement' => 'D6E229FA-35DA-11D1-9034-00A0C90349BE',
1975  'GETID3_ASF_Old_Spatial_Enhancement' => 'D6E229FB-35DA-11D1-9034-00A0C90349BE',
1976  'GETID3_ASF_Old_Quality_Enhancement' => 'D6E229FC-35DA-11D1-9034-00A0C90349BE',
1977  'GETID3_ASF_Old_Number_of_Channels_Enhancement' => 'D6E229FD-35DA-11D1-9034-00A0C90349BE',
1978  'GETID3_ASF_Old_Frequency_Response_Enhancement' => 'D6E229FE-35DA-11D1-9034-00A0C90349BE',
1979  'GETID3_ASF_Old_Media_Object' => 'D6E229FF-35DA-11D1-9034-00A0C90349BE',
1980  'GETID3_ASF_Mutex_Language' => 'D6E22A00-35DA-11D1-9034-00A0C90349BE',
1981  'GETID3_ASF_Mutex_Bitrate' => 'D6E22A01-35DA-11D1-9034-00A0C90349BE',
1982  'GETID3_ASF_Mutex_Unknown' => 'D6E22A02-35DA-11D1-9034-00A0C90349BE',
1983  'GETID3_ASF_Old_ASF_Placeholder_Object' => 'D6E22A0E-35DA-11D1-9034-00A0C90349BE',
1984  'GETID3_ASF_Old_Data_Unit_Extension_Object' => 'D6E22A0F-35DA-11D1-9034-00A0C90349BE',
1985  'GETID3_ASF_Web_Stream_Format' => 'DA1E6B13-8359-4050-B398-388E965BF00C',
1986  'GETID3_ASF_Payload_Ext_System_File_Name' => 'E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B',
1987  'GETID3_ASF_Marker_Object' => 'F487CD01-A951-11CF-8EE6-00C00C205365',
1988  'GETID3_ASF_Timecode_Index_Parameters_Object' => 'F55E496D-9797-4B5D-8C8B-604DFE9BFB24',
1989  'GETID3_ASF_Audio_Media' => 'F8699E40-5B4D-11CF-A8FD-00805F5C442B',
1990  'GETID3_ASF_Media_Object_Index_Object' => 'FEB103F8-12AD-4C64-840F-2A1D2F7AD48C',
1991  'GETID3_ASF_Alt_Extended_Content_Encryption_Obj' => 'FF889EF1-ADEE-40DA-9E71-98704BB928CE',
1992  'GETID3_ASF_Index_Placeholder_Object' => 'D9AADE20-7C17-4F9C-BC28-8555DD98E2A2', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
1993  'GETID3_ASF_Compatibility_Object' => '26F18B5D-4584-47EC-9F5F-0E651F0452C9', // http://cpan.uwinnipeg.ca/htdocs/Audio-WMA/Audio/WMA.pm.html
1994  );
1995 
1996  return $GUIDarray;
1997  }
Create styles array
The data for the language used.

◆ TrimConvert()

static GetId3\Module\AudioVideo\Asf::TrimConvert (   $string)
static

Definition at line 2582 of file Asf.php.

References GetId3\Lib\Helper\iconv_fallback().

2583  {
2584  return trim(Helper::iconv_fallback('UTF-16LE', 'ISO-8859-1',
2585  self::TrimTerm($string)),
2586  ' ');
2587  }
static iconv_fallback($in_charset, $out_charset, $string)
array $ConversionFunctionList
Definition: Helper.php:1375
+ Here is the call graph for this function:

◆ TrimTerm()

static GetId3\Module\AudioVideo\Asf::TrimTerm (   $string)
static

Definition at line 2590 of file Asf.php.

2591  {
2592  // remove terminator, only if present (it should be, but...)
2593  if (substr($string, -2) === "\x00\x00") {
2594  $string = substr($string, 0, -2);
2595  }
2596 
2597  return $string;
2598  }

◆ WMpictureTypeLookup()

static GetId3\Module\AudioVideo\Asf::WMpictureTypeLookup (   $WMpictureType)
static

Definition at line 2101 of file Asf.php.

References array, and GetId3\Lib\Helper\iconv_fallback().

Referenced by GetId3\Module\AudioVideo\Asf\ASF_WMpicture().

2102  {
2103  static $WMpictureTypeLookup = array();
2104  if (empty($WMpictureTypeLookup)) {
2105  $WMpictureTypeLookup[0x03] = Helper::iconv_fallback('ISO-8859-1',
2106  'UTF-16LE',
2107  'Front Cover');
2108  $WMpictureTypeLookup[0x04] = Helper::iconv_fallback('ISO-8859-1',
2109  'UTF-16LE',
2110  'Back Cover');
2111  $WMpictureTypeLookup[0x00] = Helper::iconv_fallback('ISO-8859-1',
2112  'UTF-16LE',
2113  'User Defined');
2114  $WMpictureTypeLookup[0x05] = Helper::iconv_fallback('ISO-8859-1',
2115  'UTF-16LE',
2116  'Leaflet Page');
2117  $WMpictureTypeLookup[0x06] = Helper::iconv_fallback('ISO-8859-1',
2118  'UTF-16LE',
2119  'Media Label');
2120  $WMpictureTypeLookup[0x07] = Helper::iconv_fallback('ISO-8859-1',
2121  'UTF-16LE',
2122  'Lead Artist');
2123  $WMpictureTypeLookup[0x08] = Helper::iconv_fallback('ISO-8859-1',
2124  'UTF-16LE',
2125  'Artist');
2126  $WMpictureTypeLookup[0x09] = Helper::iconv_fallback('ISO-8859-1',
2127  'UTF-16LE',
2128  'Conductor');
2129  $WMpictureTypeLookup[0x0A] = Helper::iconv_fallback('ISO-8859-1',
2130  'UTF-16LE',
2131  'Band');
2132  $WMpictureTypeLookup[0x0B] = Helper::iconv_fallback('ISO-8859-1',
2133  'UTF-16LE',
2134  'Composer');
2135  $WMpictureTypeLookup[0x0C] = Helper::iconv_fallback('ISO-8859-1',
2136  'UTF-16LE',
2137  'Lyricist');
2138  $WMpictureTypeLookup[0x0D] = Helper::iconv_fallback('ISO-8859-1',
2139  'UTF-16LE',
2140  'Recording Location');
2141  $WMpictureTypeLookup[0x0E] = Helper::iconv_fallback('ISO-8859-1',
2142  'UTF-16LE',
2143  'During Recording');
2144  $WMpictureTypeLookup[0x0F] = Helper::iconv_fallback('ISO-8859-1',
2145  'UTF-16LE',
2146  'During Performance');
2147  $WMpictureTypeLookup[0x10] = Helper::iconv_fallback('ISO-8859-1',
2148  'UTF-16LE',
2149  'Video Screen Capture');
2150  $WMpictureTypeLookup[0x12] = Helper::iconv_fallback('ISO-8859-1',
2151  'UTF-16LE',
2152  'Illustration');
2153  $WMpictureTypeLookup[0x13] = Helper::iconv_fallback('ISO-8859-1',
2154  'UTF-16LE',
2155  'Band Logotype');
2156  $WMpictureTypeLookup[0x14] = Helper::iconv_fallback('ISO-8859-1',
2157  'UTF-16LE',
2158  'Publisher Logotype');
2159  }
2160 
2161  return (isset($WMpictureTypeLookup[$WMpictureType]) ? $WMpictureTypeLookup[$WMpictureType] : '');
2162  }
Create styles array
The data for the language used.
static iconv_fallback($in_charset, $out_charset, $string)
array $ConversionFunctionList
Definition: Helper.php:1375
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $GETID3_ASF_Advanced_Mutual_Exclusion_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Advanced_Mutual_Exclusion_Object
staticprotected

Definition at line 66 of file Asf.php.

◆ $GETID3_ASF_Alt_Extended_Content_Encryption_Obj

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Alt_Extended_Content_Encryption_Obj
staticprotected

Definition at line 139 of file Asf.php.

◆ $GETID3_ASF_Audio_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Audio_Media
staticprotected

Definition at line 137 of file Asf.php.

◆ $GETID3_ASF_Audio_Spread

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Audio_Spread
staticprotected

Definition at line 74 of file Asf.php.

◆ $GETID3_ASF_Bandwidth_Sharing_Exclusive

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Bandwidth_Sharing_Exclusive
staticprotected

Definition at line 69 of file Asf.php.

◆ $GETID3_ASF_Bandwidth_Sharing_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Bandwidth_Sharing_Object
staticprotected

Definition at line 67 of file Asf.php.

◆ $GETID3_ASF_Bandwidth_Sharing_Partial

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Bandwidth_Sharing_Partial
staticprotected

Definition at line 70 of file Asf.php.

◆ $GETID3_ASF_Binary_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Binary_Media
staticprotected

Definition at line 46 of file Asf.php.

◆ $GETID3_ASF_Bitrate_Mutual_Exclusion_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Bitrate_Mutual_Exclusion_Object
staticprotected

Definition at line 93 of file Asf.php.

◆ $GETID3_ASF_Codec_List_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Codec_List_Object
staticprotected

Definition at line 61 of file Asf.php.

◆ $GETID3_ASF_Command_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Command_Media
staticprotected

Definition at line 51 of file Asf.php.

◆ $GETID3_ASF_Compatibility_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Compatibility_Object
staticprotected

Definition at line 149 of file Asf.php.

◆ $GETID3_ASF_Content_Branding_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Content_Branding_Object
staticprotected

Definition at line 39 of file Asf.php.

◆ $GETID3_ASF_Content_Description_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Content_Description_Object
staticprotected

Definition at line 55 of file Asf.php.

◆ $GETID3_ASF_Content_Encryption_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Content_Encryption_Object
staticprotected

Definition at line 40 of file Asf.php.

◆ $GETID3_ASF_Data_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Data_Object
staticprotected

Definition at line 57 of file Asf.php.

◆ $GETID3_ASF_Degradable_JPEG_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Degradable_JPEG_Media
staticprotected

Definition at line 44 of file Asf.php.

◆ $GETID3_ASF_Digital_Signature_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Digital_Signature_Object
staticprotected

Definition at line 41 of file Asf.php.

◆ $GETID3_ASF_Error_Correction_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Error_Correction_Object
staticprotected

Definition at line 56 of file Asf.php.

◆ $GETID3_ASF_Extended_Content_Description_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Extended_Content_Description_Object
staticprotected

Definition at line 78 of file Asf.php.

◆ $GETID3_ASF_Extended_Content_Encryption_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Extended_Content_Encryption_Object
staticprotected

Definition at line 42 of file Asf.php.

◆ $GETID3_ASF_Extended_Stream_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Extended_Stream_Properties_Object
staticprotected

Definition at line 34 of file Asf.php.

◆ $GETID3_ASF_File_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_File_Properties_Object
staticprotected

Definition at line 63 of file Asf.php.

◆ $GETID3_ASF_File_Transfer_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_File_Transfer_Media
staticprotected

Definition at line 64 of file Asf.php.

◆ $GETID3_ASF_Group_Mutual_Exclusion_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Group_Mutual_Exclusion_Object
staticprotected

Definition at line 77 of file Asf.php.

◆ $GETID3_ASF_Header_Extension_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Header_Extension_Object
staticprotected

Definition at line 52 of file Asf.php.

◆ $GETID3_ASF_Header_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Header_Object
staticprotected

Definition at line 54 of file Asf.php.

◆ $GETID3_ASF_Index_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Index_Object
staticprotected

Definition at line 84 of file Asf.php.

◆ $GETID3_ASF_Index_Parameters_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Index_Parameters_Object
staticprotected

Definition at line 96 of file Asf.php.

◆ $GETID3_ASF_Index_Placeholder_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Index_Placeholder_Object
staticprotected

Definition at line 144 of file Asf.php.

◆ $GETID3_ASF_JFIF_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_JFIF_Media
staticprotected

Definition at line 71 of file Asf.php.

◆ $GETID3_ASF_Language_List_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Language_List_Object
staticprotected

Definition at line 60 of file Asf.php.

◆ $GETID3_ASF_Marker_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Marker_Object
staticprotected

Definition at line 135 of file Asf.php.

◆ $GETID3_ASF_Media_Object_Index_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Media_Object_Index_Object
staticprotected

Definition at line 138 of file Asf.php.

◆ $GETID3_ASF_Media_Object_Index_Parameters_Obj

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Media_Object_Index_Parameters_Obj
staticprotected

Definition at line 53 of file Asf.php.

◆ $GETID3_ASF_Metadata_Library_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Metadata_Library_Object
staticprotected

Definition at line 48 of file Asf.php.

◆ $GETID3_ASF_Metadata_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Metadata_Object
staticprotected

Definition at line 75 of file Asf.php.

◆ $GETID3_ASF_Mutex_Bitrate

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Mutex_Bitrate
staticprotected

Definition at line 129 of file Asf.php.

◆ $GETID3_ASF_Mutex_Language

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Mutex_Language
staticprotected

Definition at line 128 of file Asf.php.

◆ $GETID3_ASF_Mutex_Unknown

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Mutex_Unknown
staticprotected

Definition at line 130 of file Asf.php.

◆ $GETID3_ASF_No_Error_Correction

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_No_Error_Correction
staticprotected

Definition at line 38 of file Asf.php.

◆ $GETID3_ASF_Old_ACM_Codec

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_ACM_Codec
staticprotected

Definition at line 115 of file Asf.php.

◆ $GETID3_ASF_Old_ASCII_Text

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_ASCII_Text
staticprotected

Definition at line 110 of file Asf.php.

◆ $GETID3_ASF_Old_ASF_Data_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_ASF_Data_Object
staticprotected

Definition at line 83 of file Asf.php.

◆ $GETID3_ASF_Old_ASF_Header_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_ASF_Header_Object
staticprotected

Definition at line 82 of file Asf.php.

◆ $GETID3_ASF_Old_ASF_Placeholder_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_ASF_Placeholder_Object
staticprotected

Definition at line 131 of file Asf.php.

◆ $GETID3_ASF_Old_Audio_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Audio_Media
staticprotected

Definition at line 99 of file Asf.php.

◆ $GETID3_ASF_Old_Color_Table_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Color_Table_Object
staticprotected

Definition at line 97 of file Asf.php.

◆ $GETID3_ASF_Old_Command_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Command_Media
staticprotected

Definition at line 105 of file Asf.php.

◆ $GETID3_ASF_Old_Component_Download_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Component_Download_Object
staticprotected

Definition at line 89 of file Asf.php.

◆ $GETID3_ASF_Old_Content_Description_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Content_Description_Object
staticprotected

Definition at line 86 of file Asf.php.

◆ $GETID3_ASF_Old_Data_Unit_Extension_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Data_Unit_Extension_Object
staticprotected

Definition at line 132 of file Asf.php.

◆ $GETID3_ASF_Old_DirectShow_Rendering_Filter

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_DirectShow_Rendering_Filter
staticprotected

Definition at line 119 of file Asf.php.

◆ $GETID3_ASF_Old_DirectShow_Transform_Filter

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_DirectShow_Transform_Filter
staticprotected

Definition at line 118 of file Asf.php.

◆ $GETID3_ASF_Old_File_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_File_Properties_Object
staticprotected

Definition at line 81 of file Asf.php.

◆ $GETID3_ASF_Old_Filename_Command

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Filename_Command
staticprotected

Definition at line 114 of file Asf.php.

◆ $GETID3_ASF_Old_Frequency_Response_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Frequency_Response_Enhancement
staticprotected

Definition at line 126 of file Asf.php.

◆ $GETID3_ASF_Old_HTML_Text

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_HTML_Text
staticprotected

Definition at line 112 of file Asf.php.

◆ $GETID3_ASF_Old_Image_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Image_Media
staticprotected

Definition at line 101 of file Asf.php.

◆ $GETID3_ASF_Old_Inter_Media_Dependency_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Inter_Media_Dependency_Object
staticprotected

Definition at line 94 of file Asf.php.

◆ $GETID3_ASF_Old_Language_List_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Language_List_Object
staticprotected

Definition at line 98 of file Asf.php.

◆ $GETID3_ASF_Old_Marker_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Marker_Object
staticprotected

Definition at line 88 of file Asf.php.

◆ $GETID3_ASF_Old_Media_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Media_Object
staticprotected

Definition at line 127 of file Asf.php.

◆ $GETID3_ASF_Old_MIDI_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_MIDI_Media
staticprotected

Definition at line 104 of file Asf.php.

◆ $GETID3_ASF_Old_No_Color_Table

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_No_Color_Table
staticprotected

Definition at line 108 of file Asf.php.

◆ $GETID3_ASF_Old_No_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_No_Enhancement
staticprotected

Definition at line 120 of file Asf.php.

◆ $GETID3_ASF_Old_No_Error_Concealment

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_No_Error_Concealment
staticprotected

Definition at line 106 of file Asf.php.

◆ $GETID3_ASF_Old_Number_of_Channels_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Number_of_Channels_Enhancement
staticprotected

Definition at line 125 of file Asf.php.

◆ $GETID3_ASF_Old_Prioritization_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Prioritization_Object
staticprotected

Definition at line 92 of file Asf.php.

◆ $GETID3_ASF_Old_Quality_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Quality_Enhancement
staticprotected

Definition at line 124 of file Asf.php.

◆ $GETID3_ASF_Old_QuickTime_Codec

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_QuickTime_Codec
staticprotected

Definition at line 117 of file Asf.php.

◆ $GETID3_ASF_Old_Rating_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Rating_Object
staticprotected

Definition at line 95 of file Asf.php.

◆ $GETID3_ASF_Old_RTP_Extension_Data

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_RTP_Extension_Data
staticprotected

Definition at line 65 of file Asf.php.

◆ $GETID3_ASF_Old_Scalable_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Scalable_Object
staticprotected

Definition at line 91 of file Asf.php.

◆ $GETID3_ASF_Old_Scrambled_Audio

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Scrambled_Audio
staticprotected

Definition at line 107 of file Asf.php.

◆ $GETID3_ASF_Old_Script_Command_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Script_Command_Object
staticprotected

Definition at line 87 of file Asf.php.

◆ $GETID3_ASF_Old_SMPTE_Time

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_SMPTE_Time
staticprotected

Definition at line 109 of file Asf.php.

◆ $GETID3_ASF_Old_Spatial_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Spatial_Enhancement
staticprotected

Definition at line 123 of file Asf.php.

◆ $GETID3_ASF_Old_Stream_Group_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Stream_Group_Object
staticprotected

Definition at line 90 of file Asf.php.

◆ $GETID3_ASF_Old_Stream_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Stream_Properties_Object
staticprotected

Definition at line 85 of file Asf.php.

◆ $GETID3_ASF_Old_Temporal_Enhancement

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Temporal_Enhancement
staticprotected

Definition at line 122 of file Asf.php.

◆ $GETID3_ASF_Old_Text_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Text_Media
staticprotected

Definition at line 103 of file Asf.php.

◆ $GETID3_ASF_Old_Timecode_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Timecode_Media
staticprotected

Definition at line 102 of file Asf.php.

◆ $GETID3_ASF_Old_Unicode_Text

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Unicode_Text
staticprotected

Definition at line 111 of file Asf.php.

◆ $GETID3_ASF_Old_Unknown_Enhancement_Type

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Unknown_Enhancement_Type
staticprotected

Definition at line 121 of file Asf.php.

◆ $GETID3_ASF_Old_URL_Command

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_URL_Command
staticprotected

Definition at line 113 of file Asf.php.

◆ $GETID3_ASF_Old_VCM_Codec

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_VCM_Codec
staticprotected

Definition at line 116 of file Asf.php.

◆ $GETID3_ASF_Old_Video_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Old_Video_Media
staticprotected

Definition at line 100 of file Asf.php.

◆ $GETID3_ASF_Padding_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Padding_Object
staticprotected

Definition at line 35 of file Asf.php.

◆ $GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Payload_Ext_Syst_Pixel_Aspect_Ratio
staticprotected

Definition at line 36 of file Asf.php.

◆ $GETID3_ASF_Payload_Ext_Syst_Sample_Duration

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Payload_Ext_Syst_Sample_Duration
staticprotected

Definition at line 76 of file Asf.php.

◆ $GETID3_ASF_Payload_Ext_System_Content_Type

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Payload_Ext_System_Content_Type
staticprotected

Definition at line 80 of file Asf.php.

◆ $GETID3_ASF_Payload_Ext_System_File_Name

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Payload_Ext_System_File_Name
staticprotected

Definition at line 134 of file Asf.php.

◆ $GETID3_ASF_Payload_Extension_System_Timecode

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Payload_Extension_System_Timecode
staticprotected

Definition at line 45 of file Asf.php.

◆ $GETID3_ASF_Reserved_1

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Reserved_1
staticprotected

Definition at line 68 of file Asf.php.

◆ $GETID3_ASF_Reserved_2

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Reserved_2
staticprotected

Definition at line 62 of file Asf.php.

◆ $GETID3_ASF_Reserved_3

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Reserved_3
staticprotected

Definition at line 49 of file Asf.php.

◆ $GETID3_ASF_Reserved_4

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Reserved_4
staticprotected

Definition at line 50 of file Asf.php.

◆ $GETID3_ASF_Script_Command_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Script_Command_Object
staticprotected

Definition at line 37 of file Asf.php.

◆ $GETID3_ASF_Simple_Index_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Simple_Index_Object
staticprotected

Definition at line 43 of file Asf.php.

◆ $GETID3_ASF_Stream_Bitrate_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Stream_Bitrate_Properties_Object
staticprotected

Definition at line 59 of file Asf.php.

◆ $GETID3_ASF_Stream_Prioritization_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Stream_Prioritization_Object
staticprotected

Definition at line 79 of file Asf.php.

◆ $GETID3_ASF_Stream_Properties_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Stream_Properties_Object
staticprotected

Definition at line 72 of file Asf.php.

◆ $GETID3_ASF_Timecode_Index_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Timecode_Index_Object
staticprotected

Definition at line 47 of file Asf.php.

◆ $GETID3_ASF_Timecode_Index_Parameters_Object

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Timecode_Index_Parameters_Object
staticprotected

Definition at line 136 of file Asf.php.

◆ $GETID3_ASF_Video_Media

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Video_Media
staticprotected

Definition at line 73 of file Asf.php.

◆ $GETID3_ASF_Web_Stream_Format

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Web_Stream_Format
staticprotected

Definition at line 133 of file Asf.php.

◆ $GETID3_ASF_Web_Stream_Media_Subtype

GetId3\Module\AudioVideo\Asf::$GETID3_ASF_Web_Stream_Media_Subtype
staticprotected

Definition at line 58 of file Asf.php.


The documentation for this class was generated from the following file: