Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../ID3
File: module.audio-video.asf.php
$offset += 2;
[500] Fix | Delete
for ($CommandTypesCounter = 0; $CommandTypesCounter < $thisfile_asf_scriptcommandobject['command_types_count']; $CommandTypesCounter++) {
[501] Fix | Delete
$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
[502] Fix | Delete
$offset += 2;
[503] Fix | Delete
$thisfile_asf_scriptcommandobject['command_types'][$CommandTypesCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
[504] Fix | Delete
$offset += $CommandTypeNameLength;
[505] Fix | Delete
}
[506] Fix | Delete
for ($CommandsCounter = 0; $CommandsCounter < $thisfile_asf_scriptcommandobject['commands_count']; $CommandsCounter++) {
[507] Fix | Delete
$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['presentation_time'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[508] Fix | Delete
$offset += 4;
[509] Fix | Delete
$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['type_index'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[510] Fix | Delete
$offset += 2;
[511] Fix | Delete
[512] Fix | Delete
$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character
[513] Fix | Delete
$offset += 2;
[514] Fix | Delete
$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);
[515] Fix | Delete
$offset += $CommandTypeNameLength;
[516] Fix | Delete
}
[517] Fix | Delete
break;
[518] Fix | Delete
[519] Fix | Delete
case GETID3_ASF_Marker_Object:
[520] Fix | Delete
// Marker Object: (optional, one only)
[521] Fix | Delete
// Field Name Field Type Size (bits)
[522] Fix | Delete
// Object ID GUID 128 // GUID for Marker object - GETID3_ASF_Marker_Object
[523] Fix | Delete
// Object Size QWORD 64 // size of Marker object, including 48 bytes of Marker Object header
[524] Fix | Delete
// Reserved GUID 128 // hardcoded: 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB
[525] Fix | Delete
// Markers Count DWORD 32 // number of Marker structures in Marker Object
[526] Fix | Delete
// Reserved WORD 16 // hardcoded: 0x0000
[527] Fix | Delete
// Name Length WORD 16 // number of bytes in the Name field
[528] Fix | Delete
// Name WCHAR variable // name of the Marker Object
[529] Fix | Delete
// Markers array of: variable //
[530] Fix | Delete
// * Offset QWORD 64 // byte offset into Data Object
[531] Fix | Delete
// * Presentation Time QWORD 64 // in 100-nanosecond units
[532] Fix | Delete
// * Entry Length WORD 16 // length in bytes of (Send Time + Flags + Marker Description Length + Marker Description + Padding)
[533] Fix | Delete
// * Send Time DWORD 32 // in milliseconds
[534] Fix | Delete
// * Flags DWORD 32 // hardcoded: 0x00000000
[535] Fix | Delete
// * Marker Description Length DWORD 32 // number of bytes in Marker Description field
[536] Fix | Delete
// * Marker Description WCHAR variable // array of Unicode characters - description of marker entry
[537] Fix | Delete
// * Padding BYTESTREAM variable // optional padding bytes
[538] Fix | Delete
[539] Fix | Delete
// shortcut
[540] Fix | Delete
$thisfile_asf['marker_object'] = array();
[541] Fix | Delete
$thisfile_asf_markerobject = &$thisfile_asf['marker_object'];
[542] Fix | Delete
[543] Fix | Delete
$thisfile_asf_markerobject['offset'] = $NextObjectOffset + $offset;
[544] Fix | Delete
$thisfile_asf_markerobject['objectid'] = $NextObjectGUID;
[545] Fix | Delete
$thisfile_asf_markerobject['objectid_guid'] = $NextObjectGUIDtext;
[546] Fix | Delete
$thisfile_asf_markerobject['objectsize'] = $NextObjectSize;
[547] Fix | Delete
$thisfile_asf_markerobject['reserved'] = substr($ASFHeaderData, $offset, 16);
[548] Fix | Delete
$offset += 16;
[549] Fix | Delete
$thisfile_asf_markerobject['reserved_guid'] = $this->BytestringToGUID($thisfile_asf_markerobject['reserved']);
[550] Fix | Delete
if ($thisfile_asf_markerobject['reserved'] != $this->GUIDtoBytestring('4CFEDB20-75F6-11CF-9C0F-00A0C90349CB')) {
[551] Fix | Delete
$this->warning('marker_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_markerobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4CFEDB20-75F6-11CF-9C0F-00A0C90349CB}');
[552] Fix | Delete
break;
[553] Fix | Delete
}
[554] Fix | Delete
$thisfile_asf_markerobject['markers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[555] Fix | Delete
$offset += 4;
[556] Fix | Delete
$thisfile_asf_markerobject['reserved_2'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[557] Fix | Delete
$offset += 2;
[558] Fix | Delete
if ($thisfile_asf_markerobject['reserved_2'] != 0) {
[559] Fix | Delete
$this->warning('marker_object.reserved_2 ('.$thisfile_asf_markerobject['reserved_2'].') does not match expected value of "0"');
[560] Fix | Delete
break;
[561] Fix | Delete
}
[562] Fix | Delete
$thisfile_asf_markerobject['name_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[563] Fix | Delete
$offset += 2;
[564] Fix | Delete
$thisfile_asf_markerobject['name'] = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['name_length']);
[565] Fix | Delete
$offset += $thisfile_asf_markerobject['name_length'];
[566] Fix | Delete
for ($MarkersCounter = 0; $MarkersCounter < $thisfile_asf_markerobject['markers_count']; $MarkersCounter++) {
[567] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['offset'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
[568] Fix | Delete
$offset += 8;
[569] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['presentation_time'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));
[570] Fix | Delete
$offset += 8;
[571] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[572] Fix | Delete
$offset += 2;
[573] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['send_time'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[574] Fix | Delete
$offset += 4;
[575] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['flags'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[576] Fix | Delete
$offset += 4;
[577] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[578] Fix | Delete
$offset += 4;
[579] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description'] = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length']);
[580] Fix | Delete
$offset += $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
[581] Fix | Delete
$PaddingLength = $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] - 4 - 4 - 4 - $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];
[582] Fix | Delete
if ($PaddingLength > 0) {
[583] Fix | Delete
$thisfile_asf_markerobject['markers'][$MarkersCounter]['padding'] = substr($ASFHeaderData, $offset, $PaddingLength);
[584] Fix | Delete
$offset += $PaddingLength;
[585] Fix | Delete
}
[586] Fix | Delete
}
[587] Fix | Delete
break;
[588] Fix | Delete
[589] Fix | Delete
case GETID3_ASF_Bitrate_Mutual_Exclusion_Object:
[590] Fix | Delete
// Bitrate Mutual Exclusion Object: (optional)
[591] Fix | Delete
// Field Name Field Type Size (bits)
[592] Fix | Delete
// Object ID GUID 128 // GUID for Bitrate Mutual Exclusion object - GETID3_ASF_Bitrate_Mutual_Exclusion_Object
[593] Fix | Delete
// Object Size QWORD 64 // size of Bitrate Mutual Exclusion object, including 42 bytes of Bitrate Mutual Exclusion Object header
[594] Fix | Delete
// Exlusion Type GUID 128 // nature of mutual exclusion relationship. one of: (GETID3_ASF_Mutex_Bitrate, GETID3_ASF_Mutex_Unknown)
[595] Fix | Delete
// Stream Numbers Count WORD 16 // number of video streams
[596] Fix | Delete
// Stream Numbers WORD variable // array of mutually exclusive video stream numbers. 1 <= valid <= 127
[597] Fix | Delete
[598] Fix | Delete
// shortcut
[599] Fix | Delete
$thisfile_asf['bitrate_mutual_exclusion_object'] = array();
[600] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject = &$thisfile_asf['bitrate_mutual_exclusion_object'];
[601] Fix | Delete
[602] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['offset'] = $NextObjectOffset + $offset;
[603] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['objectid'] = $NextObjectGUID;
[604] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['objectid_guid'] = $NextObjectGUIDtext;
[605] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['objectsize'] = $NextObjectSize;
[606] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['reserved'] = substr($ASFHeaderData, $offset, 16);
[607] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['reserved_guid'] = $this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']);
[608] Fix | Delete
$offset += 16;
[609] Fix | Delete
if (($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Bitrate) && ($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Unknown)) {
[610] Fix | Delete
$this->warning('bitrate_mutual_exclusion_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']).'} does not match expected "GETID3_ASF_Mutex_Bitrate" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Bitrate).'} or "GETID3_ASF_Mutex_Unknown" GUID {'.$this->BytestringToGUID(GETID3_ASF_Mutex_Unknown).'}');
[611] Fix | Delete
//return false;
[612] Fix | Delete
break;
[613] Fix | Delete
}
[614] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[615] Fix | Delete
$offset += 2;
[616] Fix | Delete
for ($StreamNumberCounter = 0; $StreamNumberCounter < $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count']; $StreamNumberCounter++) {
[617] Fix | Delete
$thisfile_asf_bitratemutualexclusionobject['stream_numbers'][$StreamNumberCounter] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[618] Fix | Delete
$offset += 2;
[619] Fix | Delete
}
[620] Fix | Delete
break;
[621] Fix | Delete
[622] Fix | Delete
case GETID3_ASF_Error_Correction_Object:
[623] Fix | Delete
// Error Correction Object: (optional, one only)
[624] Fix | Delete
// Field Name Field Type Size (bits)
[625] Fix | Delete
// Object ID GUID 128 // GUID for Error Correction object - GETID3_ASF_Error_Correction_Object
[626] Fix | Delete
// Object Size QWORD 64 // size of Error Correction object, including 44 bytes of Error Correction Object header
[627] Fix | Delete
// Error Correction Type GUID 128 // type of error correction. one of: (GETID3_ASF_No_Error_Correction, GETID3_ASF_Audio_Spread)
[628] Fix | Delete
// Error Correction Data Length DWORD 32 // number of bytes in Error Correction Data field
[629] Fix | Delete
// Error Correction Data BYTESTREAM variable // structure depends on value of Error Correction Type field
[630] Fix | Delete
[631] Fix | Delete
// shortcut
[632] Fix | Delete
$thisfile_asf['error_correction_object'] = array();
[633] Fix | Delete
$thisfile_asf_errorcorrectionobject = &$thisfile_asf['error_correction_object'];
[634] Fix | Delete
[635] Fix | Delete
$thisfile_asf_errorcorrectionobject['offset'] = $NextObjectOffset + $offset;
[636] Fix | Delete
$thisfile_asf_errorcorrectionobject['objectid'] = $NextObjectGUID;
[637] Fix | Delete
$thisfile_asf_errorcorrectionobject['objectid_guid'] = $NextObjectGUIDtext;
[638] Fix | Delete
$thisfile_asf_errorcorrectionobject['objectsize'] = $NextObjectSize;
[639] Fix | Delete
$thisfile_asf_errorcorrectionobject['error_correction_type'] = substr($ASFHeaderData, $offset, 16);
[640] Fix | Delete
$offset += 16;
[641] Fix | Delete
$thisfile_asf_errorcorrectionobject['error_correction_guid'] = $this->BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']);
[642] Fix | Delete
$thisfile_asf_errorcorrectionobject['error_correction_data_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[643] Fix | Delete
$offset += 4;
[644] Fix | Delete
switch ($thisfile_asf_errorcorrectionobject['error_correction_type']) {
[645] Fix | Delete
case GETID3_ASF_No_Error_Correction:
[646] Fix | Delete
// should be no data, but just in case there is, skip to the end of the field
[647] Fix | Delete
$offset += $thisfile_asf_errorcorrectionobject['error_correction_data_length'];
[648] Fix | Delete
break;
[649] Fix | Delete
[650] Fix | Delete
case GETID3_ASF_Audio_Spread:
[651] Fix | Delete
// Field Name Field Type Size (bits)
[652] Fix | Delete
// Span BYTE 8 // number of packets over which audio will be spread.
[653] Fix | Delete
// Virtual Packet Length WORD 16 // size of largest audio payload found in audio stream
[654] Fix | Delete
// Virtual Chunk Length WORD 16 // size of largest audio payload found in audio stream
[655] Fix | Delete
// Silence Data Length WORD 16 // number of bytes in Silence Data field
[656] Fix | Delete
// Silence Data BYTESTREAM variable // hardcoded: 0x00 * (Silence Data Length) bytes
[657] Fix | Delete
[658] Fix | Delete
$thisfile_asf_errorcorrectionobject['span'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 1));
[659] Fix | Delete
$offset += 1;
[660] Fix | Delete
$thisfile_asf_errorcorrectionobject['virtual_packet_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[661] Fix | Delete
$offset += 2;
[662] Fix | Delete
$thisfile_asf_errorcorrectionobject['virtual_chunk_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[663] Fix | Delete
$offset += 2;
[664] Fix | Delete
$thisfile_asf_errorcorrectionobject['silence_data_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[665] Fix | Delete
$offset += 2;
[666] Fix | Delete
$thisfile_asf_errorcorrectionobject['silence_data'] = substr($ASFHeaderData, $offset, $thisfile_asf_errorcorrectionobject['silence_data_length']);
[667] Fix | Delete
$offset += $thisfile_asf_errorcorrectionobject['silence_data_length'];
[668] Fix | Delete
break;
[669] Fix | Delete
[670] Fix | Delete
default:
[671] Fix | Delete
$this->warning('error_correction_object.error_correction_type GUID {'.$this->BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']).'} does not match expected "GETID3_ASF_No_Error_Correction" GUID {'.$this->BytestringToGUID(GETID3_ASF_No_Error_Correction).'} or "GETID3_ASF_Audio_Spread" GUID {'.$this->BytestringToGUID(GETID3_ASF_Audio_Spread).'}');
[672] Fix | Delete
//return false;
[673] Fix | Delete
break;
[674] Fix | Delete
}
[675] Fix | Delete
[676] Fix | Delete
break;
[677] Fix | Delete
[678] Fix | Delete
case GETID3_ASF_Content_Description_Object:
[679] Fix | Delete
// Content Description Object: (optional, one only)
[680] Fix | Delete
// Field Name Field Type Size (bits)
[681] Fix | Delete
// Object ID GUID 128 // GUID for Content Description object - GETID3_ASF_Content_Description_Object
[682] Fix | Delete
// Object Size QWORD 64 // size of Content Description object, including 34 bytes of Content Description Object header
[683] Fix | Delete
// Title Length WORD 16 // number of bytes in Title field
[684] Fix | Delete
// Author Length WORD 16 // number of bytes in Author field
[685] Fix | Delete
// Copyright Length WORD 16 // number of bytes in Copyright field
[686] Fix | Delete
// Description Length WORD 16 // number of bytes in Description field
[687] Fix | Delete
// Rating Length WORD 16 // number of bytes in Rating field
[688] Fix | Delete
// Title WCHAR 16 // array of Unicode characters - Title
[689] Fix | Delete
// Author WCHAR 16 // array of Unicode characters - Author
[690] Fix | Delete
// Copyright WCHAR 16 // array of Unicode characters - Copyright
[691] Fix | Delete
// Description WCHAR 16 // array of Unicode characters - Description
[692] Fix | Delete
// Rating WCHAR 16 // array of Unicode characters - Rating
[693] Fix | Delete
[694] Fix | Delete
// shortcut
[695] Fix | Delete
$thisfile_asf['content_description_object'] = array();
[696] Fix | Delete
$thisfile_asf_contentdescriptionobject = &$thisfile_asf['content_description_object'];
[697] Fix | Delete
[698] Fix | Delete
$thisfile_asf_contentdescriptionobject['offset'] = $NextObjectOffset + $offset;
[699] Fix | Delete
$thisfile_asf_contentdescriptionobject['objectid'] = $NextObjectGUID;
[700] Fix | Delete
$thisfile_asf_contentdescriptionobject['objectid_guid'] = $NextObjectGUIDtext;
[701] Fix | Delete
$thisfile_asf_contentdescriptionobject['objectsize'] = $NextObjectSize;
[702] Fix | Delete
$thisfile_asf_contentdescriptionobject['title_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[703] Fix | Delete
$offset += 2;
[704] Fix | Delete
$thisfile_asf_contentdescriptionobject['author_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[705] Fix | Delete
$offset += 2;
[706] Fix | Delete
$thisfile_asf_contentdescriptionobject['copyright_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[707] Fix | Delete
$offset += 2;
[708] Fix | Delete
$thisfile_asf_contentdescriptionobject['description_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[709] Fix | Delete
$offset += 2;
[710] Fix | Delete
$thisfile_asf_contentdescriptionobject['rating_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[711] Fix | Delete
$offset += 2;
[712] Fix | Delete
$thisfile_asf_contentdescriptionobject['title'] = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['title_length']);
[713] Fix | Delete
$offset += $thisfile_asf_contentdescriptionobject['title_length'];
[714] Fix | Delete
$thisfile_asf_contentdescriptionobject['author'] = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['author_length']);
[715] Fix | Delete
$offset += $thisfile_asf_contentdescriptionobject['author_length'];
[716] Fix | Delete
$thisfile_asf_contentdescriptionobject['copyright'] = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['copyright_length']);
[717] Fix | Delete
$offset += $thisfile_asf_contentdescriptionobject['copyright_length'];
[718] Fix | Delete
$thisfile_asf_contentdescriptionobject['description'] = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['description_length']);
[719] Fix | Delete
$offset += $thisfile_asf_contentdescriptionobject['description_length'];
[720] Fix | Delete
$thisfile_asf_contentdescriptionobject['rating'] = substr($ASFHeaderData, $offset, $thisfile_asf_contentdescriptionobject['rating_length']);
[721] Fix | Delete
$offset += $thisfile_asf_contentdescriptionobject['rating_length'];
[722] Fix | Delete
[723] Fix | Delete
$ASFcommentKeysToCopy = array('title'=>'title', 'author'=>'artist', 'copyright'=>'copyright', 'description'=>'comment', 'rating'=>'rating');
[724] Fix | Delete
foreach ($ASFcommentKeysToCopy as $keytocopyfrom => $keytocopyto) {
[725] Fix | Delete
if (!empty($thisfile_asf_contentdescriptionobject[$keytocopyfrom])) {
[726] Fix | Delete
$thisfile_asf_comments[$keytocopyto][] = $this->TrimTerm($thisfile_asf_contentdescriptionobject[$keytocopyfrom]);
[727] Fix | Delete
}
[728] Fix | Delete
}
[729] Fix | Delete
break;
[730] Fix | Delete
[731] Fix | Delete
case GETID3_ASF_Extended_Content_Description_Object:
[732] Fix | Delete
// Extended Content Description Object: (optional, one only)
[733] Fix | Delete
// Field Name Field Type Size (bits)
[734] Fix | Delete
// Object ID GUID 128 // GUID for Extended Content Description object - GETID3_ASF_Extended_Content_Description_Object
[735] Fix | Delete
// Object Size QWORD 64 // size of ExtendedContent Description object, including 26 bytes of Extended Content Description Object header
[736] Fix | Delete
// Content Descriptors Count WORD 16 // number of entries in Content Descriptors list
[737] Fix | Delete
// Content Descriptors array of: variable //
[738] Fix | Delete
// * Descriptor Name Length WORD 16 // size in bytes of Descriptor Name field
[739] Fix | Delete
// * Descriptor Name WCHAR variable // array of Unicode characters - Descriptor Name
[740] Fix | Delete
// * Descriptor Value Data Type WORD 16 // Lookup array:
[741] Fix | Delete
// 0x0000 = Unicode String (variable length)
[742] Fix | Delete
// 0x0001 = BYTE array (variable length)
[743] Fix | Delete
// 0x0002 = BOOL (DWORD, 32 bits)
[744] Fix | Delete
// 0x0003 = DWORD (DWORD, 32 bits)
[745] Fix | Delete
// 0x0004 = QWORD (QWORD, 64 bits)
[746] Fix | Delete
// 0x0005 = WORD (WORD, 16 bits)
[747] Fix | Delete
// * Descriptor Value Length WORD 16 // number of bytes stored in Descriptor Value field
[748] Fix | Delete
// * Descriptor Value variable variable // value for Content Descriptor
[749] Fix | Delete
[750] Fix | Delete
// shortcut
[751] Fix | Delete
$thisfile_asf['extended_content_description_object'] = array();
[752] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject = &$thisfile_asf['extended_content_description_object'];
[753] Fix | Delete
[754] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['offset'] = $NextObjectOffset + $offset;
[755] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['objectid'] = $NextObjectGUID;
[756] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['objectid_guid'] = $NextObjectGUIDtext;
[757] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['objectsize'] = $NextObjectSize;
[758] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[759] Fix | Delete
$offset += 2;
[760] Fix | Delete
for ($ExtendedContentDescriptorsCounter = 0; $ExtendedContentDescriptorsCounter < $thisfile_asf_extendedcontentdescriptionobject['content_descriptors_count']; $ExtendedContentDescriptorsCounter++) {
[761] Fix | Delete
// shortcut
[762] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter] = array();
[763] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current = &$thisfile_asf_extendedcontentdescriptionobject['content_descriptors'][$ExtendedContentDescriptorsCounter];
[764] Fix | Delete
[765] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['base_offset'] = $offset + 30;
[766] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[767] Fix | Delete
$offset += 2;
[768] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'] = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length']);
[769] Fix | Delete
$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name_length'];
[770] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[771] Fix | Delete
$offset += 2;
[772] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[773] Fix | Delete
$offset += 2;
[774] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = substr($ASFHeaderData, $offset, $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length']);
[775] Fix | Delete
$offset += $thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'];
[776] Fix | Delete
switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
[777] Fix | Delete
case 0x0000: // Unicode string
[778] Fix | Delete
break;
[779] Fix | Delete
[780] Fix | Delete
case 0x0001: // BYTE array
[781] Fix | Delete
// do nothing
[782] Fix | Delete
break;
[783] Fix | Delete
[784] Fix | Delete
case 0x0002: // BOOL
[785] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = (bool) getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[786] Fix | Delete
break;
[787] Fix | Delete
[788] Fix | Delete
case 0x0003: // DWORD
[789] Fix | Delete
case 0x0004: // QWORD
[790] Fix | Delete
case 0x0005: // WORD
[791] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = getid3_lib::LittleEndian2Int($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[792] Fix | Delete
break;
[793] Fix | Delete
[794] Fix | Delete
default:
[795] Fix | Delete
$this->warning('extended_content_description.content_descriptors.'.$ExtendedContentDescriptorsCounter.'.value_type is invalid ('.$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type'].')');
[796] Fix | Delete
//return false;
[797] Fix | Delete
break;
[798] Fix | Delete
}
[799] Fix | Delete
switch ($this->TrimConvert(strtolower($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']))) {
[800] Fix | Delete
[801] Fix | Delete
case 'wm/albumartist':
[802] Fix | Delete
case 'artist':
[803] Fix | Delete
// Note: not 'artist', that comes from 'author' tag
[804] Fix | Delete
$thisfile_asf_comments['albumartist'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[805] Fix | Delete
break;
[806] Fix | Delete
[807] Fix | Delete
case 'wm/albumtitle':
[808] Fix | Delete
case 'album':
[809] Fix | Delete
$thisfile_asf_comments['album'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[810] Fix | Delete
break;
[811] Fix | Delete
[812] Fix | Delete
case 'wm/genre':
[813] Fix | Delete
case 'genre':
[814] Fix | Delete
$thisfile_asf_comments['genre'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[815] Fix | Delete
break;
[816] Fix | Delete
[817] Fix | Delete
case 'wm/partofset':
[818] Fix | Delete
$thisfile_asf_comments['partofset'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[819] Fix | Delete
break;
[820] Fix | Delete
[821] Fix | Delete
case 'wm/tracknumber':
[822] Fix | Delete
case 'tracknumber':
[823] Fix | Delete
// be careful casting to int: casting unicode strings to int gives unexpected results (stops parsing at first non-numeric character)
[824] Fix | Delete
$thisfile_asf_comments['track_number'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[825] Fix | Delete
foreach ($thisfile_asf_comments['track_number'] as $key => $value) {
[826] Fix | Delete
if (preg_match('/^[0-9\x00]+$/', $value)) {
[827] Fix | Delete
$thisfile_asf_comments['track_number'][$key] = intval(str_replace("\x00", '', $value));
[828] Fix | Delete
}
[829] Fix | Delete
}
[830] Fix | Delete
break;
[831] Fix | Delete
[832] Fix | Delete
case 'wm/track':
[833] Fix | Delete
if (empty($thisfile_asf_comments['track_number'])) {
[834] Fix | Delete
$thisfile_asf_comments['track_number'] = array(1 + (int) $this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[835] Fix | Delete
}
[836] Fix | Delete
break;
[837] Fix | Delete
[838] Fix | Delete
case 'wm/year':
[839] Fix | Delete
case 'year':
[840] Fix | Delete
case 'date':
[841] Fix | Delete
$thisfile_asf_comments['year'] = array( $this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[842] Fix | Delete
break;
[843] Fix | Delete
[844] Fix | Delete
case 'wm/lyrics':
[845] Fix | Delete
case 'lyrics':
[846] Fix | Delete
$thisfile_asf_comments['lyrics'] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[847] Fix | Delete
break;
[848] Fix | Delete
[849] Fix | Delete
case 'isvbr':
[850] Fix | Delete
if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']) {
[851] Fix | Delete
$thisfile_audio['bitrate_mode'] = 'vbr';
[852] Fix | Delete
$thisfile_video['bitrate_mode'] = 'vbr';
[853] Fix | Delete
}
[854] Fix | Delete
break;
[855] Fix | Delete
[856] Fix | Delete
case 'id3':
[857] Fix | Delete
$this->getid3->include_module('tag.id3v2');
[858] Fix | Delete
[859] Fix | Delete
$getid3_id3v2 = new getid3_id3v2($this->getid3);
[860] Fix | Delete
$getid3_id3v2->AnalyzeString($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[861] Fix | Delete
unset($getid3_id3v2);
[862] Fix | Delete
[863] Fix | Delete
if ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_length'] > 1024) {
[864] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'] = '<value too large to display>';
[865] Fix | Delete
}
[866] Fix | Delete
break;
[867] Fix | Delete
[868] Fix | Delete
case 'wm/encodingtime':
[869] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix'] = $this->FILETIMEtoUNIXtime($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[870] Fix | Delete
$thisfile_asf_comments['encoding_time_unix'] = array($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['encoding_time_unix']);
[871] Fix | Delete
break;
[872] Fix | Delete
[873] Fix | Delete
case 'wm/picture':
[874] Fix | Delete
$WMpicture = $this->ASF_WMpicture($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[875] Fix | Delete
foreach ($WMpicture as $key => $value) {
[876] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current[$key] = $value;
[877] Fix | Delete
}
[878] Fix | Delete
unset($WMpicture);
[879] Fix | Delete
/*
[880] Fix | Delete
$wm_picture_offset = 0;
[881] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 1));
[882] Fix | Delete
$wm_picture_offset += 1;
[883] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type'] = self::WMpictureTypeLookup($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_type_id']);
[884] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_size'] = getid3_lib::LittleEndian2Int(substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 4));
[885] Fix | Delete
$wm_picture_offset += 4;
[886] Fix | Delete
[887] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
[888] Fix | Delete
do {
[889] Fix | Delete
$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
[890] Fix | Delete
$wm_picture_offset += 2;
[891] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] .= $next_byte_pair;
[892] Fix | Delete
} while ($next_byte_pair !== "\x00\x00");
[893] Fix | Delete
[894] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] = '';
[895] Fix | Delete
do {
[896] Fix | Delete
$next_byte_pair = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset, 2);
[897] Fix | Delete
$wm_picture_offset += 2;
[898] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_description'] .= $next_byte_pair;
[899] Fix | Delete
} while ($next_byte_pair !== "\x00\x00");
[900] Fix | Delete
[901] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['dataoffset'] = $wm_picture_offset;
[902] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'] = substr($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value'], $wm_picture_offset);
[903] Fix | Delete
unset($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']);
[904] Fix | Delete
[905] Fix | Delete
$imageinfo = array();
[906] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = '';
[907] Fix | Delete
$imagechunkcheck = getid3_lib::GetDataImageSize($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], $imageinfo);
[908] Fix | Delete
unset($imageinfo);
[909] Fix | Delete
if (!empty($imagechunkcheck)) {
[910] Fix | Delete
$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime'] = image_type_to_mime_type($imagechunkcheck[2]);
[911] Fix | Delete
}
[912] Fix | Delete
if (!isset($thisfile_asf_comments['picture'])) {
[913] Fix | Delete
$thisfile_asf_comments['picture'] = array();
[914] Fix | Delete
}
[915] Fix | Delete
$thisfile_asf_comments['picture'][] = array('data'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['data'], 'image_mime'=>$thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['image_mime']);
[916] Fix | Delete
*/
[917] Fix | Delete
break;
[918] Fix | Delete
[919] Fix | Delete
default:
[920] Fix | Delete
switch ($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value_type']) {
[921] Fix | Delete
case 0: // Unicode string
[922] Fix | Delete
if (substr($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name']), 0, 3) == 'WM/') {
[923] Fix | Delete
$thisfile_asf_comments[str_replace('wm/', '', strtolower($this->TrimConvert($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['name'])))] = array($this->TrimTerm($thisfile_asf_extendedcontentdescriptionobject_contentdescriptor_current['value']));
[924] Fix | Delete
}
[925] Fix | Delete
break;
[926] Fix | Delete
[927] Fix | Delete
case 1:
[928] Fix | Delete
break;
[929] Fix | Delete
}
[930] Fix | Delete
break;
[931] Fix | Delete
}
[932] Fix | Delete
[933] Fix | Delete
}
[934] Fix | Delete
break;
[935] Fix | Delete
[936] Fix | Delete
case GETID3_ASF_Stream_Bitrate_Properties_Object:
[937] Fix | Delete
// Stream Bitrate Properties Object: (optional, one only)
[938] Fix | Delete
// Field Name Field Type Size (bits)
[939] Fix | Delete
// Object ID GUID 128 // GUID for Stream Bitrate Properties object - GETID3_ASF_Stream_Bitrate_Properties_Object
[940] Fix | Delete
// Object Size QWORD 64 // size of Extended Content Description object, including 26 bytes of Stream Bitrate Properties Object header
[941] Fix | Delete
// Bitrate Records Count WORD 16 // number of records in Bitrate Records
[942] Fix | Delete
// Bitrate Records array of: variable //
[943] Fix | Delete
// * Flags WORD 16 //
[944] Fix | Delete
// * * Stream Number bits 7 (0x007F) // number of this stream
[945] Fix | Delete
// * * Reserved bits 9 (0xFF80) // hardcoded: 0
[946] Fix | Delete
// * Average Bitrate DWORD 32 // in bits per second
[947] Fix | Delete
[948] Fix | Delete
// shortcut
[949] Fix | Delete
$thisfile_asf['stream_bitrate_properties_object'] = array();
[950] Fix | Delete
$thisfile_asf_streambitratepropertiesobject = &$thisfile_asf['stream_bitrate_properties_object'];
[951] Fix | Delete
[952] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['offset'] = $NextObjectOffset + $offset;
[953] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['objectid'] = $NextObjectGUID;
[954] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['objectid_guid'] = $NextObjectGUIDtext;
[955] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['objectsize'] = $NextObjectSize;
[956] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['bitrate_records_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[957] Fix | Delete
$offset += 2;
[958] Fix | Delete
for ($BitrateRecordsCounter = 0; $BitrateRecordsCounter < $thisfile_asf_streambitratepropertiesobject['bitrate_records_count']; $BitrateRecordsCounter++) {
[959] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));
[960] Fix | Delete
$offset += 2;
[961] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags']['stream_number'] = $thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['flags_raw'] & 0x007F;
[962] Fix | Delete
$thisfile_asf_streambitratepropertiesobject['bitrate_records'][$BitrateRecordsCounter]['bitrate'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));
[963] Fix | Delete
$offset += 4;
[964] Fix | Delete
}
[965] Fix | Delete
break;
[966] Fix | Delete
[967] Fix | Delete
case GETID3_ASF_Padding_Object:
[968] Fix | Delete
// Padding Object: (optional)
[969] Fix | Delete
// Field Name Field Type Size (bits)
[970] Fix | Delete
// Object ID GUID 128 // GUID for Padding object - GETID3_ASF_Padding_Object
[971] Fix | Delete
// Object Size QWORD 64 // size of Padding object, including 24 bytes of ASF Padding Object header
[972] Fix | Delete
// Padding Data BYTESTREAM variable // ignore
[973] Fix | Delete
[974] Fix | Delete
// shortcut
[975] Fix | Delete
$thisfile_asf['padding_object'] = array();
[976] Fix | Delete
$thisfile_asf_paddingobject = &$thisfile_asf['padding_object'];
[977] Fix | Delete
[978] Fix | Delete
$thisfile_asf_paddingobject['offset'] = $NextObjectOffset + $offset;
[979] Fix | Delete
$thisfile_asf_paddingobject['objectid'] = $NextObjectGUID;
[980] Fix | Delete
$thisfile_asf_paddingobject['objectid_guid'] = $NextObjectGUIDtext;
[981] Fix | Delete
$thisfile_asf_paddingobject['objectsize'] = $NextObjectSize;
[982] Fix | Delete
$thisfile_asf_paddingobject['padding_length'] = $thisfile_asf_paddingobject['objectsize'] - 16 - 8;
[983] Fix | Delete
$thisfile_asf_paddingobject['padding'] = substr($ASFHeaderData, $offset, $thisfile_asf_paddingobject['padding_length']);
[984] Fix | Delete
$offset += ($NextObjectSize - 16 - 8);
[985] Fix | Delete
break;
[986] Fix | Delete
[987] Fix | Delete
case GETID3_ASF_Extended_Content_Encryption_Object:
[988] Fix | Delete
case GETID3_ASF_Content_Encryption_Object:
[989] Fix | Delete
// WMA DRM - just ignore
[990] Fix | Delete
$offset += ($NextObjectSize - 16 - 8);
[991] Fix | Delete
break;
[992] Fix | Delete
[993] Fix | Delete
default:
[994] Fix | Delete
// Implementations shall ignore any standard or non-standard object that they do not know how to handle.
[995] Fix | Delete
if ($this->GUIDname($NextObjectGUIDtext)) {
[996] Fix | Delete
$this->warning('unhandled GUID "'.$this->GUIDname($NextObjectGUIDtext).'" {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8));
[997] Fix | Delete
} else {
[998] Fix | Delete
$this->warning('unknown GUID {'.$NextObjectGUIDtext.'} in ASF header at offset '.($offset - 16 - 8));
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function