| @@ 1099-1108 (lines=10) @@ | ||
| 1096 | ||
| 1097 | ||
| 1098 | ||
| 1099 | public static function RGADnameLookup($namecode) { |
|
| 1100 | static $RGADname = array(); |
|
| 1101 | if (empty($RGADname)) { |
|
| 1102 | $RGADname[0] = 'not set'; |
|
| 1103 | $RGADname[1] = 'Track Gain Adjustment'; |
|
| 1104 | $RGADname[2] = 'Album Gain Adjustment'; |
|
| 1105 | } |
|
| 1106 | ||
| 1107 | return (isset($RGADname[$namecode]) ? $RGADname[$namecode] : ''); |
|
| 1108 | } |
|
| 1109 | ||
| 1110 | ||
| 1111 | public static function RGADoriginatorLookup($originatorcode) { |
|
| @@ 1111-1121 (lines=11) @@ | ||
| 1108 | } |
|
| 1109 | ||
| 1110 | ||
| 1111 | public static function RGADoriginatorLookup($originatorcode) { |
|
| 1112 | static $RGADoriginator = array(); |
|
| 1113 | if (empty($RGADoriginator)) { |
|
| 1114 | $RGADoriginator[0] = 'unspecified'; |
|
| 1115 | $RGADoriginator[1] = 'pre-set by artist/producer/mastering engineer'; |
|
| 1116 | $RGADoriginator[2] = 'set by user'; |
|
| 1117 | $RGADoriginator[3] = 'determined automatically'; |
|
| 1118 | } |
|
| 1119 | ||
| 1120 | return (isset($RGADoriginator[$originatorcode]) ? $RGADoriginator[$originatorcode] : ''); |
|
| 1121 | } |
|
| 1122 | ||
| 1123 | ||
| 1124 | public static function RGADadjustmentLookup($rawadjustment, $signbit) { |
|
| @@ 1575-1583 (lines=9) @@ | ||
| 1572 | return array_search($GUIDstring, $GUIDarray); |
|
| 1573 | } |
|
| 1574 | ||
| 1575 | public static function ASFIndexObjectIndexTypeLookup($id) { |
|
| 1576 | static $ASFIndexObjectIndexTypeLookup = array(); |
|
| 1577 | if (empty($ASFIndexObjectIndexTypeLookup)) { |
|
| 1578 | $ASFIndexObjectIndexTypeLookup[1] = 'Nearest Past Data Packet'; |
|
| 1579 | $ASFIndexObjectIndexTypeLookup[2] = 'Nearest Past Media Object'; |
|
| 1580 | $ASFIndexObjectIndexTypeLookup[3] = 'Nearest Past Cleanpoint'; |
|
| 1581 | } |
|
| 1582 | return (isset($ASFIndexObjectIndexTypeLookup[$id]) ? $ASFIndexObjectIndexTypeLookup[$id] : 'invalid'); |
|
| 1583 | } |
|
| 1584 | ||
| 1585 | public static function GUIDtoBytestring($GUIDstring) { |
|
| 1586 | // Microsoft defines these 16-byte (128-bit) GUIDs in the strangest way: |
|
| @@ 1474-1484 (lines=11) @@ | ||
| 1471 | return (isset($TargetTypeValue[$target_type]) ? $TargetTypeValue[$target_type] : $target_type); |
|
| 1472 | } |
|
| 1473 | ||
| 1474 | public static function BlockLacingType($lacingtype) { |
|
| 1475 | // http://matroska.org/technical/specs/index.html#block_structure |
|
| 1476 | static $BlockLacingType = array(); |
|
| 1477 | if (empty($BlockLacingType)) { |
|
| 1478 | $BlockLacingType[0x00] = 'no lacing'; |
|
| 1479 | $BlockLacingType[0x01] = 'Xiph lacing'; |
|
| 1480 | $BlockLacingType[0x02] = 'fixed-size lacing'; |
|
| 1481 | $BlockLacingType[0x03] = 'EBML lacing'; |
|
| 1482 | } |
|
| 1483 | return (isset($BlockLacingType[$lacingtype]) ? $BlockLacingType[$lacingtype] : $lacingtype); |
|
| 1484 | } |
|
| 1485 | ||
| 1486 | public static function CodecIDtoCommonName($codecid) { |
|
| 1487 | // http://www.matroska.org/technical/specs/codecid/index.html |
|
| @@ 1884-1892 (lines=9) @@ | ||
| 1881 | } |
|
| 1882 | ||
| 1883 | ||
| 1884 | public function QuicktimeContentRatingLookup($rtng) { |
|
| 1885 | static $QuicktimeContentRatingLookup = array(); |
|
| 1886 | if (empty($QuicktimeContentRatingLookup)) { |
|
| 1887 | $QuicktimeContentRatingLookup[0] = 'None'; |
|
| 1888 | $QuicktimeContentRatingLookup[2] = 'Clean'; |
|
| 1889 | $QuicktimeContentRatingLookup[4] = 'Explicit'; |
|
| 1890 | } |
|
| 1891 | return (isset($QuicktimeContentRatingLookup[$rtng]) ? $QuicktimeContentRatingLookup[$rtng] : 'invalid'); |
|
| 1892 | } |
|
| 1893 | ||
| 1894 | public function QuicktimeStoreAccountTypeLookup($akid) { |
|
| 1895 | static $QuicktimeStoreAccountTypeLookup = array(); |
|
| @@ 767-775 (lines=9) @@ | ||
| 764 | return true; |
|
| 765 | } |
|
| 766 | ||
| 767 | public static function SpeexBandModeLookup($mode) { |
|
| 768 | static $SpeexBandModeLookup = array(); |
|
| 769 | if (empty($SpeexBandModeLookup)) { |
|
| 770 | $SpeexBandModeLookup[0] = 'narrow'; |
|
| 771 | $SpeexBandModeLookup[1] = 'wide'; |
|
| 772 | $SpeexBandModeLookup[2] = 'ultra-wide'; |
|
| 773 | } |
|
| 774 | return (isset($SpeexBandModeLookup[$mode]) ? $SpeexBandModeLookup[$mode] : null); |
|
| 775 | } |
|
| 776 | ||
| 777 | ||
| 778 | public static function OggPageSegmentLength($OggInfoArray, $SegmentNumber=1) { |
|
| @@ 815-825 (lines=11) @@ | ||
| 812 | return round($qval, 1); // 5 or 4.9 |
|
| 813 | } |
|
| 814 | ||
| 815 | public static function TheoraColorSpace($colorspace_id) { |
|
| 816 | // http://www.theora.org/doc/Theora.pdf (table 6.3) |
|
| 817 | static $TheoraColorSpaceLookup = array(); |
|
| 818 | if (empty($TheoraColorSpaceLookup)) { |
|
| 819 | $TheoraColorSpaceLookup[0] = 'Undefined'; |
|
| 820 | $TheoraColorSpaceLookup[1] = 'Rec. 470M'; |
|
| 821 | $TheoraColorSpaceLookup[2] = 'Rec. 470BG'; |
|
| 822 | $TheoraColorSpaceLookup[3] = 'Reserved'; |
|
| 823 | } |
|
| 824 | return (isset($TheoraColorSpaceLookup[$colorspace_id]) ? $TheoraColorSpaceLookup[$colorspace_id] : null); |
|
| 825 | } |
|
| 826 | ||
| 827 | public static function TheoraPixelFormat($pixelformat_id) { |
|
| 828 | // http://www.theora.org/doc/Theora.pdf (table 6.4) |
|
| @@ 827-837 (lines=11) @@ | ||
| 824 | return (isset($TheoraColorSpaceLookup[$colorspace_id]) ? $TheoraColorSpaceLookup[$colorspace_id] : null); |
|
| 825 | } |
|
| 826 | ||
| 827 | public static function TheoraPixelFormat($pixelformat_id) { |
|
| 828 | // http://www.theora.org/doc/Theora.pdf (table 6.4) |
|
| 829 | static $TheoraPixelFormatLookup = array(); |
|
| 830 | if (empty($TheoraPixelFormatLookup)) { |
|
| 831 | $TheoraPixelFormatLookup[0] = '4:2:0'; |
|
| 832 | $TheoraPixelFormatLookup[1] = 'Reserved'; |
|
| 833 | $TheoraPixelFormatLookup[2] = '4:2:2'; |
|
| 834 | $TheoraPixelFormatLookup[3] = '4:4:4'; |
|
| 835 | } |
|
| 836 | return (isset($TheoraPixelFormatLookup[$pixelformat_id]) ? $TheoraPixelFormatLookup[$pixelformat_id] : null); |
|
| 837 | } |
|
| 838 | ||
| 839 | } |
|
| 840 | ||