⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module.audio-video.asf.php

📁 一个用PHP编写的
💻 PHP
📖 第 1 页 / 共 5 页
字号:
									$ThisFileInfo['warning'][] = 'unknown frequency: "'.$AudioCodecFrequency.'" ('.$this->TrimConvert($thisfile_asf_codeclistobject_codecentries_current['description']).')';	//                                return false;									break;							}							if (!isset($thisfile_audio['channels'])) {								if (strstr($AudioCodecChannels, 'stereo')) {									$thisfile_audio['channels'] = 2;								} elseif (strstr($AudioCodecChannels, 'mono')) {									$thisfile_audio['channels'] = 1;								}							}						}					}					break;				case GETID3_ASF_Script_Command_Object:					// Script Command Object: (optional, one only)					// Field Name                   Field Type   Size (bits)					// Object ID                    GUID         128             // GUID for Script Command object - GETID3_ASF_Script_Command_Object					// Object Size                  QWORD        64              // size of Script Command object, including 44 bytes of Script Command Object header					// Reserved                     GUID         128             // hardcoded: 4B1ACBE3-100B-11D0-A39B-00A0C90348F6					// Commands Count               WORD         16              // number of Commands structures in the Script Commands Objects					// Command Types Count          WORD         16              // number of Command Types structures in the Script Commands Objects					// Command Types                array of:    variable        //					// * Command Type Name Length   WORD         16              // number of Unicode characters for Command Type Name					// * Command Type Name          WCHAR        variable        // array of Unicode characters - name of a type of command					// Commands                     array of:    variable        //					// * Presentation Time          DWORD        32              // presentation time of that command, in milliseconds					// * Type Index                 WORD         16              // type of this command, as a zero-based index into the array of Command Types of this object					// * Command Name Length        WORD         16              // number of Unicode characters for Command Name					// * Command Name               WCHAR        variable        // array of Unicode characters - name of this command					// shortcut					$thisfile_asf['script_command_object'] = array();					$thisfile_asf_scriptcommandobject      = &$thisfile_asf['script_command_object'];					$thisfile_asf_scriptcommandobject['objectid']             = $NextObjectGUID;					$thisfile_asf_scriptcommandobject['objectid_guid']        = $NextObjectGUIDtext;					$thisfile_asf_scriptcommandobject['objectsize']           = $NextObjectSize;					$thisfile_asf_scriptcommandobject['reserved']             = substr($ASFHeaderData, $offset, 16);					$offset += 16;					$thisfile_asf_scriptcommandobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']);					if ($thisfile_asf_scriptcommandobject['reserved'] != $this->GUIDtoBytestring('4B1ACBE3-100B-11D0-A39B-00A0C90348F6')) {						$ThisFileInfo['warning'][] = 'script_command_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_scriptcommandobject['reserved']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4B1ACBE3-100B-11D0-A39B-00A0C90348F6}';						//return false;						break;					}					$thisfile_asf_scriptcommandobject['commands_count']       = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));					$offset += 2;					$thisfile_asf_scriptcommandobject['command_types_count']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));					$offset += 2;					for ($CommandTypesCounter = 0; $CommandTypesCounter < $thisfile_asf_scriptcommandobject['command_types_count']; $CommandTypesCounter++) {						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character						$offset += 2;						$thisfile_asf_scriptcommandobject['command_types'][$CommandTypesCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);						$offset += $CommandTypeNameLength;					}					for ($CommandsCounter = 0; $CommandsCounter < $thisfile_asf_scriptcommandobject['commands_count']; $CommandsCounter++) {						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['presentation_time']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));						$offset += 4;						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['type_index']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));						$offset += 2;						$CommandTypeNameLength = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2)) * 2; // 2 bytes per character						$offset += 2;						$thisfile_asf_scriptcommandobject['commands'][$CommandsCounter]['name'] = substr($ASFHeaderData, $offset, $CommandTypeNameLength);						$offset += $CommandTypeNameLength;					}					break;				case GETID3_ASF_Marker_Object:					// Marker Object: (optional, one only)					// Field Name                   Field Type   Size (bits)					// Object ID                    GUID         128             // GUID for Marker object - GETID3_ASF_Marker_Object					// Object Size                  QWORD        64              // size of Marker object, including 48 bytes of Marker Object header					// Reserved                     GUID         128             // hardcoded: 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB					// Markers Count                DWORD        32              // number of Marker structures in Marker Object					// Reserved                     WORD         16              // hardcoded: 0x0000					// Name Length                  WORD         16              // number of bytes in the Name field					// Name                         WCHAR        variable        // name of the Marker Object					// Markers                      array of:    variable        //					// * Offset                     QWORD        64              // byte offset into Data Object					// * Presentation Time          QWORD        64              // in 100-nanosecond units					// * Entry Length               WORD         16              // length in bytes of (Send Time + Flags + Marker Description Length + Marker Description + Padding)					// * Send Time                  DWORD        32              // in milliseconds					// * Flags                      DWORD        32              // hardcoded: 0x00000000					// * Marker Description Length  DWORD        32              // number of bytes in Marker Description field					// * Marker Description         WCHAR        variable        // array of Unicode characters - description of marker entry					// * Padding                    BYTESTREAM   variable        // optional padding bytes					// shortcut					$thisfile_asf['marker_object'] = array();					$thisfile_asf_markerobject     = &$thisfile_asf['marker_object'];					$thisfile_asf_markerobject['objectid']             = $NextObjectGUID;					$thisfile_asf_markerobject['objectid_guid']        = $NextObjectGUIDtext;					$thisfile_asf_markerobject['objectsize']           = $NextObjectSize;					$thisfile_asf_markerobject['reserved']             = substr($ASFHeaderData, $offset, 16);					$offset += 16;					$thisfile_asf_markerobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_markerobject['reserved']);					if ($thisfile_asf_markerobject['reserved'] != $this->GUIDtoBytestring('4CFEDB20-75F6-11CF-9C0F-00A0C90349CB')) {						$ThisFileInfo['warning'][] = 'marker_object.reserved GUID {'.$this->BytestringToGUID($thisfile_asf_markerobject['reserved_1']).'} does not match expected "GETID3_ASF_Reserved_1" GUID {4CFEDB20-75F6-11CF-9C0F-00A0C90349CB}';						break;					}					$thisfile_asf_markerobject['markers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));					$offset += 4;					$thisfile_asf_markerobject['reserved_2'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));					$offset += 2;					if ($thisfile_asf_markerobject['reserved_2'] != 0) {						$ThisFileInfo['warning'][] = 'marker_object.reserved_2 ('.getid3_lib::PrintHexBytes($thisfile_asf_markerobject['reserved_2']).') does not match expected value of "0"';						break;					}					$thisfile_asf_markerobject['name_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));					$offset += 2;					$thisfile_asf_markerobject['name'] = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['name_length']);					$offset += $thisfile_asf_markerobject['name_length'];					for ($MarkersCounter = 0; $MarkersCounter < $thisfile_asf_markerobject['markers_count']; $MarkersCounter++) {						$thisfile_asf_markerobject['markers'][$MarkersCounter]['offset']  = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));						$offset += 8;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['presentation_time']         = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 8));						$offset += 8;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length']              = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));						$offset += 2;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['send_time']                 = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));						$offset += 4;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['flags']                     = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));						$offset += 4;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));						$offset += 4;						$thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description']        = substr($ASFHeaderData, $offset, $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length']);						$offset += $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];						$PaddingLength = $thisfile_asf_markerobject['markers'][$MarkersCounter]['entry_length'] - 4 -  4 - 4 - $thisfile_asf_markerobject['markers'][$MarkersCounter]['marker_description_length'];						if ($PaddingLength > 0) {							$thisfile_asf_markerobject['markers'][$MarkersCounter]['padding']               = substr($ASFHeaderData, $offset, $PaddingLength);							$offset += $PaddingLength;						}					}					break;				case GETID3_ASF_Bitrate_Mutual_Exclusion_Object:					// Bitrate Mutual Exclusion Object: (optional)					// Field Name                   Field Type   Size (bits)					// Object ID                    GUID         128             // GUID for Bitrate Mutual Exclusion object - GETID3_ASF_Bitrate_Mutual_Exclusion_Object					// Object Size                  QWORD        64              // size of Bitrate Mutual Exclusion object, including 42 bytes of Bitrate Mutual Exclusion Object header					// Exlusion Type                GUID         128             // nature of mutual exclusion relationship. one of: (GETID3_ASF_Mutex_Bitrate, GETID3_ASF_Mutex_Unknown)					// Stream Numbers Count         WORD         16              // number of video streams					// Stream Numbers               WORD         variable        // array of mutually exclusive video stream numbers. 1 <= valid <= 127					// shortcut					$thisfile_asf['bitrate_mutual_exclusion_object'] = array();					$thisfile_asf_bitratemutualexclusionobject       = &$thisfile_asf['bitrate_mutual_exclusion_object'];					$thisfile_asf_bitratemutualexclusionobject['objectid']             = $NextObjectGUID;					$thisfile_asf_bitratemutualexclusionobject['objectid_guid']        = $NextObjectGUIDtext;					$thisfile_asf_bitratemutualexclusionobject['objectsize']           = $NextObjectSize;					$thisfile_asf_bitratemutualexclusionobject['reserved']             = substr($ASFHeaderData, $offset, 16);					$thisfile_asf_bitratemutualexclusionobject['reserved_guid']        = $this->BytestringToGUID($thisfile_asf_bitratemutualexclusionobject['reserved']);					$offset += 16;					if (($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Bitrate) && ($thisfile_asf_bitratemutualexclusionobject['reserved'] != GETID3_ASF_Mutex_Unknown)) {						$ThisFileInfo['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).'}';						//return false;						break;					}					$thisfile_asf_bitratemutualexclusionobject['stream_numbers_count'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));					$offset += 2;					for ($StreamNumberCounter = 0; $StreamNumberCounter < $thisfile_asf_bitratemutualexclusionobject['stream_numbers_count']; $StreamNumberCounter++) {						$thisfile_asf_bitratemutualexclusionobject['stream_numbers'][$StreamNumberCounter] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 2));						$offset += 2;					}					break;				case GETID3_ASF_Error_Correction_Object:					// Error Correction Object: (optional, one only)					// Field Name                   Field Type   Size (bits)					// Object ID                    GUID         128             // GUID for Error Correction object - GETID3_ASF_Error_Correction_Object					// Object Size                  QWORD        64              // size of Error Correction object, including 44 bytes of Error Correction Object header					// Error Correction Type        GUID         128             // type of error correction. one of: (GETID3_ASF_No_Error_Correction, GETID3_ASF_Audio_Spread)					// Error Correction Data Length DWORD        32              // number of bytes in Error Correction Data field					// Error Correction Data        BYTESTREAM   variable        // structure depends on value of Error Correction Type field					// shortcut					$thisfile_asf['error_correction_object'] = array();					$thisfile_asf_errorcorrectionobject      = &$thisfile_asf['error_correction_object'];					$thisfile_asf_errorcorrectionobject['objectid']              = $NextObjectGUID;					$thisfile_asf_errorcorrectionobject['objectid_guid']         = $NextObjectGUIDtext;					$thisfile_asf_errorcorrectionobject['objectsize']            = $NextObjectSize;					$thisfile_asf_errorcorrectionobject['error_correction_type'] = substr($ASFHeaderData, $offset, 16);					$offset += 16;					$thisfile_asf_errorcorrectionobject['error_correction_guid'] = $this->BytestringToGUID($thisfile_asf_errorcorrectionobject['error_correction_type']);					$thisfile_asf_errorcorrectionobject['error_correction_data_length'] = getid3_lib::LittleEndian2Int(substr($ASFHeaderData, $offset, 4));					$offset += 4;					switch ($thisfile_asf_errorcorrectionobject['error_correction_type']) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -