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

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

+ Inheritance diagram for getid3_aa:
+ Collaboration diagram for getid3_aa:

Public Member Functions

 Analyze ()
 
- 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.aa.php.

Member Function Documentation

◆ Analyze()

getid3_aa::Analyze ( )

Definition at line 21 of file module.audio.aa.php.

References $info, array, getid3_lib\BigEndian2Int(), getid3_handler\error(), getid3_handler\fread(), getid3_handler\fseek(), getid3_lib\PrintHexBytes(), and getid3_handler\warning().

21  {
22  $info = &$this->getid3->info;
23 
24  $this->fseek($info['avdataoffset']);
25  $AAheader = $this->fread(8);
26 
27  $magic = "\x57\x90\x75\x36";
28  if (substr($AAheader, 4, 4) != $magic) {
29  $this->error('Expecting "'.getid3_lib::PrintHexBytes($magic).'" at offset '.$info['avdataoffset'].', found "'.getid3_lib::PrintHexBytes(substr($AAheader, 4, 4)).'"');
30  return false;
31  }
32 
33  // shortcut
34  $info['aa'] = array();
35  $thisfile_aa = &$info['aa'];
36 
37  $info['fileformat'] = 'aa';
38  $info['audio']['dataformat'] = 'aa';
39 $this->error('Audible Audiobook (.aa) parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
40 return false;
41  $info['audio']['bitrate_mode'] = 'cbr'; // is it?
42  $thisfile_aa['encoding'] = 'ISO-8859-1';
43 
44  $thisfile_aa['filesize'] = getid3_lib::BigEndian2Int(substr($AUheader, 0, 4));
45  if ($thisfile_aa['filesize'] > ($info['avdataend'] - $info['avdataoffset'])) {
46  $this->warning('Possible truncated file - expecting "'.$thisfile_aa['filesize'].'" bytes of data, only found '.($info['avdataend'] - $info['avdataoffset']).' bytes"');
47  }
48 
49  $info['audio']['bits_per_sample'] = 16; // is it?
50  $info['audio']['sample_rate'] = $thisfile_aa['sample_rate'];
51  $info['audio']['channels'] = $thisfile_aa['channels'];
52 
53  //$info['playtime_seconds'] = 0;
54  //$info['audio']['bitrate'] = 0;
55 
56  return true;
57  }
error($text)
Definition: getid3.php:1752
warning($text)
Definition: getid3.php:1758
static PrintHexBytes($string, $hex=true, $spaces=true, $htmlencoding='UTF-8')
Definition: getid3.lib.php:18
fread($bytes)
Definition: getid3.php:1683
Create styles array
The data for the language used.
fseek($bytes, $whence=SEEK_SET)
Definition: getid3.php:1711
$info
Definition: index.php:5
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
Definition: getid3.lib.php:263
+ Here is the call graph for this function:

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