getID3() by James Heinrich <info@getid3.org> // More...
Public Member Functions | |
| getid3_bink (&$fd, &$ThisFileInfo) | |
| ParseBink (&$fd, &$ThisFileInfo) | |
| ParseSmacker (&$fd, &$ThisFileInfo) | |
getID3() by James Heinrich <info@getid3.org> //
Definition at line 17 of file module.audio-video.bink.php.
| getid3_bink::getid3_bink | ( | &$ | fd, | |
| &$ | ThisFileInfo | |||
| ) |
Definition at line 20 of file module.audio-video.bink.php.
References ParseBink(), and ParseSmacker().
{
$ThisFileInfo['error'][] = 'Bink / Smacker files not properly processed by this version of getID3()';
fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
$fileTypeID = fread($fd, 3);
switch ($fileTypeID) {
case 'BIK':
return $this->ParseBink($fd, $ThisFileInfo);
break;
case 'SMK':
return $this->ParseSmacker($fd, $ThisFileInfo);
break;
default:
$ThisFileInfo['error'][] = 'Expecting "BIK" or "SMK" at offset '.$ThisFileInfo['avdataoffset'].', found "'.$fileTypeID.'"';
return false;
break;
}
return true;
}
Here is the call graph for this function:| getid3_bink::ParseBink | ( | &$ | fd, | |
| &$ | ThisFileInfo | |||
| ) |
Definition at line 45 of file module.audio-video.bink.php.
References getid3_lib::LittleEndian2Int().
Referenced by getid3_bink().
{
$ThisFileInfo['fileformat'] = 'bink';
$ThisFileInfo['video']['dataformat'] = 'bink';
$fileData = 'BIK'.fread($fd, 13);
$ThisFileInfo['bink']['data_size'] = getid3_lib::LittleEndian2Int(substr($fileData, 4, 4));
$ThisFileInfo['bink']['frame_count'] = getid3_lib::LittleEndian2Int(substr($fileData, 8, 2));
if (($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) != ($ThisFileInfo['bink']['data_size'] + 8)) {
$ThisFileInfo['error'][] = 'Probably truncated file: expecting '.$ThisFileInfo['bink']['data_size'].' bytes, found '.($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']);
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| getid3_bink::ParseSmacker | ( | &$ | fd, | |
| &$ | ThisFileInfo | |||
| ) |
Definition at line 61 of file module.audio-video.bink.php.
Referenced by getid3_bink().
{
$ThisFileInfo['fileformat'] = 'smacker';
$ThisFileInfo['video']['dataformat'] = 'smacker';
return false;
}
Here is the caller graph for this function:
1.7.1