ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
getid3_bink Class Reference

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

+ Inheritance diagram for getid3_bink:
+ Collaboration diagram for getid3_bink:

Public Member Functions

 Analyze ()
 
 ParseBink ()
 
 ParseSmacker ()
 
- Public Member Functions inherited from getid3_handler
 __construct (getID3 $getid3, $call_module=null)
 
 Analyze ()
 
 AnalyzeString ($string)
 
 setStringMode ($string)
 
 saveAttachment ($name, $offset, $length, $image_mime=null)
 

Additional Inherited Members

- Protected Member Functions inherited from getid3_handler
 ftell ()
 
 fread ($bytes)
 
 fseek ($bytes, $whence=SEEK_SET)
 
 feof ()
 
 isDependencyFor ($module)
 
 error ($text)
 
 warning ($text)
 
 notice ($text)
 
- Protected Attributes inherited from getid3_handler
 $getid3
 
 $data_string_flag = false
 
 $data_string = ''
 
 $data_string_position = 0
 
 $data_string_length = 0
 

Detailed Description

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

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

Member Function Documentation

◆ Analyze()

getid3_bink::Analyze ( )

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

References $info, getid3_handler\error(), getid3_handler\fread(), getid3_handler\fseek(), ParseBink(), ParseSmacker(), and getid3_lib\PrintHexBytes().

21  {
22  $info = &$this->getid3->info;
23 
24 $this->error('Bink / Smacker files not properly processed by this version of getID3() ['.$this->getid3->version().']');
25 
26  $this->fseek($info['avdataoffset']);
27  $fileTypeID = $this->fread(3);
28  switch ($fileTypeID) {
29  case 'BIK':
30  return $this->ParseBink();
31  break;
32 
33  case 'SMK':
34  return $this->ParseSmacker();
35  break;
36 
37  default:
38  $this->error('Expecting "BIK" or "SMK" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes($fileTypeID).'"');
39  return false;
40  break;
41  }
42 
43  return true;
44 
45  }
error($text)
Definition: getid3.php:1752
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Definition: getid3.lib.php:18
fread($bytes)
Definition: getid3.php:1683
fseek($bytes, $whence=SEEK_SET)
Definition: getid3.php:1711
$info
Definition: index.php:5
+ Here is the call graph for this function:

◆ ParseBink()

getid3_bink::ParseBink ( )

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

References $info, getid3_handler\error(), and getid3_lib\LittleEndian2Int().

Referenced by Analyze().

47  {
48  $info = &$this->getid3->info;
49  $info['fileformat'] = 'bink';
50  $info['video']['dataformat'] = 'bink';
51 
52  $fileData = 'BIK'.$this->fread(13);
53 
54  $info['bink']['data_size'] = getid3_lib::LittleEndian2Int(substr($fileData, 4, 4));
55  $info['bink']['frame_count'] = getid3_lib::LittleEndian2Int(substr($fileData, 8, 2));
56 
57  if (($info['avdataend'] - $info['avdataoffset']) != ($info['bink']['data_size'] + 8)) {
58  $this->error('Probably truncated file: expecting '.$info['bink']['data_size'].' bytes, found '.($info['avdataend'] - $info['avdataoffset']));
59  }
60 
61  return true;
62  }
error($text)
Definition: getid3.php:1752
static LittleEndian2Int($byteword, $signed=false)
Definition: getid3.lib.php:292
$info
Definition: index.php:5
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseSmacker()

getid3_bink::ParseSmacker ( )

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

References $info.

Referenced by Analyze().

64  {
65  $info = &$this->getid3->info;
66  $info['fileformat'] = 'smacker';
67  $info['video']['dataformat'] = 'smacker';
68 
69  return true;
70  }
$info
Definition: index.php:5
+ Here is the caller graph for this function:

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