Skip to content
Permalink
Browse files

getID3-1.9.12

  • Loading branch information...
mambax7 committed Nov 26, 2016
1 parent 8c33aa5 commit f92d3437b7ff45aa747036471d9171d9a95b0188
Showing with 21,148 additions and 7,948 deletions.
  1. +607 −0 debaser/class/README.md
  2. +1,406 −802 debaser/class/changelog.txt
  3. +15 −0 debaser/class/composer.json
  4. +1 −0 debaser/class/dependencies.txt
  5. +29 −42 debaser/class/getid3/extension.cache.dbm.php
  6. +66 −50 debaser/class/getid3/extension.cache.mysql.php
  7. +266 −0 debaser/class/getid3/extension.cache.sqlite3.php
  8. +700 −401 debaser/class/getid3/getid3.lib.php
  9. +1,055 −378 debaser/class/getid3/getid3.php
  10. +281 −0 debaser/class/getid3/module.archive.gzip.php
  11. +28 −9 debaser/class/getid3/module.archive.rar.php
  12. +20 −20 debaser/class/getid3/module.archive.szip.php
  13. +177 −0 debaser/class/getid3/module.archive.tar.php
  14. +237 −135 debaser/class/getid3/module.archive.zip.php
  15. +746 −328 debaser/class/getid3/module.audio-video.asf.php
  16. +24 −22 debaser/class/getid3/module.audio-video.bink.php
  17. +745 −0 debaser/class/getid3/module.audio-video.flv.php
  18. +1,734 −28 debaser/class/getid3/module.audio-video.matroska.php
  19. +517 −203 debaser/class/getid3/module.audio-video.mpeg.php
  20. +88 −94 debaser/class/getid3/module.audio-video.nsv.php
  21. +1,933 −702 debaser/class/getid3/module.audio-video.quicktime.php
  22. +126 −102 debaser/class/getid3/module.audio-video.real.php
  23. +1,170 −541 debaser/class/getid3/module.audio-video.riff.php
  24. +42 −43 debaser/class/getid3/module.audio-video.swf.php
  25. +79 −0 debaser/class/getid3/module.audio-video.ts.php
  26. +59 −0 debaser/class/getid3/module.audio.aa.php
  27. +193 −218 debaser/class/getid3/module.audio.aac.php
  28. +247 −270 debaser/class/getid3/module.audio.ac3.php
  29. +97 −0 debaser/class/getid3/module.audio.amr.php
  30. +26 −26 debaser/class/getid3/module.audio.au.php
  31. +51 −51 debaser/class/getid3/module.audio.avr.php
  32. +97 −83 debaser/class/getid3/module.audio.bonk.php
  33. +133 −0 debaser/class/getid3/module.audio.dsf.php
  34. +93 −0 debaser/class/getid3/module.audio.dss.php
  35. +291 −0 debaser/class/getid3/module.audio.dts.php
  36. +318 −166 debaser/class/getid3/module.audio.flac.php
  37. +89 −90 debaser/class/getid3/module.audio.la.php
  38. +66 −63 debaser/class/getid3/module.audio.lpac.php
  39. +80 −53 debaser/class/getid3/module.audio.midi.php
  40. +48 −50 debaser/class/getid3/module.audio.mod.php
  41. +124 −52 debaser/class/getid3/module.audio.monkey.php
  42. +569 −490 debaser/class/getid3/module.audio.mp3.php
  43. +340 −123 debaser/class/getid3/module.audio.mpc.php
  44. +529 −233 debaser/class/getid3/module.audio.ogg.php
  45. +102 −79 debaser/class/getid3/module.audio.optimfrog.php
  46. +39 −38 debaser/class/getid3/module.audio.rkau.php
  47. +58 −54 debaser/class/getid3/module.audio.shorten.php
  48. +67 −47 debaser/class/getid3/module.audio.tta.php
  49. +43 −43 debaser/class/getid3/module.audio.voc.php
  50. +47 −44 debaser/class/getid3/module.audio.vqf.php
  51. +398 −0 debaser/class/getid3/module.audio.wavpack.php
  52. +105 −90 debaser/class/getid3/module.graphic.bmp.php
  53. +51 −0 debaser/class/getid3/module.graphic.efax.php
  54. +59 −60 debaser/class/getid3/module.graphic.gif.php
  55. +297 −31 debaser/class/getid3/module.graphic.jpg.php
  56. +39 −34 debaser/class/getid3/module.graphic.pcd.php
  57. +121 −110 debaser/class/getid3/module.graphic.png.php
  58. +102 −0 debaser/class/getid3/module.graphic.svg.php
  59. +225 −0 debaser/class/getid3/module.graphic.tiff.php
  60. +312 −0 debaser/class/getid3/module.misc.cue.php
  61. +37 −10 debaser/class/getid3/module.misc.exe.php
  62. +79 −78 debaser/class/getid3/module.misc.iso.php
  63. +38 −0 debaser/class/getid3/module.misc.msoffice.php
  64. +31 −0 debaser/class/getid3/module.misc.par2.php
  65. +31 −0 debaser/class/getid3/module.misc.pdf.php
  66. +202 −70 debaser/class/getid3/module.tag.apetag.php
  67. +38 −34 debaser/class/getid3/module.tag.id3v1.php
  68. +944 −326 debaser/class/getid3/module.tag.id3v2.php
  69. +94 −64 debaser/class/getid3/module.tag.lyrics3.php
  70. +768 −0 debaser/class/getid3/module.tag.xmp.php
  71. +39 −32 debaser/class/getid3/write.apetag.php
  72. +59 −25 debaser/class/getid3/write.id3v1.php
  73. +146 −112 debaser/class/getid3/write.id3v2.php
  74. +20 −21 debaser/class/getid3/write.lyrics3.php
  75. +89 −94 debaser/class/getid3/write.metaflac.php
  76. +188 −114 debaser/class/getid3/write.php
  77. +274 −0 debaser/class/getid3/write.real.php
  78. +59 −63 debaser/class/getid3/write.vorbiscomment.php
  79. BIN debaser/class/helperapps/cygwin1.dll
  80. BIN debaser/class/helperapps/head.exe
  81. BIN debaser/class/helperapps/md5sum.exe
  82. BIN debaser/class/helperapps/metaflac.exe
  83. +9 −0 debaser/class/helperapps/{readme.txt → readme.helperapps.txt}
  84. BIN debaser/class/helperapps/sha1sum.exe
  85. BIN debaser/class/helperapps/shorten.exe
  86. BIN debaser/class/helperapps/tail.exe
  87. BIN debaser/class/helperapps/vorbiscomment.exe
  88. +21 −332 debaser/class/license.txt
  89. +368 −73 debaser/class/readme.txt
  90. +7 −2 debaser/class/structure.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,15 @@
{
"name": "james-heinrich/getid3",
"description": "PHP script that extracts useful information from popular multimedia file formats",
"homepage": "http://www.getid3.org/",
"keywords": ["php","tags","codecs"],
"type": "library",
"license": "GPL",
"require":
{
"php": ">=5.3.0"
},
"autoload": {
"classmap": ["getid3/getid3.php"]
}
}
@@ -2,6 +2,7 @@
/// getID3() by James Heinrich <info@getid3.org> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org //
// also https://github.com/JamesHeinrich/getID3 //
/////////////////////////////////////////////////////////////////
// //
// dependencies.txt - part of getID3() //
@@ -3,14 +3,15 @@
/// getID3() by James Heinrich <info@getid3.org> //
// available at http://getid3.sourceforge.net //
// or http://www.getid3.org //
// also https://github.com/JamesHeinrich/getID3 //
/////////////////////////////////////////////////////////////////
// //
// extension.cache.dbm.php - part of getID3() //
// Please see readme.txt for more information //
// ///
/////////////////////////////////////////////////////////////////
// //
// This extension written by Allan Hansen <ahØartemis*dk> //
// This extension written by Allan Hansen <ahØartemis*dk> //
// ///
/////////////////////////////////////////////////////////////////
@@ -26,8 +27,8 @@
* require_once 'getid3/getid3.php';
* $getID3 = new getID3;
* $getID3->encoding = 'UTF-8';
* $info1 = $getID3->analyse('file1.flac');
* $info2 = $getID3->analyse('file2.wv');
* $info1 = $getID3->analyze('file1.flac');
* $info2 = $getID3->analyze('file2.wv');
*
* getID3_cached usage:
*
@@ -36,8 +37,8 @@
* $getID3 = new getID3_cached('db3', '/tmp/getid3_cache.dbm',
* '/tmp/getid3_cache.lock');
* $getID3->encoding = 'UTF-8';
* $info1 = $getID3->analyse('file1.flac');
* $info2 = $getID3->analyse('file2.wv');
* $info1 = $getID3->analyze('file1.flac');
* $info2 = $getID3->analyze('file2.wv');
*
*
* Supported Cache Types
@@ -73,39 +74,28 @@ class getID3_cached_dbm extends getID3
{
// public: constructor - see top of this file for cache type and cache_options
function getID3_cached_dbm($cache_type, $dbm_filename, $lock_filename) {
public function __construct($cache_type, $dbm_filename, $lock_filename) {
// Check for dba extension
if (!extension_loaded('dba')) {
die('PHP is not compiled with dba support, required to use DBM style cache.');
throw new Exception('PHP is not compiled with dba support, required to use DBM style cache.');
}
// Check for specific dba driver
if (function_exists('dba_handlers')) { // PHP 4.3.0+
if (!in_array('db3', dba_handlers())) {
die('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
}
}
else { // PHP <= 4.2.3
ob_start(); // nasty, buy the only way to check...
phpinfo();
$contents = ob_get_contents();
ob_end_clean();
if (!strstr($contents, $cache_type)) {
die('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
}
if (!function_exists('dba_handlers') || !in_array($cache_type, dba_handlers())) {
throw new Exception('PHP is not compiled --with '.$cache_type.' support, required to use DBM style cache.');
}
// Create lock file if needed
if (!file_exists($lock_filename)) {
if (!touch($lock_filename)) {
die('failed to create lock file: ' . $lock_filename);
throw new Exception('failed to create lock file: '.$lock_filename);
}
}
// Open lock file for writing
if (!is_writeable($lock_filename)) {
die('lock file: ' . $lock_filename . ' is not writable');
throw new Exception('lock file: '.$lock_filename.' is not writable');
}
$this->lock = fopen($lock_filename, 'w');
@@ -115,23 +105,23 @@ function getID3_cached_dbm($cache_type, $dbm_filename, $lock_filename) {
// Create dbm-file if needed
if (!file_exists($dbm_filename)) {
if (!touch($dbm_filename)) {
die('failed to create dbm file: ' . $dbm_filename);
throw new Exception('failed to create dbm file: '.$dbm_filename);
}
}
// Try to open dbm file for writing
$this->dba = @dba_open($dbm_filename, 'w', $cache_type);
$this->dba = dba_open($dbm_filename, 'w', $cache_type);
if (!$this->dba) {
// Failed - create new dbm file
$this->dba = dba_open($dbm_filename, 'n', $cache_type);
if (!$this->dba) {
die('failed to create dbm file: ' . $dbm_filename);
throw new Exception('failed to create dbm file: '.$dbm_filename);
}
// Insert getID3 version number
dba_insert(GETID3_VERSION, GETID3_VERSION, $this->dba);
dba_insert(getID3::VERSION, getID3::VERSION, $this->dba);
}
// Init misc values
@@ -142,32 +132,32 @@ function getID3_cached_dbm($cache_type, $dbm_filename, $lock_filename) {
register_shutdown_function(array($this, '__destruct'));
// Check version number and clear cache if changed
if (dba_fetch(GETID3_VERSION, $this->dba) != GETID3_VERSION) {
if (dba_fetch(getID3::VERSION, $this->dba) != getID3::VERSION) {
$this->clear_cache();
}
parent::getID3();
parent::__construct();
}
// public: destuctor
function __destruct() {
// public: destructor
public function __destruct() {
// Close dbm file
@dba_close($this->dba);
dba_close($this->dba);
// Release exclusive lock
@flock($this->lock, LOCK_UN);
flock($this->lock, LOCK_UN);
// Close lock file
@fclose($this->lock);
fclose($this->lock);
}
// public: clear cache
function clear_cache() {
public function clear_cache() {
// Close dbm file
dba_close($this->dba);
@@ -176,25 +166,25 @@ function clear_cache() {
$this->dba = dba_open($this->dbm_filename, 'n', $this->cache_type);
if (!$this->dba) {
die('failed to clear cache/recreate dbm file: ' . $this->dbm_filename);
throw new Exception('failed to clear cache/recreate dbm file: '.$this->dbm_filename);
}
// Insert getID3 version number
dba_insert(GETID3_VERSION, GETID3_VERSION, $this->dba);
dba_insert(getID3::VERSION, getID3::VERSION, $this->dba);
// Reregister shutdown function
// Re-register shutdown function
register_shutdown_function(array($this, '__destruct'));
}
// public: analyze file
function analyze($filename) {
public function analyze($filename) {
if (file_exists($filename)) {
// Calc key filename::mod_time::size - should be unique
$key = $filename . '::' . filemtime($filename) . '::' . filesize($filename);
$key = $filename.'::'.filemtime($filename).'::'.filesize($filename);
// Loopup key
$result = dba_fetch($key, $this->dba);
@@ -217,6 +207,3 @@ function analyze($filename) {
}
}
?>

0 comments on commit f92d343

Please sign in to comment.
You can’t perform that action at this time.