/usr/share/php/getid3/module.audio-video.bink.php is in php-getid3 1.9.8-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | <?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org //
// also https://github.com/JamesHeinrich/getID3 //
/////////////////////////////////////////////////////////////////
// See readme.txt for more details //
/////////////////////////////////////////////////////////////////
// //
// module.audio.bink.php //
// module for analyzing Bink or Smacker audio-video files //
// dependencies: NONE //
// ///
/////////////////////////////////////////////////////////////////
class getid3_bink extends getid3_handler
{
public function Analyze() {
$info = &$this->getid3->info;
$info['error'][] = 'Bink / Smacker files not properly processed by this version of getID3() ['.$this->getid3->version().']';
$this->fseek($info['avdataoffset']);
$fileTypeID = $this->fread(3);
switch ($fileTypeID) {
case 'BIK':
return $this->ParseBink();
break;
case 'SMK':
return $this->ParseSmacker();
break;
default:
$info['error'][] = 'Expecting "BIK" or "SMK" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($fileTypeID).'"';
return false;
break;
}
return true;
}
public function ParseBink() {
$info = &$this->getid3->info;
$info['fileformat'] = 'bink';
$info['video']['dataformat'] = 'bink';
$fileData = 'BIK'.$this->fread(13);
$info['bink']['data_size'] = getid3_lib::LittleEndian2Int(substr($fileData, 4, 4));
$info['bink']['frame_count'] = getid3_lib::LittleEndian2Int(substr($fileData, 8, 2));
if (($info['avdataend'] - $info['avdataoffset']) != ($info['bink']['data_size'] + 8)) {
$info['error'][] = 'Probably truncated file: expecting '.$info['bink']['data_size'].' bytes, found '.($info['avdataend'] - $info['avdataoffset']);
}
return true;
}
public function ParseSmacker() {
$info = &$this->getid3->info;
$info['fileformat'] = 'smacker';
$info['video']['dataformat'] = 'smacker';
return true;
}
}
|