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

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

+ Inheritance diagram for getid3_mod:
+ Collaboration diagram for getid3_mod:

Public Member Functions

 Analyze ()
 
 getMODheaderFilepointer ()
 
 getXMheaderFilepointer ()
 
 getS3MheaderFilepointer ()
 
 getITheaderFilepointer ()
 
- 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.mod.php.

Member Function Documentation

◆ Analyze()

getid3_mod::Analyze ( )

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

References $info, getid3_handler\error(), getid3_handler\fread(), getid3_handler\fseek(), getITheaderFilepointer(), getMODheaderFilepointer(), getS3MheaderFilepointer(), and getXMheaderFilepointer().

21  {
22  $info = &$this->getid3->info;
23  $this->fseek($info['avdataoffset']);
24  $fileheader = $this->fread(1088);
25  if (preg_match('#^IMPM#', $fileheader)) {
26  return $this->getITheaderFilepointer();
27  } elseif (preg_match('#^Extended Module#', $fileheader)) {
28  return $this->getXMheaderFilepointer();
29  } elseif (preg_match('#^.{44}SCRM#', $fileheader)) {
30  return $this->getS3MheaderFilepointer();
31  } elseif (preg_match('#^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)#', $fileheader)) {
32  return $this->getMODheaderFilepointer();
33  }
34  $this->error('This is not a known type of MOD file');
35  return false;
36  }
error($text)
Definition: getid3.php:1752
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:

◆ getITheaderFilepointer()

getid3_mod::getITheaderFilepointer ( )

Definition at line 84 of file module.audio.mod.php.

References $info, getid3_handler\error(), getid3_handler\fread(), and getid3_handler\fseek().

Referenced by Analyze().

84  {
85  $info = &$this->getid3->info;
86  $this->fseek($info['avdataoffset']);
87  $FormatID = $this->fread(4);
88  if (!preg_match('#^IMPM$#', $FormatID)) {
89  $this->error('This is not an ImpulseTracker MOD file');
90  return false;
91  }
92 
93  $info['fileformat'] = 'it';
94 
95  $this->error('ImpulseTracker parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
96  return false;
97  }
error($text)
Definition: getid3.php:1752
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:
+ Here is the caller graph for this function:

◆ getMODheaderFilepointer()

getid3_mod::getMODheaderFilepointer ( )

Definition at line 39 of file module.audio.mod.php.

References $info, getid3_handler\error(), getid3_handler\fread(), and getid3_handler\fseek().

Referenced by Analyze().

39  {
40  $info = &$this->getid3->info;
41  $this->fseek($info['avdataoffset'] + 1080);
42  $FormatID = $this->fread(4);
43  if (!preg_match('#^(M.K.|[5-9]CHN|[1-3][0-9]CH)$#', $FormatID)) {
44  $this->error('This is not a known type of MOD file');
45  return false;
46  }
47 
48  $info['fileformat'] = 'mod';
49 
50  $this->error('MOD parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
51  return false;
52  }
error($text)
Definition: getid3.php:1752
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:
+ Here is the caller graph for this function:

◆ getS3MheaderFilepointer()

getid3_mod::getS3MheaderFilepointer ( )

Definition at line 69 of file module.audio.mod.php.

References $info, getid3_handler\error(), getid3_handler\fread(), and getid3_handler\fseek().

Referenced by Analyze().

69  {
70  $info = &$this->getid3->info;
71  $this->fseek($info['avdataoffset'] + 44);
72  $FormatID = $this->fread(4);
73  if (!preg_match('#^SCRM$#', $FormatID)) {
74  $this->error('This is not a ScreamTracker MOD file');
75  return false;
76  }
77 
78  $info['fileformat'] = 's3m';
79 
80  $this->error('ScreamTracker parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
81  return false;
82  }
error($text)
Definition: getid3.php:1752
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:
+ Here is the caller graph for this function:

◆ getXMheaderFilepointer()

getid3_mod::getXMheaderFilepointer ( )

Definition at line 54 of file module.audio.mod.php.

References $info, getid3_handler\error(), getid3_handler\fread(), and getid3_handler\fseek().

Referenced by Analyze().

54  {
55  $info = &$this->getid3->info;
56  $this->fseek($info['avdataoffset']);
57  $FormatID = $this->fread(15);
58  if (!preg_match('#^Extended Module$#', $FormatID)) {
59  $this->error('This is not a known type of XM-MOD file');
60  return false;
61  }
62 
63  $info['fileformat'] = 'xm';
64 
65  $this->error('XM-MOD parsing not enabled in this version of getID3() ['.$this->getid3->version().']');
66  return false;
67  }
error($text)
Definition: getid3.php:1752
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:
+ Here is the caller graph for this function:

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