ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ( )

Reimplemented from getid3_handler.

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

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 }
fseek($bytes, $whence=SEEK_SET)
Definition: getid3.php:1711
fread($bytes)
Definition: getid3.php:1683
error($text)
Definition: getid3.php:1752
$info
Definition: index.php:5

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

+ Here is the call graph for this function:

◆ getITheaderFilepointer()

getid3_mod::getITheaderFilepointer ( )

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

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 }

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

Referenced by Analyze().

+ 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.

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 }

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

Referenced by Analyze().

+ 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.

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 }

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

Referenced by Analyze().

+ 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.

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 }

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

Referenced by Analyze().

+ 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: