@@ -1326,6 +1326,10 @@ discard block |
||
1326 | 1326 | return true; |
1327 | 1327 | } |
1328 | 1328 | |
1329 | + /** |
|
1330 | + * @param string $type |
|
1331 | + * @param integer $line |
|
1332 | + */ |
|
1329 | 1333 | private function unhandledElement($type, $line, $element) { |
1330 | 1334 | // warn only about unknown and missed elements, not about unuseful |
1331 | 1335 | if (!in_array($element['id'], $this->unuseful_elements)) { |
@@ -1383,6 +1387,9 @@ discard block |
||
1383 | 1387 | return $simpletag_entry; |
1384 | 1388 | } |
1385 | 1389 | |
1390 | + /** |
|
1391 | + * @param integer $block_type |
|
1392 | + */ |
|
1386 | 1393 | private function HandleEMBLClusterBlock($element, $block_type, &$info) { |
1387 | 1394 | // http://www.matroska.org/technical/specs/index.html#block_structure |
1388 | 1395 | // http://www.matroska.org/technical/specs/index.html#simpleblock_structure |
@@ -502,6 +502,9 @@ |
||
502 | 502 | return true; |
503 | 503 | } |
504 | 504 | |
505 | + /** |
|
506 | + * @param integer $bits_to_read |
|
507 | + */ |
|
505 | 508 | private function readBitsFromStream(&$bitstream, &$bitstreamoffset, $bits_to_read, $return_singlebit_as_boolean=true) { |
506 | 509 | $return = bindec(substr($bitstream, $bitstreamoffset, $bits_to_read)); |
507 | 510 | $bitstreamoffset += $bits_to_read; |
@@ -132,6 +132,9 @@ |
||
132 | 132 | return true; |
133 | 133 | } |
134 | 134 | |
135 | + /** |
|
136 | + * @param integer $fileoffset |
|
137 | + */ |
|
135 | 138 | public function getNSVfHeaderFilepointer($fileoffset, $getTOCoffsets=false) { |
136 | 139 | $info = &$this->getid3->info; |
137 | 140 | $this->fseek($fileoffset); |
@@ -197,6 +197,10 @@ discard block |
||
197 | 197 | return true; |
198 | 198 | } |
199 | 199 | |
200 | + /** |
|
201 | + * @param string $atomname |
|
202 | + * @param string $atom_data |
|
203 | + */ |
|
200 | 204 | public function QuicktimeParseAtom($atomname, $atomsize, $atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) { |
201 | 205 | // http://developer.apple.com/techpubs/quicktime/qtdevdocs/APIREF/INDEX/atomalphaindex.htm |
202 | 206 | // https://code.google.com/p/mp4v2/wiki/iTunesMetadata |
@@ -1579,6 +1583,9 @@ discard block |
||
1579 | 1583 | return $atom_structure; |
1580 | 1584 | } |
1581 | 1585 | |
1586 | + /** |
|
1587 | + * @param integer $baseoffset |
|
1588 | + */ |
|
1582 | 1589 | public function QuicktimeParseContainerAtom($atom_data, $baseoffset, &$atomHierarchy, $ParseAllPossibleAtoms) { |
1583 | 1590 | //echo 'QuicktimeParseContainerAtom('.substr($atom_data, 4, 4).') @ '.$baseoffset.'<br><br>'; |
1584 | 1591 | $atom_structure = false; |
@@ -1611,6 +1618,9 @@ discard block |
||
1611 | 1618 | } |
1612 | 1619 | |
1613 | 1620 | |
1621 | + /** |
|
1622 | + * @param integer $offset |
|
1623 | + */ |
|
1614 | 1624 | public function quicktime_read_mp4_descr_length($data, &$offset) { |
1615 | 1625 | // http://libquicktime.sourcearchive.com/documentation/2:1.0.2plus-pdebian-2build1/esds_8c-source.html |
1616 | 1626 | $num_bytes = 0; |
@@ -2402,6 +2412,9 @@ discard block |
||
2402 | 2412 | return true; |
2403 | 2413 | } |
2404 | 2414 | |
2415 | + /** |
|
2416 | + * @param string $nullterminatedstring |
|
2417 | + */ |
|
2405 | 2418 | public function NoNullString($nullterminatedstring) { |
2406 | 2419 | // remove the single null terminator on null terminated strings |
2407 | 2420 | if (substr($nullterminatedstring, strlen($nullterminatedstring) - 1, 1) === "\x00") { |
@@ -2410,6 +2423,9 @@ discard block |
||
2410 | 2423 | return $nullterminatedstring; |
2411 | 2424 | } |
2412 | 2425 | |
2426 | + /** |
|
2427 | + * @param string $pascalstring |
|
2428 | + */ |
|
2413 | 2429 | public function Pascal2String($pascalstring) { |
2414 | 2430 | // Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string |
2415 | 2431 | return substr($pascalstring, 1); |
@@ -2420,6 +2436,10 @@ discard block |
||
2420 | 2436 | // helper functions for m4b audiobook chapters |
2421 | 2437 | // code by Steffen Hartmann 2015-Nov-08 |
2422 | 2438 | */ |
2439 | + |
|
2440 | + /** |
|
2441 | + * @param string $tag |
|
2442 | + */ |
|
2423 | 2443 | public function search_tag_by_key($info, $tag, $history, &$result) { |
2424 | 2444 | foreach ($info as $key => $value) { |
2425 | 2445 | $key_history = $history.'/'.$key; |
@@ -2433,6 +2453,10 @@ discard block |
||
2433 | 2453 | } |
2434 | 2454 | } |
2435 | 2455 | |
2456 | + /** |
|
2457 | + * @param string $k |
|
2458 | + * @param string $v |
|
2459 | + */ |
|
2436 | 2460 | public function search_tag_by_pair($info, $k, $v, $history, &$result) { |
2437 | 2461 | foreach ($info as $key => $value) { |
2438 | 2462 | $key_history = $history.'/'.$key; |
@@ -371,6 +371,9 @@ |
||
371 | 371 | } |
372 | 372 | |
373 | 373 | |
374 | + /** |
|
375 | + * @param string $OldRAheaderData |
|
376 | + */ |
|
374 | 377 | public function ParseOldRAheader($OldRAheaderData, &$ParsedArray) { |
375 | 378 | // http://www.freelists.org/archives/matroska-devel/07-2003/msg00010.html |
376 | 379 |
@@ -1329,6 +1329,9 @@ discard block |
||
1329 | 1329 | return true; |
1330 | 1330 | } |
1331 | 1331 | |
1332 | + /** |
|
1333 | + * @param double $startoffset |
|
1334 | + */ |
|
1332 | 1335 | public function ParseRIFFAMV($startoffset, $maxoffset) { |
1333 | 1336 | // AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size |
1334 | 1337 | |
@@ -1845,6 +1848,9 @@ discard block |
||
1845 | 1848 | return $WaveFormatEx; |
1846 | 1849 | } |
1847 | 1850 | |
1851 | + /** |
|
1852 | + * @param string $WavPackChunkData |
|
1853 | + */ |
|
1848 | 1854 | public function parseWavPackHeader($WavPackChunkData) { |
1849 | 1855 | // typedef struct { |
1850 | 1856 | // char ckID [4]; |
@@ -1925,6 +1931,9 @@ discard block |
||
1925 | 1931 | return $parsed; |
1926 | 1932 | } |
1927 | 1933 | |
1934 | + /** |
|
1935 | + * @param string $DIVXTAG |
|
1936 | + */ |
|
1928 | 1937 | public static function ParseDIVXTAG($DIVXTAG, $raw=false) { |
1929 | 1938 | // structure from "IDivX" source, Form1.frm, by "Greg Frazier of Daemonic Software Group", email: [email protected], web: http://dsg.cjb.net/ |
1930 | 1939 | // source available at http://files.divx-digest.com/download/c663efe7ef8ad2e90bf4af4d3ea6188a/on0SWN2r/edit/IDivX.zip |
@@ -1999,6 +2008,9 @@ discard block |
||
1999 | 2008 | return $parsed; |
2000 | 2009 | } |
2001 | 2010 | |
2011 | + /** |
|
2012 | + * @param string $tagshortname |
|
2013 | + */ |
|
2002 | 2014 | public static function waveSNDMtagLookup($tagshortname) { |
2003 | 2015 | $begin = __LINE__; |
2004 | 2016 | |
@@ -2585,6 +2597,9 @@ discard block |
||
2585 | 2597 | return getid3_lib::EmbeddedLookup($fourcc, $begin, __LINE__, __FILE__, 'riff-fourcc'); |
2586 | 2598 | } |
2587 | 2599 | |
2600 | + /** |
|
2601 | + * @param string $byteword |
|
2602 | + */ |
|
2588 | 2603 | private function EitherEndian2Int($byteword, $signed=false) { |
2589 | 2604 | if ($this->container == 'riff') { |
2590 | 2605 | return getid3_lib::LittleEndian2Int($byteword, $signed); |
@@ -139,6 +139,10 @@ |
||
139 | 139 | return true; |
140 | 140 | } |
141 | 141 | |
142 | + /** |
|
143 | + * @param string $bin |
|
144 | + * @param integer $length |
|
145 | + */ |
|
142 | 146 | private function readBinData($bin, $length) { |
143 | 147 | $data = substr($bin, $this->readBinDataOffset, $length); |
144 | 148 | $this->readBinDataOffset += $length; |
@@ -329,6 +329,9 @@ discard block |
||
329 | 329 | return true; |
330 | 330 | } |
331 | 331 | |
332 | + /** |
|
333 | + * @param integer $instrumentid |
|
334 | + */ |
|
332 | 335 | public function GeneralMIDIinstrumentLookup($instrumentid) { |
333 | 336 | |
334 | 337 | $begin = __LINE__; |
@@ -469,6 +472,9 @@ discard block |
||
469 | 472 | return getid3_lib::EmbeddedLookup($instrumentid, $begin, __LINE__, __FILE__, 'GeneralMIDIinstrument'); |
470 | 473 | } |
471 | 474 | |
475 | + /** |
|
476 | + * @param integer $instrumentid |
|
477 | + */ |
|
472 | 478 | public function GeneralMIDIpercussionLookup($instrumentid) { |
473 | 479 | |
474 | 480 | $begin = __LINE__; |
@@ -1082,6 +1082,9 @@ discard block |
||
1082 | 1082 | return true; |
1083 | 1083 | } |
1084 | 1084 | |
1085 | + /** |
|
1086 | + * @param boolean $ScanAsCBR |
|
1087 | + */ |
|
1085 | 1088 | public function RecursiveFrameScanning(&$offset, &$nextframetestoffset, $ScanAsCBR) { |
1086 | 1089 | $info = &$this->getid3->info; |
1087 | 1090 | $firstframetestarray = array('error' => array(), 'warning'=> array(), 'avdataend' => $info['avdataend'], 'avdataoffset' => $info['avdataoffset']); |
@@ -1696,6 +1699,9 @@ discard block |
||
1696 | 1699 | return $MPEGaudioEmphasis; |
1697 | 1700 | } |
1698 | 1701 | |
1702 | + /** |
|
1703 | + * @param string $head4 |
|
1704 | + */ |
|
1699 | 1705 | public static function MPEGaudioHeaderBytesValid($head4, $allowBitrate15=false) { |
1700 | 1706 | return self::MPEGaudioHeaderValid(self::MPEGaudioHeaderDecode($head4), false, $allowBitrate15); |
1701 | 1707 | } |
@@ -1946,6 +1952,9 @@ discard block |
||
1946 | 1952 | return (isset($LAMEmiscStereoModeLookup[$StereoModeID]) ? $LAMEmiscStereoModeLookup[$StereoModeID] : ''); |
1947 | 1953 | } |
1948 | 1954 | |
1955 | + /** |
|
1956 | + * @param integer $SourceSampleFrequencyID |
|
1957 | + */ |
|
1949 | 1958 | public static function LAMEmiscSourceSampleFrequencyLookup($SourceSampleFrequencyID) { |
1950 | 1959 | static $LAMEmiscSourceSampleFrequencyLookup = array( |
1951 | 1960 | 0 => '<= 32 kHz', |