ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
getid3_bink Class Reference

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g // More...

+ Collaboration diagram for getid3_bink:

Public Member Functions

 getid3_bink (&$fd, &$ThisFileInfo)
 ParseBink (&$fd, &$ThisFileInfo)
 ParseSmacker (&$fd, &$ThisFileInfo)

Detailed Description

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //

Definition at line 17 of file module.audio-video.bink.php.

Member Function Documentation

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:


The documentation for this class was generated from the following file: