diff options
252 files changed, 15 insertions, 33892 deletions
diff --git a/includes/video_helper.inc b/includes/video_helper.inc index e6627ca..8ba1840 100644 --- a/includes/video_helper.inc +++ b/includes/video_helper.inc @@ -88,9 +88,9 @@ class video_helper { // Check the checkbox to use default thumbnail on node $thumbnail->filepath = $default_thumbnail->uri; } - elseif (isset($variables['item']['thumbanail']) ? TRUE : FALSE) { + elseif (isset($variables['item']['thumbnail']) ? TRUE : FALSE) { // actual video thumbnails is present - $thumbnail_load = file_load($variables['item']['thumbanail']); + $thumbnail_load = file_load($variables['item']['thumbnail']); $thumbnail->filepath = $thumbnail_load->uri; } else { diff --git a/libraries/phpvideotoolkit/CHANGELOG b/libraries/phpvideotoolkit/CHANGELOG deleted file mode 100644 index 8c28bd4..0000000 --- a/libraries/phpvideotoolkit/CHANGELOG +++ /dev/null @@ -1,319 +0,0 @@ -[0.1.9] [06.11.2008] - - ADDED a check in getFFmpegInfo to determine if ffmpeg is actually found/installed. - The value is accessible through PHPVideoToolkit::$ffmpeg_found; - - ADDED example15.php that shows usage of PHPVideoToolkit::$ffmpeg_found - -[0.1.8] [06.10.2008] - - FIXED php4 class parse errors and index examples. - - SEPARATED out php4 and php5 examples and rejigged the examples directory structure. - - ADDED DIRECTORY_SEPARATOR shortcut DS. - - CHANGED compiler in the getFFmpegInfo() data array to binary and moved gcc, build_date - and build_date_timestamp to compiler. - - ADDED raw info to the data returned by getFFmpegInfo(). - - ADDED strict version checking and alerts in examples. - - ADDED canCodecBeEncoded(), canCodecBeDecoded(), and validateCodec() that aid in - determining how the ffmpeg binary can interact with certain codecs. - - ADDED example 14 to give an encode/decode lookup table. - - FIXED example-configuration vhook definition bug. Thanks pwnedd. - - ADDED $watermark_options to addWatermark(). Thanks pwnedd. - - FIXED gif export that resulted in a failure. Thanks pwnedd. - - FIXED path in FFmpeg-PHP adapter unit tests. - - ADDED extra argument $use_smart_values to formatSeconds() and formatTimecode() to allow - the disabling of smart values, ie mins, secs and millisecs, by default it is true. - - CHANGED example 12. Added a form to allow custom timecode changes. Added timecode docs. - - FIXED bug with formatSeconds() that incorrectly interpreted hours if the number of - hours was greater than 24. - - FIXED bug where vhook support wasn't correctly detecting if they were enabled or not. - Thanks pwnedd. - - FIXED incorrect documentation in example 13. - - FIXED use of static class detection in php5 class. - - UPDATED aspect ratio usage so if you use an aspect ratio the width and heights are set - to what they should be using the aspect ratio. - - UPDATED addWatermark() to allow different watermark vhooks to be used, mainly - watermark.so and imlib2.so. http://ffmpeg.mplayerhq.hu/hooks.html#SEC4 - Thanks pwnedd. - - FIXED an error in getFileInfo() that threw a php notice and resulted in incorrect - data when analyzing images. - - ADDED setAudioChannels(), PHPVideoToolkit::AUDIO_MONO and PHPVideoToolkit::AUDIO_STEREO - to set the number of channels in the output media. - - ADDED fileHasVideo(), and fileHasAudio() - - ADDED frames to audio info, (this assumes ffmpeg uses 1 millisec = 1 audio frame, if not - let me know) - - ADDED extractSegment() to extract portions of video and audio. - - FIXED durations.seconds info that incorrectly rounded the number of seconds the media - is instead of accurate reporting. - - ADDED example15.php to show you how to extra a portion of media and then optionally - speed it up or slow it down. - - ADDED new INSTALL directions pointing to ffmpeginstall the automatic command line - ffmpeg et-all installer. - - CHANGED private vars and functions to protected for feature request of beiercai. - - ADDED disableVideo() - -[0.1.7] [19.06.2008] - - FIXED error where an empty arguments param will get escaped and lead to an error - Thanks mighty. - -[0.1.6] [06.06.2008] - - ADDED check and error message to see if the temp directory supplied is writable. - - FIXED Syntax error in PHP 4 version of the class. - -[0.1.5] [06.06.2008] - - REMOVED dependancy on buffering the exec calls to a file, parsing the file and - then unlinking the file. Cuts down considerably of the impact of the class on - the server. Thanks Varon. http://www.buggedcom.co.uk/discuss/viewtopic.php?id=10 - - FIXED check for liblamemp3 audio format problem. - - UPDATED example/index.php to correctly get the current release version, and - remove the php notices. - - UPDATED PHPVideoToolkit::getFileInfo() and PHPVideoToolkit::getFFmpegInfo() so - they can now be called statically. - - UPDATED example06.php to have the media embedded in the example. - - BUNDLED the Javascript PluginObject package with PHPVideoToolkit. It is an - end-all solution to embedding browser based plugins via javascript. It is - distributed under a BSD License. The full package can be downloaded from: - http://sourceforge.net/project/showfiles.php?group_id=223120 - -[0.1.4] [10.04.2008] - - ADDED phpvideotoolkit.php4.php and renamed the php5 class - phpvideotoolkit.php5.php, however the adapter classes will remain php5 only - for the time being. Allow the adapters are php5 it would be very simple for - someone to convert them to php4. IF you do let me know and i'll include them - in the distribution. - - FIXED PHP Notice errors, googlecode issue #1, Thanks Rob Coenen. - - DEPRECIATED setVideoOutputDimensions for setVideoDimensions - - ADDED PHPVideoToolkit::flvStreamSeek() which acts as a php stream proxy for - flash flv files, can also limit bandwidth speed. See example13.php for more info. - - ADDED example13.php to demo how to use the new flv seeking function flvStreamSeek() - - DEPRECIATED setAudioFormat for setAudioCodec. setAudioFormat will be removed in - version 0.2.0 - - DEPRECIATED setVideoFormat for setVideoCodec. setVideoFormat will be removed in - version 0.2.0 - - REMOVED dependancy of the ffmpeg-PHP adapter on the getID3 library as is - incompatible with the BSD license. Now integrated with php-reader - http://code.google.com/p/php-reader/ which is licensed under a New BSD license. - -[0.1.3] [04.04.2008] - - RENAMED primary class to PHPVideoToolkit to avoid any confusion with - ffmpeg-php - - THANKS to Istvan Szakacs, and Rob Coenen for providing some valuable feedback, - bug fixes and code contributions. - - ADDED note to example11.php to warn windows users about getID3's - helper files. - - ADDED example12.php which shows how to manipulate timecodes. - - CHANGED the behaviour of extractFrames and extractFrame to allow you - to specify specific frames and enter different types of timecodes as - params using the new $timecode_format argument. - - ADDED value PHPVideoToolkit::getFFmpegInfo()['ffmpeg-php-support']; Values are - - 'module' = ffmpeg-php is installed as a php module - - 'emulated' = ffmpeg-php is supported through the VideoToolkit adapter - classes (supplied with this package) - - false = ffmpeg-php is not supported in any way. - - ADDED PHPVideoToolkit::hasFFmpegPHPSupport() returns one of the values above, - dictating if ffmpeg-php is supported. - - ADDED PHPVideoToolkit::getFFmpegInfo()['compiler']['vhook-support'] that determines - if vhook support has been compiled into the ffmpeg binary. - - ADDED PHPVideoToolkit::hasVHookSupport() returns a boolean value to determine - if vhook support is enabled in the ffmpeg binary. - - FIXED path include bug in example08.php - - ADDED frame existence check to extractFrame and extractFrames, thanks to - Istvan Szakacs for suggesting the idea. - - ADDED an extra param to PHPVideoToolkit::setInputFile() and - PHPVideoToolkit::prepareImagesForConversion(), $input_frame_rate. by default it is - 0 which means no input frame rate is set, if you set it to false for - setInputFile then the frame rate will retrieved, otherwise the input - frame rate will be set to whatever integer is set. - - ADDED frame_count to the duration field of the getFileInfo array. - - ADDED check for --enable-liblamemp3 which requires a different codec for - setting the audio format as mp3. - - ADDED width and height check in setVideoOutputDimensions, as apparently - the output dimensions have to be even numbers. - - REMOVED call-by-pass-time-reference dependance from _postProcess() - - ADDED vhook check to PHPVideoToolkit::addWatermark(), returns false if vhook is not - enabled. - - ADDED PHPVideoToolkit::addGDWatermark() to allow GD watermarking of outputted images. - - CHANGED the functionality of example04.php to show usage of addGDWatermark - if vhooking is not enabled. - -[0.1.2] [03.04.2008] - - FIXED bug in PHPVideoToolkit::getFileInfo() that in some instances didn't return - the correct information, such as dimensions and frame rate. Thanks to - Istvan Szakacs for pointing out the error. - - CHANGED the way an image sequence is outputted. %d within the naming - of the output files is now for internal use only. - %index - is the old %d and it also accepts numerical padding. - %timecode - is the pattern for hh-mm-ss-fn, where fn is the frame - number. - - UPDATED example02.php to reflect the changes above. - - ADDED ffmpeg-php adapters to provide a pure PHP implementation of the - ffmpeg-php module. - - ADDED getID3 to the distribution. - - @link http://getid3.sourceforge.net/ - - @author James Heinrich <info-at-getid3-dot-org> (et al) - - @license GPL and gCL (getID3 Commerical License). - - ADDED GifEncoder to the distribution. - @link http://www.phpclasses.org/browse/package/3163.html - @link http://phpclasses.gifs.hu/show.php?src=GIFEncoder.class.php - @author László Zsidi - @license Freeware. - - ADDED example11.php, example12.php to demonstrate the ffmpeg-php - adapters. - - CHANGED PHPVideoToolkit::getFileInfo()['audio']['frequency'] to - PHPVideoToolkit::getFileInfo()['audio']['sample_rate'] - - CHANGED PHPVideoToolkit::getFileInfo()['audio']['format'] to - PHPVideoToolkit::getFileInfo()['audio']['codec'] - - CHANGED PHPVideoToolkit::getFileInfo()['video']['format'] to - PHPVideoToolkit::getFileInfo()['video']['codec'] - - ADDED PHPVideoToolkit::getFileInfo()['video']['pixel_format'] - - ADDED PHPVideoToolkit::getFileInfo()['_raw_info'] which is the raw buffer output - - ADDED PHPVideoToolkit::getFileInfo()['duration']['start'] (re-added) - - UPDATED PHPVideoToolkit::extractFrame so in some instances it will be less cpu - intensive. - - UPDATED PHPVideoToolkit::_combineCommands so commands can be ordered in the exec - string. - -[0.1.1] [29.03.2008] - - FIXED bug in the post processing of exporting a series of image frames. - With thanks to Rob Coenen. - - FIXED bug in PHPVideoToolkit::getFileInfo() that returned the incorrect frame - rate of videos. - - CHANGED functionality of PHPVideoToolkit::extractFrame(), to export a specific - frame based on the frame number, not just the hours, mins, secs timecode - - FIXED bug in ffmpeg.example9.php where the gif was incorrectly named. - - CHANGED functionality of PHPVideoToolkit::getFileInfo(), reorganised the way the - duration data is returned. - - CHANGED functionality of PHPVideoToolkit::getFileInfo(), so the timecode with - frame numbers instead of milliseconds is also returned in the value - duration.timecode.frames.exact, however this value is only available to - video files. - - REMOVED duration.start from the information returned by - PHPVideoToolkit::getFileInfo() - - CHANGED PHPVideoToolkit::$image_output_timecode's default value to true/ - - ADDED PHPVideoToolkit::registerPostProcess() to provide a way to automate - callbacks docs so you can hook into post processing of the ffmpeg - output. See function for more info. - - CHANGED the way PHPVideoToolkit::setFormatToFLV() adds the meta data to the flv. - It now uses PHPVideoToolkit::registerPostProcess() to create a callback. - - FIXED average time mistakes in examples. - - FIXED overwrite mistakes in examples (it was set to true so the - overwrite mode defaulted to PHPVideoToolkit::OVERWRITE_EXISTING) - - ADDED internal caching of PHPVideoToolkit::getFileInfo(); so if the data is asked - to be generated more than one in the same script it only gets generated - once. - -[0.1.0] [02.03.2008] - - ADDED new constant PHPVideoToolkit::SIZE_SAS. Which stands for Same As Source, - meaning ffmpeg will automatically convert the movie to a whatever format - but preserve the size of the original movie. - - CORRECTED error/comment spelling mistakes. - - CHANGED PHPVideoToolkit::getFileInfo(); to use preg_match so it's more reliable, - it also contains more information on the file. - - ADDED public function setVideoAspectRatio. Sets the video aspect ratio. - Takes one of three constants as an argument. PHPVideoToolkit::RATIO_STANDARD, - PHPVideoToolkit::RATIO_WIDE, PHPVideoToolkit::RATIO_CINEMATIC - - ADDED public function setVideoBitRate. Sets the video bitrate. - - ADDED public function setVideoFormat. Sets a video codec. It should not - be confused with PHPVideoToolkit::setFormat. It provides slightly different - advanced functionality, most simple usage can just use PHPVideoToolkit::setFormat - - ADDED public function setAudioFormat. Sets an audio codec. - - ADDED public function setConstantQuality. Sets a constant encoding - quality. - - ADDED public function getFFmpegInfo. Gets the available data from ffmpeg - and stores the output in PHPVideoToolkit::$ffmpeg_info (below). - - ADDED PHPVideoToolkit::$ffmpeg_info static var to hold the output of - PHPVideoToolkit::getFFmpegInfo(); - - ADDED public function getLastProcessTime and getProcessTime to retrieve - the processing times of the ffmpeg calls. - - ADDED adapter classes to provide simple functionality for ffmpeg newbies - / quick solutions. Each option set can be supplied in the second - argument as part of an array. - VideoTo::PSP(); - Converts video into the PSP mp4 video. - VideoTo::iPod(); - Converts video into the iPod mp4 video. - VideoTo::FLV(); - Converts video into the Flash video (flv). - VideoTo::Gif(); - Converts video into the animated gif. - (experimental as quality is poor) - - CHANGED the way the processing works. The file is processed to the - temp directory and is then checked for consistency before moving to - the output directory. - - CHANGED the return values of PHPVideoToolkit::execute(); It no longer returns - just true or false. See class docs for more info. - - CHANGED the third argument in PHPVideoToolkit::setOutput() from $overwrite to - $overwrite_mode. Instead of a boolean value, it now takes one of three - constants - ffmegp::OVERWRITE_FAIL - means that if a conflict exists the - process will result in and error. - ffmegp::OVERWRITE_PRESERVE - means that if a conflict exists the - process will preserve the existing - file and report with - PHPVideoToolkit::RESULT_OK_BUT_UNWRITABLE. - ffmegp::OVERWRITE_EXISTING - means that if a conflict exists the - process will overwrite any existing - file with the new file. - ffmegp::OVERWRITE_UNIQUE - means that every filename is - prepended with a unique hash to - preserve the existing filesystem. - - MOVED error messages into a class variable for easier - translation/changes. - - CHANGED moveLog functionality to use rename instead of copy and unlink. - -[0.0.9] [12.02.2008] - - Added new definition FFMPEG_MENCODER_BINARY to point to the mencoder - binary. - - Changed the behavior of setVideoOutputDimensions. it now accepts class - constants as preset sizes. - - Added public function adjustVolume. Sets the audio volume. - - Added public function extractAudio. Extracts audio from video. - - Added public function disableAudio. Disables audio encoding. - - Added public function getFileInfo. Access information about the media - file. - Without using ffmpeg-php as it queries the binary directly. - - Added 2 arguments to excecute. - argument 1 - $multi_pass_encode (boolean). Determines if ffmpeg should - multipass encode. Can result in a better quality encode. - default false - argument 2 - $log (boolean). Determines if the output of the query to - the ffmpeg binary is logged. Note, any log file created - is destroyed unless moved with PHPVideoToolkit::moveLog upon - destruct of the ffmpeg instance or on PHPVideoToolkit::reset. - default false - - Added public function moveLog. Moves a log file. - - Added public function readLog. Reads a log file and returns the data. - - Changed external format definitions to internal class constants. - - Changed external use high quality join flag to internal class constant. - - Fixed bug in setFormat error message. - - Fixed bug in execute. - -[0.0.8] [07.08.2007] - - Added public functions secondsToTimecode & timecodeToSeconds. Translates - seconds into a timecode and visa versa. - ie. 82 => 00:01:22 & 00:01:22 => 82 - - Added public var image_output_timecode. Determines if any outputted - frames are re-stamped with the frames timecode if true. - - Fixed bug in setOutput. - -[0.0.7] [01.08.2007] - - Added FFMPEG_FORMAT_Y4MP format (yuv4mpegpipe). - - Added extra information to install.txt - - Added public function hasCommand. - - Added public functions addVideo, addVideos - - Changed the behavior of setInputFile to take into account the addVideos - function. It now can take multiple input files for joining as well as - the high quality join flag 'FFMPEG_USE_HQ_JOIN'. - - Changed the behavior of setOutput. If the $output_name has a common - image extension then and no %d is found then an error is raised. - - Changed all booleans from upper to lower case. - -[0.0.5] [12.03.2007] - - Added FFMPEG_FORMAT_JPG format (mjpeg). Thanks Matthias. - - Changed the behavior of extractFrames. It now accepts a boolean FALSE - argument for $extract_end_timecode. - If it is given then all frames are exported from the timecode specified - by $extract_begin_timecode. Thanks Matthias. - - Added extra definition 'FFMPEG_WATERMARK_VHOOK' for the path to the - watermark vhook. - - Added watermark support for both frames exports and videos. (Note: this - makes specific useage of vhook. If your ffmpeg binary has not been - compiled with --enable-vhook then this will not work. - -[0.0.1] [02.03.2007] - - Initial version released - -/* SVN FILE: $Id$ */
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/DEMOS b/libraries/phpvideotoolkit/DEMOS deleted file mode 100644 index 32b5867..0000000 --- a/libraries/phpvideotoolkit/DEMOS +++ /dev/null @@ -1,53 +0,0 @@ -The examples require some auxiliary files. If you do not have these files you can -download them from http://www.buggedcom.co.uk/ffmpeg however they should be supplied with -all downloads from Google code or Sourceforge - -example-config.php -Please edit this files in order for the examples to work. - -example01.php -Converts video to Flash Video (ie FLV). - -example02.php -Screen grabs video frames. - -example03.php -Compile a movie from multiple jpegs. - -example04.php -Watermark a video. - -example05.php -Access media metadata without using the ffmpeg-php library. - -example06.php -Extract audio from video. - -example07.php -Join multiple videos together. - -example08.php -Easy video conversion to common formats using the adapters. - -example09.php -Shows you how to access the information about your ffmpeg installation. - -example10.php -Shows you how to extract a specific frame from a movie. - -example11.php -Shows you an example usage of the ffmpeg-php emulation via the ffmpeg-php adapter. - -example12.php -Shows you how to manipulate/format timecode strings. - -example13.php -This demonstrates how to simply create a FLV stream script. - -example14.php -An encode/decode lookup table. - -example15.php -Determine if ffmpeg is installed. - -/* SVN FILE: $Id$ */ diff --git a/libraries/phpvideotoolkit/INSTALL b/libraries/phpvideotoolkit/INSTALL deleted file mode 100644 index 3f8bc36..0000000 --- a/libraries/phpvideotoolkit/INSTALL +++ /dev/null @@ -1,49 +0,0 @@ -There is now a super-duper Automated FFmpeg installer. -It's written by a clever guy called Sherinmon A, and is supplied under a GPL license. - -It installs, ffmpeg, ffmpeg-php, MPlayer, Codecs, Flvtool, Lame, Libogg, Libvorbis, -Vorbis-tools, Libtheora, FFMPEG, AMR 3gp Encoder and decoder (amrnb,amrwb-), -Ruby, wmf Lib, faad2, facc, a52dec-0.7.4, xvid/div decoder, and x264 . - -Requirements: -a) You will need to have access to ssh to start these installs -b) Must be a Linux/Unix/POSIX server -c) Must need root shell(bash) access -d) Must need 200 MB of free space in your server - -i) Check if yum in installed or not in the server. If there is no yum, please make -sure automake,autoconf and libtools are installed. It is reccommend to configure the -distribution specific yum. - -There are two types of installers, one for root users and one for users on shared hosts. -The instructions below are as of October 9th, 2008. -The process will take a very long time, in the region of 15-20 minutes so be patient. - ------------ -FOR SHARED HOSTS -Source Download link : http://sourceforge.net/project/showfiles.php?group_id=210922 ------------ - -cd ~ -mkdir ffmpeg -wget http://kent.dl.sourceforge.net/sourceforge/shf/sharedhostffmpeg.1.0.2.tar.gz -tar zxf sharedhostffmpeg.1.0.2.tar.gz -cd sharedhostffmpeg.1.0.2 -./install - - ------------ -FOR SHARED HOSTS -Source Download link : http://sourceforge.net/project/showfiles.php?group_id=205330 ------------ - -cd ~ -mkdir ffmpeg -wget http://dfn.dl.sourceforge.net/sourceforge/ffmpeginstall/ffmpeginstall.3.2.1.tar.gz -tar zxf ffmpeginstall.3.2.1.tar.gz -cd ffmpeginstall.3.2.1 -./install - - - -/* SVN FILE: $Id$ */ diff --git a/libraries/phpvideotoolkit/INSTALL.old b/libraries/phpvideotoolkit/INSTALL.old deleted file mode 100644 index 5875f1f..0000000 --- a/libraries/phpvideotoolkit/INSTALL.old +++ /dev/null @@ -1,257 +0,0 @@ -Please note this information is now outdated. The automated ffmpeg install is recommended for installing ffmpeg et-al. - -------------- - -Here is a great resource for compiling ffmpeg. - -http://vexxhost.com/blog/2007/03/03/installing-ffmpeg-ffmpeg-php-mplayer-mencoder-flv2tool-lame-mp3-encoder-libogg-%e2%80%93-the-easy-way/ - -Note I have attached an archive of this resource below. I am not the author of this content. - -A lot of people are getting hiring people to install FFMPEG as they think it¡¯s a difficult task, but it¡¯s much easier than you think if you follow these instructions. You should have root access & basic Linux knowledge to the server to follow these instructions. -1. Create a directory to do our work in - -mkdir ~/ffmpeg -cd ~/ffmpeg - -2. Get all the source files - -wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20061022.tar.bz2 -wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz -wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz -wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2 -wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz -wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.1.2.tar.gz - -3. Extract all the source files - -bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar -tar zxvf flvtool2_1.0.5_rc6.tgz -tar zxvf lame-3.97.tar.gz -bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar -tar zxvf libogg-1.1.3.tar.gz -tar zxvf libvorbis-1.1.2.tar.gz - -4. Create the codecs directory & import them - -mkdir /usr/local/lib/codecs/ -mv essential-20061022/* /usr/local/lib/codecs/ -chmod -R 755 /usr/local/lib/codecs/ - -5. Install SVN/Ruby (Depends on OS, this is for RHEL/CentOS) - -yum install subversion -yum install ruby -yum install ncurses-devel - -6. Get the latest FFMPEG/MPlayer from the subversion - -svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg -svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer - -7. Compile LAME - -cd ~/ffmpeg/lame-3.97 -./configure -make -make install - -8. Compile libOGG - -cd ~/ffmpeg/libogg-1.1.3 -./configure -make -make install - -9. Compile libVorbis - -cd ~/ffmpeg/libvorbis-1.1.2 -./configure -make -make install - -10. Compile flvtool2 - -cd ~/ffmpeg/flvtool2_1.0.5_rc6 -ruby setup.rb config -ruby setup.rb setup -ruby setup.rb install - -11. Compile MPlayer - -cd ~/ffmpeg/mplayer -./configure -make -make install - -12. Compile FFMPEG - -cd ~/ffmpeg/ffmpeg -./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --disable-mmx --enable-shared -echo '#define HAVE_LRINTF 1' >> config.h -make -make install - -13. Finalize the codec setups - -ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50 -ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51 -ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49 -ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0 -ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51 -14. Compile FFMPEG-PHP -cd ~/ffmpeg/ ffmpeg-php-0.5.0 -phpize -./configure -make -make install - -15. Install FFMPEG-PHP (make sure the php.ini path is correct.) - -echo 'extension=/usr/local/lib/php/extensions/ no-debug-non-zts-20020429/ffmpeg.so' >> /usr/local/Zend/etc/php.ini - -16. Restart Apache to load FFMPEG-PHP (Depends on OS, this is for RHEL/CentOS) - -service httpd restart - -17. Verify if it works - -php -r 'phpinfo();' | grep ffmpeg -If you get a few lines such as -ffmpeg -ffmpeg support (ffmpeg-php) => enabled -ffmpeg-php version => 0.5.0 -ffmpeg.allow_persistent => 0 => 0 -Then everything is installed and working. FFMPEG, FFMPEG-PHP, MPlayer, MEncoder, flv2tool, LAME MP3 encoder & libOGG. - - - ---------------- - -NOTE: Please note this is not written by me the original author is Lunar. - -Wed 19 Apr 2006 - -One-stop Installation Guide for Create a Linux Server-side FLV -conversion environment <http://luar.com.hk/blog/?p=669> - -Posted by luar under Flash Media Server <http://luar.com.hk/blog/?cat=32> - -If you want to convert other video format to FLV (sorenson codec), -everybody will suggest using FFmpeg. In fact, only FFmpeg is not enough -for successfully create a server-side command line conversion -environment to create FLV with video and audio, plus the FLV 1.1 -metadata information. I have stroked for a whole day to setup my Linux -server (Fedora Core 3), so I wrote down my note here for other people -and myself as a reference. - -Purely install FFmpeg is not enough, the FLV converted has no audio, -because FLV audio codec is mp3, so you need LAME support. Moreover, the -FLV converted has no metadata, you cannot know the dimension, duration -such important information for a FLV player swf. Therefore, you need -another free tool: FLVTool2, which is written in Ruby, so I have to -install Ruby in my server, too. - -Overall installation order: LAME->FFmpeg->Ruby->FLVTool2, if you want to -acess video info through FFmpeg in php, you can install ffmpeg-php, too. - -Please login as root first: - -*Install LAME* -Download from LAME site <http://lame.sourceforge.net/>, type the -following command to compile and install it: - -./configure --enable-shared --prefix=/usr -make -make install - -enable-shared to make sure FFmpeg can use LAME later. Type /lame/ in -command line to see help after install succeed. - -*Note*: you can also use /yum/ to install FFmpeg, it will install -dependency LAME, too, so you can skip this step. - -yum install ffmpeg - -*Install FFmpeg* -Download from FFmpeg site <http://ffmpeg.sourceforge.net/> through CVS, -type the following command to get the latest copies from CVS and save to -your $home (currenly path after login into consule) with folder name -"ffmpeg": - -cvs -z9 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg --or- -svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg - - -To compile and install it, type the following command: - -./configure --enable-gpl --enable-mp3lame --enable-shared --prefix=/usr -make clean && make -make install - -enable-shared to make sure ffmpeg-php can use FFmpeg later (if you do -not use ffmpeg-php, you do not need --enable-shared --prefix=/usr). Type -/ffmpeg/ in command line to see help after install succeed. - -*Note*: you can also use /yum/ to install FFmpeg: - -yum install ffmpeg - -*Install Ruby* -Download from Ruby site <http://www.ruby-lang.org/en/>, type the -following command to compile and install it: - -./configure -make -make install - -*Install FLVTool2* -Download from FLVTool2 site <http://www.inlet-media.de/flvtool2>, type -the following command to compile and install it: - -ruby setup.rb config -ruby setup.rb setup -sudo ruby setup.rb install - -Type /flvtool2/ in command line to see help after install succeed. - ------------------------------------------------------------------------- - -Installation is completed here. If you want to access video infomation -easily in php, there is a ffmpeg-php -<http://ffmpeg-php.sourceforge.net/> you can try. You can follow the -instruction inside the package to install it. I installed it as a Shared -Extension and did not edit php.ini to add - -extension=ffmpeg.so - -When I try its test_phpvideotoolkit.php to verfiy the installation. I saw an error: - -Unable to load dynamic library './ffmpeg.so' - ./ffmpeg.so: cannot open -shared object file: No such file or directory - -You have to copy ffmpeg.so to your php extension folder, or like me, I -just copy the file to the same folder of the php script is located. - -_Follow up_ - - * FFmpeg usage command <http://luar.com.hk/blog/?p=670> - -_Other Reference_ - - * FFMpeg compiled Windows exe - <http://ffdshow.faireal.net/mirror/ffmpeg/> - * Video and Audio Streaming with Flash and Open Source Tools - <http://klaus.geekserver.net/flash/streaming.html> - * libflv - creating FLV video streams - <http://klaus.geekserver.net/libflv/> - * FLV2MP3 <http://etudiant.epita.fr/~founad_m/flv2mp3/> (Make - FlashCom recorded FLV conversion possible ?!) - * Flash ÊÓƵ(FLV)±àÂë,ת»»,¼ÖÆ,²¥·Å·½°¸Ò»Íø´ò¾¡ - <http://dengjie.com/weblog/comments.asp?post_id=1096> - * Ž×Ì׸÷·NӰƬÞDFLVÓ°Òô™n¹¤¾ß - <http://kyle.jolin.info/tt/index.php?pl=333&ct1=1> - * How To: Convert audio to another format on a web page - <http://www.gadberry.com/aaron/2005/12/16/how-to-convert-audio-to-another-format-from-a-form-on-a-web-page/> - (with installation guide, php code sample) diff --git a/libraries/phpvideotoolkit/LICENSE b/libraries/phpvideotoolkit/LICENSE deleted file mode 100644 index 944070e..0000000 --- a/libraries/phpvideotoolkit/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -PHPVideoToolkit Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: The above copyright -notice and this permission notice shall be included in all copies or -substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/README b/libraries/phpvideotoolkit/README deleted file mode 100644 index 6498fb8..0000000 --- a/libraries/phpvideotoolkit/README +++ /dev/null @@ -1,36 +0,0 @@ ------------ -ABOUT ------------ -The new home of ffmpeg is located at Sourceforge. Whilst I will make every effort to update -the files at every location it is updated you should always check the Sourceforge repository -for the latest version. - -http://sourceforge.net/projects/phpvideotoolkit - ------------ -INSTALL ------------ -See INSTALL for help installing ffmpeg and the other binaries. - ------------ -DEMOS ------------ -See DEMOS for more information about ffmpeg demos - ------------ -CHANGES ------------ -See CHANGELOG for version changes. - ------------ -LICENSE ------------ -The PHPVideoToolkit class, the VideoTo adapter class, the FFmpeg-PHP adapter classes and all -associated examples are subject to the a BSD license. See LICENSE for full information. - - -Regards, -bugged - - -/* SVN FILE: $Id$ */ diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_animated_gif.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_animated_gif.php deleted file mode 100644 index da4808a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_animated_gif.php +++ /dev/null @@ -1,243 +0,0 @@ -<?php - - /** - * This is a pure php emulation of the PHP module FFmpeg-PHP. - * There is one extra function here. ffmpeg_animated_gif::saveNow(); - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * @uses GifEncoder - * - @link http://www.phpclasses.org/browse/package/3163.html - * - @link http://phpclasses.gifs.hu/show.php?src=GIFEncoder.class.php - * - @author László Zsidi - * - @license Freeware. - * @see ffmpeg-php, - * - @link http://ffmpeg-php.sourceforge.net/ - * - @author Todd Kirby. - * - all phpdoc documentation is lifted directly from the ffmpeg-php docs - */ - - if(!defined('DS')) - { - define('DS', DIRECTORY_SEPARATOR); - } - - class ffmpeg_animated_gif - { - - private $_frames = array(); - private $_width = null; - private $_height = null; - private $_frame_rate = null; - private $_loop_count = null; - private $_output_file_path = null; - private $_toolkit_class = null; - private $_unlink_files = array(); - private $_saved = false; - - /** - * Class Constructor - * Create a new ffmpeg_animated_gif object. - * @param resource $output_file_path Location in the filesystem where the animated gif will be written. - * @param resource $width Width of the animated gif. - * @param resource $height Height of the animated gif. - * @param resource $frame_rate Frame rate of the animated gif in frames per second. - * @param resource $loop_count Number of times to loop the animation. Put a zero here to loop forever or omit this parameter to disable looping. - */ - function __construct($output_file_path, $width, $height, $frame_rate, $loop_count=false) - { - $this->_output_file_path = $output_file_path; - $this->_width = $width; - $this->_height = $height; - $this->_frame_rate = $frame_rate; - $this->_loop_count = $loop_count; - } - - /** - * Class Destructor - * saves the file - */ - function __destruct() - { -// save the output - $this->saveNow(); -// destroy all image resources - if(count($this->_frames)) - { - foreach($this->_frames as $key=>$frame) - { - imagedestroy($frame->toGDImage()); - } - } -// loop through the temp files to remove - if(!empty($this->_unlink_files)) - { - foreach ($this->_unlink_files as $key=>$file) - { - @unlink($file); - } - $this->_unlink_files = array(); - } - } - - /** - * This function IS NOT PROVIDED IN FFMPEG-PHP as it creates the gif as frames are added. to save memory in - * php and practicality purposes this isn't really possible. It will overwrite any file. - * @access public - * @uses GifEncoder - * - @link http://www.phpclasses.org/browse/package/3163.html - * - @link http://phpclasses.gifs.hu/show.php?src=GIFEncoder.class.php - * - @author László Zsidi - * - @license Freeware. - * @param string $tmp_directory The temp directory to work with. (remember the trailing slash) - * @return boolean - */ - public function saveNow($tmp_directory='/tmp/') - { - if($this->_saved === false) - { - $this->_saved = true; -// check there are frames to make a gif - if(!count($this->_frames)) - { - return false; - } - if(!class_exists('GIFEncoder')) - { - require_once dirname(__FILE__).DS.'gifencoder'.DS.'GIFEncoder.class.phpvideotoolkit.php'; - } -// save all the images from the ffmpeg_frames - $files = array(); - $delays = array(); - $delay = (1/$this->_frame_rate)*100; - foreach($this->_frames as $key=>$frame) - { - $file = $tmp_directory.'fag-'.uniqid(time().'-').'.gif'; - if(!imagegif($frame->toGDImage(), $file)) - { - return false; - } -// add file to array so it out deletes on close - array_push($this->_unlink_files, $file); - array_push($files, $file); - array_push($delays, $delay); - } -// convert the images - $gif = new GIFEncoder($files, $delays, $this->_loop_count, 2, 0, 0, 0, 0, 'url'); - $gif_data = $gif->GetAnimation(); - if(!$gif_data) - { - return false; - } -// write the gif - if (!$handle = fopen($this->_output_file_path, 'w')) - { - return false; - } - if (fwrite($handle, $gif_data) === false) - { - return false; - } - fclose($handle); - return true; - } - return false; - } -// NOTE this provides a way to do it through pure PHPVideoToolkit class, however when ffmpeg creates animated gifs it uses a -// limited colour palette for some stupid reason so the gifs created look rubbish. -// public function saveNow($tmp_directory='/tmp/') -// { -// if($this->_saved === false) -// { -// $this->_saved = true; -// // check there are frames to make a gif -// if(!count($this->_frames)) -// { -// return false; -// } -// if($this->_toolkit !== null) -// { -// $this->_toolkit->reset(); -// } -// else -// { -// // get the ffmpeg class -// require_once dirname(dirname(dirname(__FILE__))).DS.'phpvideotoolkit.php5.php'; -// $this->_toolkit = new PHPVideoToolkit($tmp_directory); -// } -// // save all the images from the ffmpeg_frames -// $files = array(); -// foreach($this->_frames as $key=>$frame) -// { -// $file = $tmp_directory.'fag-'.$this->_toolkit->unique().'.jpg'; -// if(!imagejpeg($frame->toGDImage(), $file, 80)) -// { -// return false; -// } -// // add file to array so it out deletes on close -// array_push($this->_unlink_files, $file); -// array_push($files, $file); -// } -// // print_r($files); -// // prepare these images for conversion into a movie/gif -// $result = $this->_toolkit->prepareImagesForConversionToVideo($files); -// if(!$result) -// { -// return false; -// } -// // set the width and height -// $this->_toolkit->setVideoOutputDimensions($this->_width, $this->_height); -// // set the frame rate -// $this->_toolkit->addCommand('-inputr', $this->_frame_rate); -// // set the looping -// $this->_toolkit->setGifLoops($this->_loop_count); -// // set the output parameters -// $output_path_info = pathinfo($this->_output_file_path); -// $result = $this->_toolkit->setOutput($output_path_info['dirname'].'/', $output_path_info['basename'], PHPVideoToolkit::OVERWRITE_EXISTING); -// if(!$result) -// { -// return false; -// } -// // execute the ffmpeg command -// $result = $this->_toolkit->execute(); -// print_r($this->_toolkit->getLastCommand()); -// if(!$result) -// { -// return false; -// } -// return true; -// } -// return false; -// } - - /** - * Add a frame to the end of the animated gif. - * @access public - * @param resource $output_file_path The ffmpeg_frame object to add to the end of the animated gif. - * @param boolean $save If true the gif will save after the frame has been added. - * NOTE: this param does not feature in the actuall ffmpeg-php module. - * @return boolean - */ - public function addFrame($frame_to_add, $save=false) - { - if(get_class($frame_to_add) == 'ffmpeg_frame' && $frame_to_add->hasValidResource()) - { - array_push($this->_frames, $frame_to_add); - $this->_saved = false; - return $save === true ? $this->saveNow() : true; - } - return false; - } - - }
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_frame.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_frame.php deleted file mode 100644 index 7928e2c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_frame.php +++ /dev/null @@ -1,223 +0,0 @@ -<?php - - /** - * This is a pure php emulation of the PHP module FFmpeg-PHP. - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * @see ffmpeg-php, - * - @link http://ffmpeg-php.sourceforge.net/ - * - @author Todd Kirby. - * - all phpdoc documentation is lifted directly from the ffmpeg-php docs - */ - - class ffmpeg_frame - { - - private $_gd_resource = null; - private $_width = null; - private $_height = null; - private $_timecode = null; - - /** - * Class Constructor - * @param resource $gd_resource A GD image resource. - * @param integer $_time (private) The time in seconds of the frame in the parent movie set from ffmpeg_movie::getFrame() - */ - function __construct($gd_resource, $_timecode) - { - $this->_gd_resource = $gd_resource; - $this->_timecode = $_timecode; - $this->_width = imagesx($gd_resource); - $this->_height = imagesy($gd_resource); - } - - function __destruct() - { - if(is_resource($this->_gd_resource)) - { - imagedestroy($this->_gd_resource); - } - } - - /** - * Determines if the resource supplied to the frame is valid. - * @access public - * @return integer - */ - public function hasValidResource() - { - return is_resource($this->_gd_resource); - } - - /** - * Return the width of the frame. - * @access public - * @return integer - */ - public function getWidth() - { - return $this->_width; - } - - /** - * Return the height of the frame. - * @access public - * @return integer - */ - public function getHeight() - { - return $this->_height; - } - - /** - * Return the presentation time stamp of the frame. - * @access public - * @uses ffmpeg_frame::getPTS() - * @return integer - */ - public function getPresentationTimestamp() - { - return $this->getPTS(); - } - - /** - * Return the presentation time stamp of the frame. - * @access public - * @return integer - */ - public function getPTS() - { - return $this->_timecode; - } - - /** - * Determines if the current frame is a keyframe. - * @access public - * @return integer - */ - public function isKeyFrame() - { - return false; - } - - /** - * Resize and optionally crop the frame. (Cropping is built into ffmpeg resizing so I'm providing it here for completeness.) - * NOTE 1: Cropping is always applied to the frame before it is resized. - * NOTE 2: Crop values must be even numbers. - * @access public - * @param integer $width New width of the frame (must be an even number). - * @param integer $height New height of the frame (must be an even number). - * @param integer $crop_top Remove [croptop] rows of pixels from the top of the frame. - * @param integer $crop_bottom Remove [cropbottom] rows of pixels from the bottom of the frame. - * @param integer $crop_left Remove [cropleft] rows of pixels from the left of the frame. - * @param integer $crop_right Remove [cropright] rows of pixels from the right of the frame. - * @return boolean - */ - public function resize($width, $height, $crop_top=false, $crop_bottom=false, $crop_left=false, $crop_right=false) - { -// are we cropping? - if($crop_top !== false || $crop_bottom !== false || $crop_left !== false || $crop_right !== false) - { -// crop and check it went ok - if(!$this->crop($crop_top, $crop_bottom, $crop_left, $crop_right)) - { - return false; - } - } -// check the width and height - if($width <= 0 || $height <= 0) - { - return false; - } -// now resize what we have - $resize_resource = imagecreatetruecolor($width, $height); -// copy the portion we want - imagecopyresampled($resize_resource, $this->_gd_resource, 0, 0, 0, 0, $width, $height, $this->_width, $this->_height); -// destroy the old crop resource to free up memory - imagedestroy($this->_gd_resource); -// save the new resource - $this->_gd_resource = $resize_resource; -// update the saved width and height - $this->_width = $width; - $this->_height = $height; - return true; - } - - /** - * Crop the frame. - * @access public - * @param integer $crop_top Remove [croptop] rows of pixels from the top of the frame. - * @param integer $crop_bottom Remove [cropbottom] rows of pixels from the bottom of the frame. - * @param integer $crop_left Remove [cropleft] rows of pixels from the left of the frame. - * @param integer $crop_right Remove [cropright] rows of pixels from the right of the frame. - * @return boolean - */ - public function crop($crop_top=false, $crop_bottom=false, $crop_left=false, $crop_right=false) - { -// work out the newwidth and height and positions - $w = $this->_width; - $h = $this->_height; - $x = 0; - $y = 0; - $x_bottom_chord = 0; - if($crop_top !== false) - { - $x = $crop_top; - $h -= $crop_top; - } - if($crop_bottom !== false) - { - $h -= $crop_bottom; - } - if($crop_left !== false) - { - $y = $crop_left; - $w -= $crop_left; - } - if($crop_right !== false) - { - $w -= $crop_left; - } -// is the width and height greater than 0 - if($w < 0 || $h < 0) - { - return false; - } -// create the new image resource - $crop_resource = imagecreatetruecolor($w, $h); -// copy the portion we want - imagecopyresampled($crop_resource, $this->_gd_resource, 0, 0, $x, $y, $w, $h, $w, $h); -// destroy the old resource to free up memory - imagedestroy($this->_gd_resource); -// save the new resource - $this->_gd_resource = $crop_resource; -// update the saved width and height - $this->_width = $w; - $this->_height = $h; - return true; - } - - /** - * Returns a truecolor GD image of the frame. - * @access public - * @return integer - */ - public function toGDImage() - { - return $this->_gd_resource; - } - - } -
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_movie.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_movie.php deleted file mode 100644 index a0a2219..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/ffmpeg_movie.php +++ /dev/null @@ -1,473 +0,0 @@ -<?php - - /** - * This is a pure php emulation of the PHP module FFmpeg-PHP. - * NOTE: Please note whenever possible you should use ffmpeg-php as it is much more efficient than this pure PHP emulation. - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * @uses php-reader - * - @link http://code.google.com/p/php-reader/ - * - @author Sven Vollbehr <svollbehr@gmail.com> - * - @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @see ffmpeg-php, - * - @link http://ffmpeg-php.sourceforge.net/ - * - @author Todd Kirby. - * - all phpdoc documentation is lifted directly from the ffmpeg-php docs - */ - - if(!defined('DS')) - { - define('DS', DIRECTORY_SEPARATOR); - } - - class ffmpeg_movie - { - - private $_frame_index = 1; - private $_toolkit = null; - private $_media_data = null; - private $_php_reader = null; - private $_path_to_media = null; - private $_tmp_directory = null; - - /** - * Class Constructor - * @param string $path_to_media The path to the media file you want to use. - * @param string $persistent (not used in this class - but exists to emulate the ffmpeg-php module) - * @param string $tmp_directory The temp directory to which to work from. (This is only required by this class - * and not by ffmpeg-php so some minor hacking of your scripts may need to be done). (remember the trailing slash) - */ - function __construct($path_to_media, $persistent=false, $tmp_directory='/tmp/') - { -// store the media path - $this->_path_to_media = $path_to_media; - $this->_tmp_directory = $tmp_directory; -// init PHPVideoToolkit class - require_once dirname(dirname(dirname(__FILE__))).DS.'phpvideotoolkit.php5.php'; - $this->_toolkit = new PHPVideoToolkit($tmp_directory); - $this->_toolkit->on_error_die = false; -// set the input - $this->_toolkit->setInputFile($path_to_media); - $this->_media_data = $this->_toolkit->getFileInfo(); -// print_r($this->_media_data); - } - - /** - * Access and returns the id3 information using getID3. - * @access private - * @return boolean true if the information was able to be retrieved, false if not - */ - private function _getPHPReader() - { - if($this->_php_reader === null) - { - $this->_php_reader = -1; - $php_reader = dirname(__FILE__).DS.'php-reader'.DS.'src'.DS.'ID3v1.php'; - if(is_file($php_reader)) - { - require_once $php_reader; - try - { - $this->_php_reader = new ID3v1($this->_path_to_media); - } - catch (Exception $e) - { - return false; - } - return true; - } - } - return $this->_php_reader !== -1; - } - - /** - * Return the duration of a movie or audio file in seconds. - * @access public - * @return integer - */ - public function getDuration() - { - return $this->_media_data['duration']['seconds']; - } - - /** - * Return the number of frames in a movie or audio file. - * @access public - * @return integer - */ - public function getFrameCount() - { - return $this->hasVideo() ? $this->_media_data['video']['frame_count'] : -1; - } - - /** - * Return the frame rate of a movie in fps. - * @access public - * @return integer - */ - public function getFrameRate() - { - return $this->hasVideo() ? $this->_media_data['video']['frame_rate'] : -1; - } - - /** - * Return the path and name of the movie file or audio file. - * @access public - * @return string - */ - public function getFilename() - { - return basename($this->_path_to_media); - } - - /** - * Makes checks and returns the id3 element value. - * @access private - * @return mixed string | -1 - */ - private function _getPHPReaderElement($element) - { - if($this->hasAudio()) - { - if($this->_getPHPReader() && isset($this->_php_reader->{$element})) - { - return $this->_php_reader->{$element}; - } - } - return -1; - } - - /** - * Return the comment field from the movie or audio file. - * Returns -1 on failure. - * @access public - * @return mixed array | -1 - */ - public function getComment() - { - return $this->_getPHPReaderElement('comment'); - } - - /** - * Return the title field from the movie or audio file. - * Returns -1 on failure. - * @access public - * @return string - */ - public function getTitle() - { - return $this->_getPHPReaderElement('title'); - } - - /** - * Return the copyright field from the movie or audio file. - * @access public - * @return string - */ - public function getCopyright() - { - return $this->_getPHPReaderElement('copyright'); - } - - /** - * Return the author field from the movie or the artist ID3 field from an mp3 file. - * @uses ffmpeg_movie::getArtist(); - * @access public - * @return string - */ - public function getAuthor() - { - return $this->getArtist(); - } - - /** - * Return the artist ID3 field from an mp3 file. - * @access public - * @return string - */ - public function getArtist() - { - return $this->_getPHPReaderElement('artist'); - } - - /** - * Return the album ID3 field from an mp3 file. - * @access public - * @return string - */ - public function getAlbum() - { - return $this->_getPHPReaderElement('album'); - } - - /** - * Return the genre ID3 field from an mp3 file. - * @access public - * @return string - */ - public function getGenre() - { - return $this->_getPHPReaderElement('genre'); - } - - /** - * Return the track ID3 field from an mp3 file. - * @access public - * @return integer - */ - public function getTrackNumber() - { - return $this->_getPHPReaderElement('track'); - } - - /** - * Return the year ID3 field from an mp3 file. - * @access public - * @return integer - */ - public function getYear() - { - return $this->_getPHPReaderElement('year'); - } - - /** - * Return the height of the movie in pixels. - * @access public - * @return integer - */ - public function getFrameHeight() - { - return $this->hasVideo() && isset($this->_media_data['video']['dimensions']) ? $this->_media_data['video']['dimensions']['height'] : -1; - } - - /** - * Return the width of the movie in pixels. - * @access public - * @return integer - */ - public function getFrameWidth() - { - return $this->hasVideo() && isset($this->_media_data['video']['dimensions']) ? $this->_media_data['video']['dimensions']['width'] : -1; - } - - /** - * Return the pixel format of the movie. - * @access public - * @return mixed string | -1 - */ - public function getPixelFormat() - { - return $this->hasVideo() ? $this->_media_data['video']['pixel_format'] : -1; - } - - /** - * Return the pixel aspect ratio of the movie - * @access public - * @return integer - */ - public function getPixelAspectRatio() - { - return -1; - } - - /** - * Return the bit rate of the movie or audio file in bits per second. - * @access public - * @return integer - */ - public function getBitRate() - { - return isset($this->_media_data['bitrate']) ? $this->_media_data['bitrate'] : -1; - } - - /** - * Return the bit rate of the video in bits per second. - * NOTE: This only works for files with constant bit rate. - * @access public - * @return integer - */ - public function getVideoBitRate() - { - return $this->hasVideo() && isset($this->_media_data['video']['bitrate']) ? $this->_media_data['video']['bitrate'] : -1; - } - - /** - * Return the audio bit rate of the media file in bits per second. - * @access public - * @return integer - */ - public function getAudioBitRate() - { - return $this->hasAudio() && isset($this->_media_data['audio']['bitrate']) ? $this->_media_data['audio']['bitrate'] : -1; - } - - /** - * Return the audio sample rate of the media file in bits per second. - * @access public - * @return integer - */ - public function getAudioSampleRate() - { - return $this->hasAudio() && isset($this->_media_data['audio']['sample_rate']) ? $this->_media_data['audio']['sample_rate'] : -1; - } - - /** - * Return the name of the video codec used to encode this movie as a string. - * @access public - * @param boolean $return_all If true it will return all audio codecs found. - * @return mixed string | array - */ - public function getVideoCodec($return_all=false) - { - return $this->hasVideo() ? $this->_media_data['video']['codec'] : -1; - } - - /** - * Return the name of the audio codec used to encode this movie as a string. - * @access public - * @param boolean $return_all If true it will return all audio codecs found. - * @return mixed string | array - */ - public function getAudioCodec() - { - return $this->hasAudio() ? $this->_media_data['audio']['codec'] : -1; - } - - /** - * Return the number of audio channels in this movie as an integer. - * @access public - * @return integer - */ - public function getAudioChannels() - { - if($this->hasAudio()) - { - if($this->_getPHPReader() && isset($this->_getid3_data['audio']) && isset($this->_getid3_data['audio']['channels'])) - { - return $this->_getid3_data['audio']['channels']; - } - return 1; - } - return 0; - } - - /** - * Return boolean value indicating whether the movie has an audio stream. - * @access public - * @return boolean - */ - public function hasAudio() - { - return isset($this->_media_data['audio']); - } - - /** - * Return boolean value indicating whether the movie has a video stream. - * @access public - * @return boolean - */ - public function hasVideo() - { - return isset($this->_media_data['video']); - } - - /** - * Returns a frame from the movie as an ffmpeg_frame object. - * Returns false if the frame was not found. - * @access public - * @return mixed boolean | ffmpeg_frame - */ - public function getFrame($frame_number=false) - { - if(!$this->hasVideo()) - { - return false; - } - $this->_toolkit->reset(true); - require_once dirname(__FILE__).DS.'ffmpeg_frame.php'; - if(!$frame_number) - { - $frame_number = $this->_frame_index; - $this->_frame_index += 1; - } - else - { - $this->_frame_index = $frame_number; - } -// check the frame required exists in the video - if($frame_number > $this->getFrameCount()) - { - return false; - } -// work out the exact frame to take - $frame_rate = $this->getFrameRate(); -// generate a unique name - $tmp_name = $this->_toolkit->unique().'-%index.jpg'; -// extract the frame -// print_r(array($frame_number, $frame_rate, '%ft')); - $this->_toolkit->extractFrame($frame_number, $frame_rate, '%ft'); - $this->_toolkit->setOutput($this->_tmp_directory, $tmp_name, PHPVideoToolkit::OVERWRITE_EXISTING); - $result = $this->_toolkit->execute(false, true); -// check the image has been outputted -// print_r(array($this->_toolkit->getLastError(), $this->_toolkit->getLastCommand())); -// print_r(array($this->_toolkit->getLastCommand())); -// print_r(array($tmp_name, $this->_toolkit->getLastOutput())); - if($result !== PHPVideoToolkit::RESULT_OK) - { - return false; - } -// load the frame into gd - $temp_output = array_shift(array_flip($this->_toolkit->getLastOutput())); - $gd_img = imagecreatefromjpeg($temp_output); -// delete the temp image - unlink($temp_output); -// return the ffmpeg frame instance - $ffmpeg_frame_time = $this->_toolkit->formatTimecode($frame_number, '%ft', '%hh:%mm:%ss.%ms', $frame_rate); - return new ffmpeg_frame($gd_img, $ffmpeg_frame_time); - } - - /** - * Note; this doesn't behave exactly as ffmpeg_movie, this will get the first frame - * of the next second in the movie. - * Returns the next key frame from the movie as an ffmpeg_frame object. - * Returns false if the frame was not found. - * @uses ffmpeg_movie::getFrame(); - * @access public - * @return mixed boolean | ffmpeg_frame - */ - public function getNextKeyFrame() - { - $frame_rate = $this->getFrameRate(); -// work out the next frame - $current_second = floor($frame_number/$frame_rate); - $excess = $frame_number-($seconds * $frame_rate); - $frames_to_next = $frame_rate-$excess; - $this->_frame_index += $frames_to_next; -// get the frame - return $this->getFrame(); - } - - /** - * Return the current frame index. - * @access public - * @return integer - */ - public function getFrameNumber() - { - return $this->_frame_index; - } - - } -
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.php deleted file mode 100644 index 0c38b02..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.php +++ /dev/null @@ -1,267 +0,0 @@ -<?php -/* -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: GIFEncoder Version 3.0 by László Zsidi, http://gifs.hu -:: -:: This class is a rewritten 'GifMerge.class.php' version. -:: -:: Modification: -:: - Simplified and easy code, -:: - Ultra fast encoding, -:: - Built-in errors, -:: - Stable working -:: -:: -:: Updated at 2007. 02. 13. '00.05.AM' -:: -:: -:: -:: Try on-line GIFBuilder Form demo based on GIFEncoder. -:: -:: http://gifs.hu/phpclasses/demos/GifBuilder/ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -*/ - -Class GIFEncoder { - var $GIF = "GIF89a"; /* GIF header 6 bytes */ - var $VER = "GIFEncoder V3.00"; /* Encoder version */ - - var $BUF = Array ( ); - var $OFS = Array ( ); - var $SIG = 0; - var $LOP = 0; - var $DIS = 2; - var $COL = -1; - var $IMG = -1; - - var $ERR = Array ( - ERR00=>"Does not supported function for only one image!", - ERR01=>"Source is not a GIF image!", - ERR02=>"Unintelligible flag ", - ERR03=>"Does not make animation from animated GIF source", - ); - - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFEncoder... - :: - */ - function GIFEncoder ( - $GIF_src, $GIF_dly, $GIF_lop, $GIF_dis, - $GIF_red, $GIF_grn, $GIF_blu, $GIF_ofs, - $GIF_mod - ) { - if ( ! is_array ( $GIF_src ) && ! is_array ( $GIF_dly ) ) { - printf ( "%s: %s", $this->VER, $this->ERR [ 'ERR00' ] ); - exit ( 0 ); - } - if ( is_array ( $GIF_ofs ) && count ( $GIF_ofs ) > 1 ) { - $this->SIG = 1; - $this->OFS = $GIF_ofs; - } - $this->LOP = ( $GIF_lop > -1 ) ? $GIF_lop : 0; - $this->DIS = ( $GIF_dis > -1 ) ? ( ( $GIF_dis < 3 ) ? $GIF_dis : 3 ) : 2; - $this->COL = ( $GIF_red > -1 && $GIF_grn > -1 && $GIF_blu > -1 ) ? - ( $GIF_red | ( $GIF_grn << 8 ) | ( $GIF_blu << 16 ) ) : -1; - - for ( $i = 0; $i < count ( $GIF_src ); $i++ ) { - if ( strToLower ( $GIF_mod ) == "url" ) { - $this->BUF [ ] = fread ( fopen ( $GIF_src [ $i ], "rb" ), filesize ( $GIF_src [ $i ] ) ); - } - else if ( strToLower ( $GIF_mod ) == "bin" ) { - $this->BUF [ ] = $GIF_src [ $i ]; - } - else { - printf ( "%s: %s ( %s )!", $this->VER, $this->ERR [ 'ERR02' ], $GIF_mod ); - exit ( 0 ); - } - if ( substr ( $this->BUF [ $i ], 0, 6 ) != "GIF87a" && substr ( $this->BUF [ $i ], 0, 6 ) != "GIF89a" ) { - printf ( "%s: %d %s", $this->VER, $i, $this->ERR [ 'ERR01' ] ); - exit ( 0 ); - } - for ( $j = ( 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ) ), $k = TRUE; $k; $j++ ) { - switch ( $this->BUF [ $i ] { $j } ) { - case "!": - if ( ( substr ( $this->BUF [ $i ], ( $j + 3 ), 8 ) ) == "NETSCAPE" ) { - printf ( "%s: %s ( %s source )!", $this->VER, $this->ERR [ 'ERR03' ], ( $i + 1 ) ); - exit ( 0 ); - } - break; - case ";": - $k = FALSE; - break; - } - } - } - GIFEncoder::GIFAddHeader ( ); - for ( $i = 0; $i < count ( $this->BUF ); $i++ ) { - GIFEncoder::GIFAddFrames ( $i, $GIF_dly [ $i ] ); - } - GIFEncoder::GIFAddFooter ( ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddHeader... - :: - */ - function GIFAddHeader ( ) { - $cmap = 0; - - if ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x80 ) { - $cmap = 3 * ( 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ) ); - - $this->GIF .= substr ( $this->BUF [ 0 ], 6, 7 ); - $this->GIF .= substr ( $this->BUF [ 0 ], 13, $cmap ); - $this->GIF .= "!\377\13NETSCAPE2.0\3\1" . GIFEncoder::GIFWord ( $this->LOP ) . "\0"; - } - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddFrames... - :: - */ - function GIFAddFrames ( $i, $d ) { - - $Locals_str = 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ); - - $Locals_end = strlen ( $this->BUF [ $i ] ) - $Locals_str - 1; - $Locals_tmp = substr ( $this->BUF [ $i ], $Locals_str, $Locals_end ); - - $Global_len = 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ); - $Locals_len = 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ); - - $Global_rgb = substr ( $this->BUF [ 0 ], 13, - 3 * ( 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ) ) ); - $Locals_rgb = substr ( $this->BUF [ $i ], 13, - 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ) ); - - $Locals_ext = "!\xF9\x04" . chr ( ( $this->DIS << 2 ) + 0 ) . - chr ( ( $d >> 0 ) & 0xFF ) . chr ( ( $d >> 8 ) & 0xFF ) . "\x0\x0"; - - if ( $this->COL > -1 && ord ( $this->BUF [ $i ] { 10 } ) & 0x80 ) { - for ( $j = 0; $j < ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ); $j++ ) { - if ( - ord ( $Locals_rgb { 3 * $j + 0 } ) == ( ( $this->COL >> 16 ) & 0xFF ) && - ord ( $Locals_rgb { 3 * $j + 1 } ) == ( ( $this->COL >> 8 ) & 0xFF ) && - ord ( $Locals_rgb { 3 * $j + 2 } ) == ( ( $this->COL >> 0 ) & 0xFF ) - ) { - $Locals_ext = "!\xF9\x04" . chr ( ( $this->DIS << 2 ) + 1 ) . - chr ( ( $d >> 0 ) & 0xFF ) . chr ( ( $d >> 8 ) & 0xFF ) . chr ( $j ) . "\x0"; - break; - } - } - } - switch ( $Locals_tmp { 0 } ) { - case "!": - $Locals_img = substr ( $Locals_tmp, 8, 10 ); - $Locals_tmp = substr ( $Locals_tmp, 18, strlen ( $Locals_tmp ) - 18 ); - break; - case ",": - $Locals_img = substr ( $Locals_tmp, 0, 10 ); - $Locals_tmp = substr ( $Locals_tmp, 10, strlen ( $Locals_tmp ) - 10 ); - break; - } - if ( ord ( $this->BUF [ $i ] { 10 } ) & 0x80 && $this->IMG > -1 ) { - if ( $Global_len == $Locals_len ) { - if ( GIFEncoder::GIFBlockCompare ( $Global_rgb, $Locals_rgb, $Global_len ) ) { - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_tmp ); - } - else { - /* - * - * XY Padding... - * - */ - if ( $this->SIG == 1 ) { - $Locals_img { 1 } = chr ( $this->OFS [ $i ] [ 0 ] & 0xFF ); - $Locals_img { 2 } = chr ( ( $$this->OFS [ $i ] [ 0 ] & 0xFF00 ) >> 8 ); - $Locals_img { 3 } = chr ( $this->OFS [ $i ] [ 1 ] & 0xFF ); - $Locals_img { 4 } = chr ( ( $this->OFS [ $i ] [ 1 ] & 0xFF00 ) >> 8 ); - } - $byte = ord ( $Locals_img { 9 } ); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ); - $Locals_img { 9 } = chr ( $byte ); - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp ); - } - } - else { - /* - * - * XY Padding... - * - */ - if ( $this->SIG == 1 ) { - $Locals_img { 1 } = chr ( $this->OFS [ $i ] [ 0 ] & 0xFF ); - $Locals_img { 2 } = chr ( ( $$this->OFS [ $i ] [ 0 ] & 0xFF00 ) >> 8 ); - $Locals_img { 3 } = chr ( $this->OFS [ $i ] [ 1 ] & 0xFF ); - $Locals_img { 4 } = chr ( ( $this->OFS [ $i ] [ 1 ] & 0xFF00 ) >> 8 ); - } - $byte = ord ( $Locals_img { 9 } ); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ); - $Locals_img { 9 } = chr ( $byte ); - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp ); - } - } - else { - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_tmp ); - } - $this->IMG = 1; - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddFooter... - :: - */ - function GIFAddFooter ( ) { - $this->GIF .= ";"; - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFBlockCompare... - :: - */ - function GIFBlockCompare ( $GlobalBlock, $LocalBlock, $Len ) { - - for ( $i = 0; $i < $Len; $i++ ) { - if ( - $GlobalBlock { 3 * $i + 0 } != $LocalBlock { 3 * $i + 0 } || - $GlobalBlock { 3 * $i + 1 } != $LocalBlock { 3 * $i + 1 } || - $GlobalBlock { 3 * $i + 2 } != $LocalBlock { 3 * $i + 2 } - ) { - return ( 0 ); - } - } - - return ( 1 ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFWord... - :: - */ - function GIFWord ( $int ) { - - return ( chr ( $int & 0xFF ) . chr ( ( $int >> 8 ) & 0xFF ) ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GetAnimation... - :: - */ - function GetAnimation ( ) { - return ( $this->GIF ); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.phpvideotoolkit.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.phpvideotoolkit.php deleted file mode 100644 index 9dbfda7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/gifencoder/GIFEncoder.class.phpvideotoolkit.php +++ /dev/null @@ -1,270 +0,0 @@ -<?php -/* -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: GIFEncoder Version 3.0 by László Zsidi, http://gifs.hu -:: -:: This class is a rewritten 'GifMerge.class.php' version. -:: -:: Modification: -:: - Simplified and easy code, -:: - Ultra fast encoding, -:: - Built-in errors, -:: - Stable working -:: -:: -:: Updated at 2007. 02. 13. '00.05.AM' -:: -:: -:: -:: Try on-line GIFBuilder Form demo based on GIFEncoder. -:: -:: http://gifs.hu/phpclasses/demos/GifBuilder/ -:: -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -*/ - -Class GIFEncoder { - var $GIF = "GIF89a"; /* GIF header 6 bytes */ - var $VER = "GIFEncoder V3.00"; /* Encoder version */ - - var $BUF = Array ( ); - var $OFS = Array ( ); - var $SIG = 0; - var $LOP = 0; - var $DIS = 2; - var $COL = -1; - var $IMG = -1; - - var $ERR = Array ( - 'ERR00'=>"Does not supported function for only one image!", - 'ERR01'=>"Source is not a GIF image!", - 'ERR02'=>"Unintelligible flag ", - 'ERR03'=>"Does not make animation from animated GIF source", - ); - - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFEncoder... - :: - */ - function GIFEncoder ( - $GIF_src, $GIF_dly, $GIF_lop, $GIF_dis, - $GIF_red, $GIF_grn, $GIF_blu, $GIF_ofs, - $GIF_mod - ) { - if ( ! is_array ( $GIF_src ) && ! is_array ( $GIF_dly ) ) { - printf ( "%s: %s", $this->VER, $this->ERR [ 'ERR00' ] ); - exit ( 0 ); - } - if ( is_array ( $GIF_ofs ) && count ( $GIF_ofs ) > 1 ) { - $this->SIG = 1; - $this->OFS = $GIF_ofs; - } - $this->LOP = $GIF_lop === false ? false : (( $GIF_lop > -1 ) ? $GIF_lop : 0); - $this->DIS = ( $GIF_dis > -1 ) ? ( ( $GIF_dis < 3 ) ? $GIF_dis : 3 ) : 2; - $this->COL = ( $GIF_red > -1 && $GIF_grn > -1 && $GIF_blu > -1 ) ? - ( $GIF_red | ( $GIF_grn << 8 ) | ( $GIF_blu << 16 ) ) : -1; - - for ( $i = 0; $i < count ( $GIF_src ); $i++ ) { - if ( strToLower ( $GIF_mod ) == "url" ) { - $this->BUF [ ] = fread ( fopen ( $GIF_src [ $i ], "rb" ), filesize ( $GIF_src [ $i ] ) ); - } - else if ( strToLower ( $GIF_mod ) == "bin" ) { - $this->BUF [ ] = $GIF_src [ $i ]; - } - else { - printf ( "%s: %s ( %s )!", $this->VER, $this->ERR [ 'ERR02' ], $GIF_mod ); - exit ( 0 ); - } - if ( substr ( $this->BUF [ $i ], 0, 6 ) != "GIF87a" && substr ( $this->BUF [ $i ], 0, 6 ) != "GIF89a" ) { - printf ( "%s: %d %s", $this->VER, $i, $this->ERR [ 'ERR01' ] ); - exit ( 0 ); - } - for ( $j = ( 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ) ), $k = TRUE; $k; $j++ ) { - switch ( $this->BUF [ $i ] { $j } ) { - case "!": - if ( ( substr ( $this->BUF [ $i ], ( $j + 3 ), 8 ) ) == "NETSCAPE" ) { - printf ( "%s: %s ( %s source )!", $this->VER, $this->ERR [ 'ERR03' ], ( $i + 1 ) ); - exit ( 0 ); - } - break; - case ";": - $k = FALSE; - break; - } - } - } - GIFEncoder::GIFAddHeader ( ); - for ( $i = 0; $i < count ( $this->BUF ); $i++ ) { - GIFEncoder::GIFAddFrames ( $i, $GIF_dly [ $i ] ); - } - GIFEncoder::GIFAddFooter ( ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddHeader... - :: - */ - function GIFAddHeader ( ) { - $cmap = 0; - - if ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x80 ) { - $cmap = 3 * ( 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ) ); - - $this->GIF .= substr ( $this->BUF [ 0 ], 6, 7 ); - $this->GIF .= substr ( $this->BUF [ 0 ], 13, $cmap ); - if($this->LOP !== false) - { - $this->GIF .= "!\377\13NETSCAPE2.0\3\1" . GIFEncoder::GIFWord ( $this->LOP ) . "\0"; - } - } - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddFrames... - :: - */ - function GIFAddFrames ( $i, $d ) { - - $Locals_str = 13 + 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ); - - $Locals_end = strlen ( $this->BUF [ $i ] ) - $Locals_str - 1; - $Locals_tmp = substr ( $this->BUF [ $i ], $Locals_str, $Locals_end ); - - $Global_len = 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ); - $Locals_len = 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ); - - $Global_rgb = substr ( $this->BUF [ 0 ], 13, - 3 * ( 2 << ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ) ) ); - $Locals_rgb = substr ( $this->BUF [ $i ], 13, - 3 * ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ) ); - - $Locals_ext = "!\xF9\x04" . chr ( ( $this->DIS << 2 ) + 0 ) . - chr ( ( $d >> 0 ) & 0xFF ) . chr ( ( $d >> 8 ) & 0xFF ) . "\x0\x0"; - - if ( $this->COL > -1 && ord ( $this->BUF [ $i ] { 10 } ) & 0x80 ) { - for ( $j = 0; $j < ( 2 << ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ) ); $j++ ) { - if ( - ord ( $Locals_rgb { 3 * $j + 0 } ) == ( ( $this->COL >> 16 ) & 0xFF ) && - ord ( $Locals_rgb { 3 * $j + 1 } ) == ( ( $this->COL >> 8 ) & 0xFF ) && - ord ( $Locals_rgb { 3 * $j + 2 } ) == ( ( $this->COL >> 0 ) & 0xFF ) - ) { - $Locals_ext = "!\xF9\x04" . chr ( ( $this->DIS << 2 ) + 1 ) . - chr ( ( $d >> 0 ) & 0xFF ) . chr ( ( $d >> 8 ) & 0xFF ) . chr ( $j ) . "\x0"; - break; - } - } - } - switch ( $Locals_tmp { 0 } ) { - case "!": - $Locals_img = substr ( $Locals_tmp, 8, 10 ); - $Locals_tmp = substr ( $Locals_tmp, 18, strlen ( $Locals_tmp ) - 18 ); - break; - case ",": - $Locals_img = substr ( $Locals_tmp, 0, 10 ); - $Locals_tmp = substr ( $Locals_tmp, 10, strlen ( $Locals_tmp ) - 10 ); - break; - } - if ( ord ( $this->BUF [ $i ] { 10 } ) & 0x80 && $this->IMG > -1 ) { - if ( $Global_len == $Locals_len ) { - if ( GIFEncoder::GIFBlockCompare ( $Global_rgb, $Locals_rgb, $Global_len ) ) { - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_tmp ); - } - else { - /* - * - * XY Padding... - * - */ - if ( $this->SIG == 1 ) { - $Locals_img { 1 } = chr ( $this->OFS [ $i ] [ 0 ] & 0xFF ); - $Locals_img { 2 } = chr ( ( $$this->OFS [ $i ] [ 0 ] & 0xFF00 ) >> 8 ); - $Locals_img { 3 } = chr ( $this->OFS [ $i ] [ 1 ] & 0xFF ); - $Locals_img { 4 } = chr ( ( $this->OFS [ $i ] [ 1 ] & 0xFF00 ) >> 8 ); - } - $byte = ord ( $Locals_img { 9 } ); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= ( ord ( $this->BUF [ 0 ] { 10 } ) & 0x07 ); - $Locals_img { 9 } = chr ( $byte ); - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp ); - } - } - else { - /* - * - * XY Padding... - * - */ - if ( $this->SIG == 1 ) { - $Locals_img { 1 } = chr ( $this->OFS [ $i ] [ 0 ] & 0xFF ); - $Locals_img { 2 } = chr ( ( $$this->OFS [ $i ] [ 0 ] & 0xFF00 ) >> 8 ); - $Locals_img { 3 } = chr ( $this->OFS [ $i ] [ 1 ] & 0xFF ); - $Locals_img { 4 } = chr ( ( $this->OFS [ $i ] [ 1 ] & 0xFF00 ) >> 8 ); - } - $byte = ord ( $Locals_img { 9 } ); - $byte |= 0x80; - $byte &= 0xF8; - $byte |= ( ord ( $this->BUF [ $i ] { 10 } ) & 0x07 ); - $Locals_img { 9 } = chr ( $byte ); - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp ); - } - } - else { - $this->GIF .= ( $Locals_ext . $Locals_img . $Locals_tmp ); - } - $this->IMG = 1; - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFAddFooter... - :: - */ - function GIFAddFooter ( ) { - $this->GIF .= ";"; - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFBlockCompare... - :: - */ - function GIFBlockCompare ( $GlobalBlock, $LocalBlock, $Len ) { - - for ( $i = 0; $i < $Len; $i++ ) { - if ( - $GlobalBlock { 3 * $i + 0 } != $LocalBlock { 3 * $i + 0 } || - $GlobalBlock { 3 * $i + 1 } != $LocalBlock { 3 * $i + 1 } || - $GlobalBlock { 3 * $i + 2 } != $LocalBlock { 3 * $i + 2 } - ) { - return ( 0 ); - } - } - - return ( 1 ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GIFWord... - :: - */ - function GIFWord ( $int ) { - - return ( chr ( $int & 0xFF ) . chr ( ( $int >> 8 ) & 0xFF ) ); - } - /* - ::::::::::::::::::::::::::::::::::::::::::::::::::: - :: - :: GetAnimation... - :: - */ - function GetAnimation ( ) { - return ( $this->GIF ); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF.php deleted file mode 100644 index 31516ae..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ASF.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader.php"); -require_once("ASF/Object/Container.php"); -/**#@-*/ - -/** - * This class represents a file in Advanced Systems Format (ASF) as described in - * {@link http://go.microsoft.com/fwlink/?LinkId=31334 The Advanced Systems - * Format (ASF) Specification}. It is a file format that can contain various - * types of information ranging from audio and video to script commands and - * developer defined custom streams. - * - * The ASF file consists of code blocks that are called content objects. Each - * of these objects have a format of their own. They may contain other objects - * or other specific data. Each supported object has been implemented as their - * own classes to ease the correct use of the information. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -class ASF extends ASF_Object_Container -{ - const HEADER = "75b22630-668e-11cf-a6d9-00aa0062ce6c"; - const DATA = "75b22636-668e-11cf-a6d9-00aa0062ce6c"; - const SIMPLE_INDEX = "33000890-e5b1-11cf-89f4-00a0c90349cb"; - const INDEX = "d6e229d3-35da-11d1-9034-00a0c90349be"; - const MEDIA_OBJECT_INDEX = "feb103f8-12ad-4c64-840f-2a1d2f7ad48c"; - const TIMECODE_INDEX = "3cb73fd0-0c4a-4803-953d-edf7b6228f0c"; - - /** @var string */ - private $_filename; - - /** - * Constructs the ASF class with given file and options. - * - * The following options are currently recognized: - * o encoding -- Indicates the encoding that all the texts are presented - * with. By default this is set to utf-8. See the documentation of iconv - * for accepted values. - * o readonly -- Indicates that the file is read from a temporary location - * or another source it cannot be written back to. - * - * @param string $filename The path to the file or file descriptor of an - * opened file. - * @param Array $options The options array. - */ - public function __construct($filename, $options = array()) - { - $this->_reader = new Reader($this->_filename = $filename); - $this->setOptions($options); - if ($this->getOption("encoding", false) === false) - $this->setOption("encoding", "utf-8"); - $this->setOffset(0); - $this->setSize($this->_reader->getSize()); - $this->constructObjects - (array - (self::HEADER => "Header", - self::DATA => "Data", - self::SIMPLE_INDEX => "SimpleIndex", - self::INDEX => "Index", - self::MEDIA_OBJECT_INDEX => "MediaObjectIndex", - self::TIMECODE_INDEX => "TimecodeIndex")); - } - - /** - * Returns the mandatory header object contained in this file. - * - * @return ASF_Object_Header - */ - public function getHeader() - { - $header = $this->getObjectsByIdentifier(self::HEADER); - return $header[0]; - } - - /** - * Returns the mandatory data object contained in this file. - * - * @return ASF_Object_Data - */ - public function getData() - { - $data = $this->getObjectsByIdentifier(self::DATA); - return $data[0]; - } - - /** - * Returns an array of index objects contained in this file. - * - * @return Array - */ - public function getIndices() - { - return $this->getObjectsByIdentifier - (self::SIMPLE_INDEX . "|" . self::INDEX . "|" . - self::MEDIA_OBJECT_INDEX . "|" . self::TIMECODE_INDEX); - } - - /** - * Writes the changes back to the original media file. - * - * Please note: currently the method writes only Content Description and - * Extended Content Description Objects. - */ - public function write() - { - throw new ASF_Exception("Not yet supported"); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Exception.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Exception.php deleted file mode 100644 index c0e58be..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Exception.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Exception.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/** - * The ASF_Exception is thrown whenever an error occurs within the {@link ASF} - * class. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -class ASF_Exception extends Exception -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object.php deleted file mode 100644 index 8a93a7e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object.php +++ /dev/null @@ -1,226 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Object.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Exception.php"); -/**#@-*/ - -/** - * The base unit of organization for ASF files is called the ASF object. It - * consists of a 128-bit GUID for the object, a 64-bit integer object size, and - * the variable-length object data. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -class ASF_Object -{ - /** - * The reader object. - * - * @var Reader - */ - protected $_reader; - - /** - * The options array. - * - * @var Array - */ - protected $_options; - - /** @var integer */ - private $_offset = -1; - - /** @var string */ - private $_id; - - /** @var integer */ - private $_size = -1; - - /** @var ASF_Object */ - private $_parent = null; - - /** - * Constructs the class with given parameters and options. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - $this->_reader = $reader; - $this->_options = $options; - $this->_offset = $this->_reader->getOffset(); - $this->_id = $this->_reader->readGUID(); - $this->_size = $this->_reader->readInt64LE(); - } - - /** - * Returns the file offset to box start, or -1 if the box was created on heap. - * - * @return integer - */ - public function getOffset() { return $this->_offset; } - - /** - * Sets the file offset where the box starts. - * - * @param integer $offset The file offset to box start. - */ - public function setOffset($offset) { $this->_offset = $offset; } - - /** - * Returns the GUID of the ASF object. - * - * @return string - */ - public function getIdentifier() { return $this->_id; } - - /** - * Set the GUID of the ASF object. - * - * @param string $id The GUID - */ - public function setIdentifier($id) { $this->_id = $id; } - - /** - * Returns the object size in bytes, including the header. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Sets the box size. The size must include the header. - * - * @param integer $size The box size. - */ - public function setSize($size) - { - if ($this->_parent !== null) - $this->_parent->setSize - (($this->_parent->getSize() > 0 ? $this->_parent->getSize() : 0) + - $size - ($this->_size > 0 ? $this->_size : 0)); - $this->_size = $size; - } - - /** - * Returns the options array. - * - * @return Array - */ - public function getOptions() { return $this->_options; } - - /** - * Returns the given option value, or the default value if the option is not - * defined. - * - * @param string $option The name of the option. - * @param mixed $defaultValue The default value to be returned. - */ - public function getOption($option, $defaultValue = false) - { - if (isset($this->_options[$option])) - return $this->_options[$option]; - return $defaultValue; - } - - /** - * Sets the options array. See {@link ISO14496} class for available options. - * - * @param Array $options The options array. - */ - public function setOptions(&$options) { $this->_options = $options; } - - /** - * Sets the given option the given value. - * - * @param string $option The name of the option. - * @param mixed $value The value to set for the option. - */ - public function setOption($option, $value) - { - $this->_options[$option] = $value; - } - - /** - * Returns the parent object containing this box. - * - * @return ASF_Object - */ - public function getParent() { return $this->_parent; } - - /** - * Sets the parent containing object. - * - * @param ASF_Object $parent The parent object. - */ - public function setParent(&$parent) { $this->_parent = $parent; } - - /** - * Magic function so that $obj->value will work. - * - * @param string $name The field name. - * @return mixed - */ - public function __get($name) - { - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - throw new ASF_Exception("Unknown field: " . $name); - } - - /** - * Magic function so that assignments with $obj->value will work. - * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed - */ - public function __set($name, $value) - { - if (method_exists($this, "set" . ucfirst($name))) - call_user_func(array($this, "set" . ucfirst($name)), $value); - else throw new ASF_Exception("Unknown field: " . $name); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedContentEncryption.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedContentEncryption.php deleted file mode 100644 index c29561a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedContentEncryption.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: AdvancedContentEncryption.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Advanced Content Encryption Object</i> lets authors protect content by - * using Next Generation Windows Media Digital Rights Management for Network - * Devices. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_AdvancedContentEncryption extends ASF_Object -{ - const WINDOWS_MEDIA_DRM_NETWORK_DEVICES = - "7a079bb6-daa4-4e12-a5ca-91d3 8dc11a8d"; - - /** @var Array */ - private $_contentEncryptionRecords = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - $contentEncryptionRecordsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $contentEncryptionRecordsCount; $i++) { - $entry = array("systemId" => $this->_reader->readGUID(), - "systemVersion" => $this->_reader->readUInt32LE(), - "streamNumbers" => array()); - $encryptedObjectRecordCount = $this->_reader->readUInt16LE(); - for ($j = 0; $j < $encryptedObjectRecordCount; $j++) { - $this->_reader->skip(4); - $entry["streamNumbers"][] = $this->_reader->readUInt16LE(); - } - $dataCount = $this->_reader->readUInt32LE(); - $entry["data"] = $this->_reader->read($dataCount); - $this->_contentEncryptionRecords[] = $entry; - } - } - - /** - * Returns an array of content encryption records. Each record consists of the - * following keys. - * - * o systemId -- Specifies the unique identifier for the content encryption - * system. - * - * o systemVersion -- Specifies the version of the content encryption - * system. - * - * o streamNumbers -- An array of stream numbers a particular Content - * Encryption Record is associated with. - * - * o data -- The content protection data for this Content Encryption Record. - * - * @return Array - */ - public function getContentEncryptionRecords() - { - return $this->_contentEncryptionRecords; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedMutualExclusion.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedMutualExclusion.php deleted file mode 100644 index b883dce..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/AdvancedMutualExclusion.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: AdvancedMutualExclusion.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Advanced Mutual Exclusion Object</i> identifies streams that have a - * mutual exclusion relationship to each other (in other words, only one of the - * streams within such a relationship can be streamed—the rest are ignored). - * There should be one instance of this object for each set of objects that - * contain a mutual exclusion relationship. The exclusion type is used so that - * implementations can allow user selection of common choices, such as language. - * This object must be used if any of the streams in the mutual exclusion - * relationship are hidden. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_AdvancedMutualExclusion extends ASF_Object -{ - const MUTEX_LANGUAGE = "d6e22a00-35da-11d1-9034-00a0c90349be"; - const MUTEX_BITRATE = "d6e22a01-35da-11d1-9034-00a0c90349be"; - const MUTEX_UNKNOWN = "d6e22a02-35da-11d1-9034-00a0c90349be"; - - /** @var string */ - private $_exclusionType; - - /** @var Array */ - private $_streamNumbers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - $this->_exclusionType = $this->_reader->readGUID(); - $streamNumbersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $streamNumbersCount; $i++) - $this->_streamNumbers[] = $this->_reader->readUInt16LE(); - } - - /** - * Returns the nature of the mutual exclusion relationship. - * - * @return string - */ - public function getExclusionType() { return $this->_exclusionType; } - - /** - * Returns an array of stream numbers. - * - * @return Array - */ - public function getStreamNumbers() { return $this->_streamNumbers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BandwidthSharing.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BandwidthSharing.php deleted file mode 100644 index 532ae58..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BandwidthSharing.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: BandwidthSharing.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Bandwidth Sharing Object</i> indicates streams that share bandwidth in - * such a way that the maximum bandwidth of the set of streams is less than the - * sum of the maximum bandwidths of the individual streams. There should be one - * instance of this object for each set of objects that share bandwidth. Whether - * or not this object can be used meaningfully is content-dependent. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_BandwidthSharing extends ASF_Object -{ - const SHARING_EXCLUSIVE = "af6060aa-5197-11d2-b6af-00c04fd908e9"; - const SHARING_PARTIAL = "af6060ab-5197-11d2-b6af-00c04fd908e9"; - - /** @var string */ - private $_sharingType; - - /** @var integer */ - private $_dataBitrate; - - /** @var integer */ - private $_bufferSize; - - /** @var Array */ - private $_streamNumbers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_sharingType = $this->_reader->readGUID(); - $this->_dataBitrate = $this->_reader->readUInt32LE(); - $this->_bufferSize = $this->_reader->readUInt32LE(); - $streamNumbersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $streamNumbersCount; $i++) - $this->_streamNumbers[] = $this->_reader->readUInt16LE(); - } - - /** - * Returns the type of sharing relationship for this object. Two types are - * predefined: SHARING_PARTIAL, in which any number of the streams in the - * relationship may be streaming data at any given time; and - * SHARING_EXCLUSIVE, in which only one of the streams in the relationship - * may be streaming data at any given time. - * - * @return string - */ - public function getSharingType() { return $this->_sharingType; } - - /** - * Returns the leak rate R, in bits per second, of a leaky bucket that - * contains the data portion of all of the streams, excluding all ASF Data - * Packet overhead, without overflowing. The size of the leaky bucket is - * specified by the value of the Buffer Size field. This value can be less - * than the sum of all of the data bit rates in the - * {@link ASF_Object_ExtendedStreamProperties Extended Stream Properties} - * Objects for the streams contained in this bandwidth-sharing relationship. - * - * @return integer - */ - public function getDataBitrate() { return $this->_dataBitrate; } - - /** - * Specifies the size B, in bits, of the leaky bucket used in the Data Bitrate - * definition. This value can be less than the sum of all of the buffer sizes - * in the {@link ASF_Object_ExtendedStreamProperties Extended Stream - * Properties} Objects for the streams contained in this bandwidth-sharing - * relationship. - * - * @return integer - */ - public function getBufferSize() { return $this->_bufferSize; } - - /** - * Returns an array of stream numbers. - * - * @return Array - */ - public function getStreamNumbers() { return $this->_streamNumbers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BitrateMutualExclusion.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BitrateMutualExclusion.php deleted file mode 100644 index 22ca8c9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/BitrateMutualExclusion.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: BitrateMutualExclusion.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Bitrate Mutual Exclusion Object</i> identifies video streams that have - * a mutual exclusion relationship to each other (in other words, only one of - * the streams within such a relationship can be streamed at any given time and - * the rest are ignored). One instance of this object must be present for each - * set of objects that contains a mutual exclusion relationship. All video - * streams in this relationship must have the same frame size. The exclusion - * type is used so that implementations can allow user selection of common - * choices, such as bit rate. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_BitrateMutualExclusion extends ASF_Object -{ - const MUTEX_LANGUAGE = "d6e22a00-35da-11d1-9034-00a0c90349be"; - const MUTEX_BITRATE = "d6e22a01-35da-11d1-9034-00a0c90349be"; - const MUTEX_UNKNOWN = "d6e22a02-35da-11d1-9034-00a0c90349be"; - - /** @var string */ - private $_exclusionType; - - /** @var Array */ - private $_streamNumbers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - $this->_exclusionType = $this->_reader->readGUID(); - $streamNumbersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $streamNumbersCount; $i++) - $this->_streamNumbers[] = $this->_reader->readUInt16LE(); - } - - /** - * Returns the nature of the mutual exclusion relationship. - * - * @return string - */ - public function getExclusionType() { return $this->_exclusionType; } - - /** - * Returns an array of stream numbers. - * - * @return Array - */ - public function getStreamNumbers() { return $this->_streamNumbers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/CodecList.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/CodecList.php deleted file mode 100644 index 5a220a7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/CodecList.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: CodecList.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Codec List Object</i> provides user-friendly information about the - * codecs and formats used to encode the content found in the ASF file. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_CodecList extends ASF_Object -{ - const VIDEO_CODEC = 0x1; - const AUDIO_CODEC = 0x2; - const UNKNOWN_CODEC = 0xffff; - - /** @var Array */ - private $_entries = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(16); - $codecEntriesCount = $this->_reader->readUInt32LE(); - for ($i = 0; $i < $codecEntriesCount; $i++) { - $entry = array("type" => $this->_reader->readUInt16LE()); - $codecNameLength = $this->_reader->readUInt16LE() * 2; - $entry["codecName"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($codecNameLength)); - $codecDescriptionLength = $this->_reader->readUInt16LE() * 2; - $entry["codecDescription"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($codecDescriptionLength)); - $codecInformationLength = $this->_reader->readUInt16LE(); - $entry["codecInformation"] = - $this->_reader->read($codecInformationLength); - $this->_entries[] = $entry; - } - } - - /** - * Returns the array of codec entries. - * - * @return Array - */ - public function getEntries() { return $this->_entries; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Compatibility.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Compatibility.php deleted file mode 100644 index e051b45..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Compatibility.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Compatibility.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Compatibility Object</i> is reserved for future use. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_Compatibility extends ASF_Object -{ - /** @var integer */ - private $_profile; - - /** @var integer */ - private $_mode; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_profile = $this->_reader->readUInt8(); - $this->_mode = $this->_reader->readUInt8(); - } - - /** - * Returns the profile field. This field is reserved and is set to 2. - * - * @return integer - */ - public function getProfile() { return $this->_profile; } - - /** - * Returns the mode field. This field is reserved and is set to 1. - * - * @return integer - */ - public function getMode() { return $this->_mode; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Container.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Container.php deleted file mode 100644 index a214a3b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Container.php +++ /dev/null @@ -1,195 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Container.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * An abstract base container class that contains other ASF objects. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -abstract class ASF_Object_Container extends ASF_Object -{ - /** @var Array */ - private $_objects = array(); - - /** - * Reads and constructs the objects found within this object. - */ - protected function constructObjects($defaultclassnames = array()) - { - while (true) { - $offset = $this->_reader->getOffset(); - if ($offset >= $this->getOffset() + $this->getSize()) - break; - $guid = $this->_reader->readGUID(); - $size = $this->_reader->readInt64LE(); - - $this->_reader->setOffset($offset); - if (isset($defaultclassnames[$guid])) { - if (@fopen($filename = "ASF/Object/" . $defaultclassnames[$guid] . - ".php", "r", true) !== false) - require_once($filename); - if (class_exists - ($classname = "ASF_Object_" . $defaultclassnames[$guid])) - $object = new $classname($this->_reader, $this->_options); - else - $object = new ASF_Object($this->_reader, $this->_options); - } else - $object = new ASF_Object($this->_reader, $this->_options); - $object->setParent($this); - if (!$this->hasObject($object->getIdentifier())) - $this->_objects[$object->getIdentifier()] = array(); - $this->_objects[$object->getIdentifier()][] = $object; - $this->_reader->setOffset($offset + $size); - } - } - - /** - * Checks whether the object with given GUID is present in the file. Returns - * <var>true</var> if one or more objects are present, <var>false</var> - * otherwise. - * - * @return boolean - */ - public function hasObject($identifier) - { - return isset($this->_objects[$identifier]); - } - - /** - * Returns all the objects the file contains as an associate array. The object - * identifiers work as keys having an array of ASF objects as associated - * value. - * - * @return Array - */ - public function getObjects() - { - return $this->_objects; - } - - /** - * Returns an array of objects matching the given object GUID or an empty - * array if no object matched the identifier. - * - * The identifier may contain wildcard characters "*" and "?". The asterisk - * matches against zero or more characters, and the question mark matches any - * single character. - * - * Please note that one may also use the shorthand $obj->identifier to access - * the first box with the identifier given. Wildcards cannot be used with - * the shorthand and they will not work with user defined uuid types. - * - * @return Array - */ - public function getObjectsByIdentifier($identifier) - { - $matches = array(); - $searchPattern = "/^" . - str_replace(array("*", "?"), array(".*", "."), $identifier) . "$/i"; - foreach ($this->_objects as $identifier => $objects) - if (preg_match($searchPattern, $identifier)) - foreach ($objects as $object) - $matches[] = $object; - return $matches; - } - - /** - * Adds a new object into the current object and returns it. - * - * @param ASF_Object The object to add - * @return ASF_Object - */ - public function addObject($object) - { - $object->setParent($this); - $object->setOptions($this->_options); - if (!$this->hasObject($object->getIdentifier())) - $this->_objects[$object->getIdentifier()] = array(); - return $this->_objects[$object->getIdentifier()][] = $object; - } - - /** - * Override magic function so that $obj->value will work as expected. - * - * The method first attempts to call the appropriate getter method. If no - * field with given name is found, the method attempts to return the right - * object instead. In other words, calling $obj->value will attempt to return - * the first object returned by $this->getObjectsByIdentifier(self::value). - * - * @param string $name The field or object name. - * @return mixed - */ - public function __get($name) - { - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - if (defined($constname = get_class($this) . "::" . strtoupper - (preg_replace("/[A-Z]/", "_$0", $name)))) { - $objects = $this->getObjectsByIdentifier(constant($constname)); - if (isset($objects[0])) - return $objects[0]; - } - throw new ASF_Exception("Unknown field/object: " . $name); - } - - /** - * Magic function so that isset($obj->value) will work. This method checks - * whether the object by given identifier is contained by this container. - * - * @param string $name The object name. - * @return boolean - */ - public function __isset($name) - { - if (defined($constname = get_class($this) . "::" . strtoupper - (preg_replace("/[A-Z]/", "_$0", $name)))) { - $objects = $this->getObjectsByIdentifier(constant($constname)); - return isset($objects[0]); - } - else - return isset($this->_objects[$name]); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentBranding.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentBranding.php deleted file mode 100644 index c5859a5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentBranding.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ContentBranding.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Content Branding Object</i> stores branding data for an ASF file, - * including information about a banner image and copyright associated with the - * file. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ContentBranding extends ASF_Object -{ - /** Indicates that there is no banner */ - const TYPE_NONE = 0; - - /** Indicates that the data represents a bitmap */ - const TYPE_BMP = 1; - - /** Indicates that the data represents a JPEG */ - const TYPE_JPEG = 2; - - /** Indicates that the data represents a GIF */ - const TYPE_GIF = 3; - - - /** @var integer */ - private $_bannerImageType; - - /** @var string */ - private $_bannerImageData; - - /** @var string */ - private $_bannerImageUrl; - - /** @var string */ - private $_copyrightUrl; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_bannerImageType = $this->_reader->readUInt32LE(); - $bannerImageDataSize = $this->_reader->readUInt32LE(); - $this->_bannerImageData = $this->_reader->read($bannerImageDataSize); - $bannerImageUrlLength = $this->_reader->readUInt32LE(); - $this->_bannerImageUrl = $this->_reader->read($bannerImageUrlLength); - $copyrightUrlLength = $this->_reader->readUInt32LE(); - $this->_copyrightUrl = $this->_reader->read($copyrightUrlLength); - } - - /** - * Returns the type of data contained in the <i>Banner Image Data</i>. Valid - * values are 0 to indicate that there is no banner image data; 1 to indicate - * that the data represent a bitmap; 2 to indicate that the data represents a - * JPEG; and 3 to indicate that the data represents a GIF. If this value is - * set to 0, then the <i>Banner Image Data Size field is set to 0, and the - * <i>Banner Image Data</i> field is empty. - * - * @return integer - */ - public function getBannerImageType() { return $this->_bannerImageType; } - - /** - * Returns the entire banner image, including the header for the appropriate - * image format. - * - * @return string - */ - public function getBannerImageData() { return $this->_bannerImageData; } - - /** - * Returns, if present, a link to more information about the banner image. - * - * @return string - */ - public function getBannerImageUrl() { return $this->_bannerImageUrl; } - - /** - * Returns, if present, a link to more information about the copyright for the - * content. - * - * @return string - */ - public function getCopyrightUrl() { return $this->_copyrightUrl; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentDescription.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentDescription.php deleted file mode 100644 index bab422c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentDescription.php +++ /dev/null @@ -1,141 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ContentDescription.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Content Description Object</i> lets authors record well-known data - * describing the file and its contents. This object is used to store standard - * bibliographic information such as title, author, copyright, description, and - * rating information. This information is pertinent to the entire file. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_ContentDescription extends ASF_Object -{ - /** @var string */ - private $_title; - - /** @var string */ - private $_author; - - /** @var string */ - private $_copyright; - - /** @var string */ - private $_description; - - /** @var string */ - private $_rating; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $titleLen = $this->_reader->readUInt16LE(); - $authorLen = $this->_reader->readUInt16LE(); - $copyrightLen = $this->_reader->readUInt16LE(); - $descriptionLen = $this->_reader->readUInt16LE(); - $ratingLen = $this->_reader->readUInt16LE(); - - $this->_title = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($titleLen)); - $this->_author = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($authorLen)); - $this->_copyright = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($copyrightLen)); - $this->_description = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($descriptionLen)); - $this->_rating = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($ratingLen)); - } - - /** - * Returns the title information. - * - * @return string - */ - public function getTitle() { return $this->_title; } - - /** - * Returns the author information. - * - * @return string - */ - public function getAuthor() { return $this->_author; } - - /** - * Returns the copyright information. - * - * @return string - */ - public function getCopyright() { return $this->_copyright; } - - /** - * Returns the description information. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Returns the rating information. - * - * @return string - */ - public function getRating() { return $this->_rating; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentEncryption.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentEncryption.php deleted file mode 100644 index 29fe766..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ContentEncryption.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ContentEncryption.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Content Encryption Object</i> lets authors protect content by using - * Microsoft® Digital Rights Manager version 1. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ContentEncryption extends ASF_Object -{ - /** @var string */ - private $_secretData; - - /** @var string */ - private $_protectionType; - - /** @var string */ - private $_keyId; - - /** @var string */ - private $_licenseUrl; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $secretDataLength = $this->_reader->readUInt32LE(); - $this->_secretData = $this->_reader->read($secretDataLength); - $protectionTypeLength = $this->_reader->readUInt32LE(); - $this->_protectionType = $this->_reader->readString8($protectionTypeLength); - $keyIdLength = $this->_reader->readUInt32LE(); - $this->_keyId = $this->_reader->readString8($keyIdLength); - $licenseUrlLength = $this->_reader->readUInt32LE(); - $this->_licenseUrl = $this->_reader->readString8($licenseUrlLength); - } - - /** - * Returns the secret data. - * - * @return string - */ - public function getSecretData() { return $this->_secretData; } - - /** - * Returns the type of protection mechanism used. The value of this field - * is set to "DRM". - * - * @return string - */ - public function getProtectionType() { return $this->_protectionType; } - - /** - * Returns the key ID used. - * - * @return string - */ - public function getKeyId() { return $this->_keyId; } - - /** - * Returns the URL from which a license to manipulate the content can be - * acquired. - * - * @return string - */ - public function getLicenseUrl() { return $this->_licenseUrl; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Data.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Data.php deleted file mode 100644 index 2904693..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Data.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Data.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -require_once("ASF/Object/Data/Packet.php"); -/**#@-*/ - -/** - * The <i>Data Object</i> contains all of the <i>Data Packet</i>s for a file. - * These Data Packets are organized in terms of increasing send times. A <i>Data - * Packet</i> can contain interleaved data from several digital media streams. - * This data can consist of entire objects from one or more streams. - * Alternatively, it can consist of partial objects (fragmentation). - * - * Capabilities provided within the interleave packet definition include: - * o Single or multiple payload types per Data Packet - * o Fixed-size Data Packets - * o Error correction information (optional) - * o Clock information (optional) - * o Redundant sample information, such as presentation time stamp (optional) - * - * @todo Implement optional support for ASF Data Packet parsing - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_Data extends ASF_Object -{ - /** @var string */ - private $_fileId; - - /** @var integer */ - private $_totalDataPackets; - - /** @var Array */ - private $_dataPackets; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_fileId = $this->_reader->readGUID(); - $this->_totalDataPackets = $this->_reader->readInt64LE(); - $this->_reader->skip(2); - /* Data packets are not supported - * for ($i = 0; $i < $this->_totalDataPackets; $i++) { - * $this->_dataPackets[] = new ASF_Object_Data_Packet($reader); - * } - */ - } - - /** - * Returns the unique identifier for this ASF file. The value of this field - * is changed every time the file is modified in any way. The value of this - * field is identical to the value of the <i>File ID</i> field of the - * <i>Header Object</i>. - * - * @return string - */ - public function getFileId() { return $this->_fileId; } - - /** - * Returns the number of ASF Data Packet entries that exist within the <i>Data - * Object</i>. It must be equal to the <i>Data Packet Count</i> field in the - * <i>File Properties Object</i>. The value of this field is invalid if the - * broadcast flag field of the <i>File Properties Object</i> is set to 1. - * - * @return integer - */ - public function getTotalDataPackets() { return $this->_endTime; } - - /** - * Returns an array of Data Packets. - * - * @return Array - */ - public function getDataPackets() - { - throw new ASF_Exception("Data packets are not parsed due to optimization."); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/DigitalSignature.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/DigitalSignature.php deleted file mode 100644 index 64a7690..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/DigitalSignature.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: DigitalSignature.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Digital Signature Object</i> lets authors sign the portion of their - * header that lies between the end of the <i>File Properties Object</i> and the - * beginning of the <i>Digital Signature Object</i>. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_DigitalSignature extends ASF_Object -{ - /** @var integer */ - private $_signatureType; - - /** @var string */ - private $_signatureData; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_signatureType = $this->_reader->readUInt32LE(); - $signatureDataLength = $this->_reader->readUInt32LE(); - $this->_signatureData = $this->_reader->read($signatureDataLength); - } - - /** - * Returns the type of digital signature used. This field is set to 2. - * - * @return integer - */ - public function getSignatureType() { return $this->_signatureType; } - - /** - * Returns the digital signature data. - * - * @return string - */ - public function getSignatureData() { return $this->_signatureData; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ErrorCorrection.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ErrorCorrection.php deleted file mode 100644 index c5cb522..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ErrorCorrection.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ErrorCorrection.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Error Correction Object</i> defines the error correction method. This - * enables different error correction schemes to be used during content - * creation. The <i>Error Correction Object</i> contains provisions for opaque - * information needed by the error correction engine for recovery. For example, - * if the error correction scheme were a simple N+1 parity scheme, then the - * value of N would have to be available in this object. - * - * Note that this does not refer to the same thing as the <i>Error Correction - * Type</i> field in the <i>{@link ASF_Object_StreamProperties Stream Properties - * Object}</i>. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ErrorCorrection extends ASF_Object -{ - /** @var string */ - private $_type; - - /** @var string */ - private $_data; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_type = $this->_reader->readGUID(); - $dataLength = $this->_reader->readUInt32LE(); - $this->_data = $this->_reader->read($dataLength); - } - - /** - * Returns the type of error correction. - * - * @return string - */ - public function getType() { return $this->_type; } - - /** - * Returns the data specific to the error correction scheme. The structure for - * the <i>Error Correction Data</i> field is determined by the value stored in - * the <i>Error Correction Type</i> field. - * - * @return Array - */ - public function getData() { return $this->_data; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentDescription.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentDescription.php deleted file mode 100644 index 259bbb2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentDescription.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ExtendedContentDescription.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>ASF_Extended_Content_Description_Object</i> object implementation. - * This object contains unlimited number of attribute fields giving more - * information about the file. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ExtendedContentDescription extends ASF_Object -{ - /** @var Array */ - private $_contentDescriptors = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $contentDescriptorsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $contentDescriptorsCount; $i++) { - $nameLen = $this->_reader->readUInt16LE(); - $name = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($nameLen)); - $valueDataType = $this->_reader->readUInt16LE(); - $valueLen = $this->_reader->readUInt16LE(); - switch ($valueDataType) { - case 0: - case 1: // string - $this->_contentDescriptors[$name] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($valueLen)); - break; - case 2: // bool - case 3: // 32-bit integer - $this->_contentDescriptors[$name] = $this->_reader->readUInt32LE(); - break; - case 4: // 64-bit integer - $this->_contentDescriptors[$name] = $this->_reader->readInt64LE(); - break; - case 5: // 16-bit integer - $this->_contentDescriptors[$name] = $this->_reader->readUInt16LE(); - break; - default: - } - } - } - - /** - * Returns the value of the specified descriptor or <var>false</var> if there - * is no such descriptor defined. - * - * @param string $name The name of the descriptor (ie the name of the field). - * @return string|false - */ - public function getDescriptor($name) - { - if (isset($this->_contentDescriptors[$name])) - return $this->_contentDescriptors[$name]; - return false; - } - - /** - * Returns an associate array of all the descriptors defined having the names - * of the descriptors as the keys. - * - * @return Array - */ - public function getDescriptors() { return $this->_contentDescriptors; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentEncryption.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentEncryption.php deleted file mode 100644 index a2a2eee..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedContentEncryption.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ExtendedContentEncryption.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Extended Content Encryption Object</i> lets authors protect content by - * using the Windows Media Rights Manager 7 Software Development Kit (SDK). - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ExtendedContentEncryption extends ASF_Object -{ - /** @var string */ - private $_data; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $dataSize = $this->_reader->readUInt32LE(); - $this->_data = $this->_reader->read($dataSize); - } - - /** - * Returns the array of bytes required by the DRM client to manipulate the - * protected content. - * - * @return string - */ - public function getData() { return $this->_data; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedStreamProperties.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedStreamProperties.php deleted file mode 100644 index 6a65038..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ExtendedStreamProperties.php +++ /dev/null @@ -1,418 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ExtendedStreamProperties.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Extended Stream Properties Object</i> defines additional optional - * properties and characteristics of a digital media stream that are not - * described in the <i>Stream Properties Object</i>. - * - * Typically, the basic <i>Stream Properties Object</i> is present in the - * <i>Header Object</i>, and the <i>Extended Stream Properties Object</i> is - * present in the <i>Header Extension Object</i>. Sometimes, however, the - * <i>Stream Properties Object</i> for a stream may be embedded inside the - * <i>Extended Stream Properties Object</i> for that stream. This approach - * facilitates the creation of backward-compatible content. - * - * This object has an optional provision to include application-specific or - * implementation-specific data attached to the payloads of each digital media - * sample stored within a <i>Data Packet</i>. This data can be looked at as - * digital media sample properties and is stored in the <i>Replicated Data</i> - * field of a payload header. The <i>Payload Extension Systems</i> fields of the - * <i>Extended Stream Properties Object</i> describes what this data is and is - * necessary for that data to be parsed, if present. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ExtendedStreamProperties extends ASF_Object -{ - /** - * Indicates, if set, that this digital media stream, if sent over a network, - * must be carried over a reliable data communications transport mechanism. - * This should be set for streams that cannot recover after a lost media - * object. - */ - const RELIABLE = 1; - - /** - * This flag should be set only if the stream is seekable, either by using an - * index object or by estimating according to bit rate (as can sometimes be - * done with audio). This flag pertains to this stream only rather than to the - * entire file. - */ - const SEEKABLE = 2; - - /** - * Indicates, if set, that the stream does not contain any cleanpoints. A - * cleanpoint is any point at which playback could begin without having seen - * the previous media objects. For streams that use key frames, the key frames - * would be the cleanpoints. - */ - const NO_CLEANPOINT = 4; - - /** - * Specifies, if set, that when a stream is joined in mid-transmission, all - * information from the most recent cleanpoint up to the current time should - * be sent before normal streaming begins at the current time. The default - * behavior (when this flag is not set) is to send only the data starting at - * the current time. This flag should only be set for streams that are coming - * from a live source. - */ - const RESEND_LIVE_CLEANPOINTS = 8; - - const AUDIO_MEDIA = "f8699e40-5b4d-11cf-a8fd-00805f5c442b"; - const VIDEO_MEDIA = "bc19efc0-5b4d-11cf-a8fd-00805f5c442b"; - const COMMAND_MEDIA = "59dacfc0-59e6-11d0-a3ac-00a0c90348f6"; - const JFIF_MEDIA = "b61be100-5b4e-11cf-a8fD-00805f5c442b"; - const DEGRADABLE_JPEG_MEDIA = "35907dE0-e415-11cf-a917-00805f5c442b"; - const FILE_TRANSFER_MEDIA = "91bd222c-f21c-497a-8b6d-5aa86bfc0185"; - const BINARY_MEDIA = "3afb65e2-47ef-40f2-ac2c-70a90d71d343"; - - const NO_ERROR_CORRECTION = "20fb5700-5b55-11cf-a8fd-00805f5c442b"; - const AUDIO_SPREAD = "bfc3cd50-618f-11cf-8bb2-00aa00b4e220"; - - const PAYLOAD_EXTENSION_SYSTEM_TIMECODE = - "399595ec-8667-4e2d-8fdb-98814ce76c1e"; - const PAYLOAD_EXTENSION_SYSTEM_FILE_NAME = - "e165ec0e-19ed-45d7-b4a7-25cbd1e28e9b"; - const PAYLOAD_EXTENSION_SYSTEM_CONTENT_TYPE = - "d590dc20-07bc-436c-9cf7-f3bbfbf1a4dc"; - const PAYLOAD_EXTENSION_SYSTEM_PIXEL_ASPECT_RATIO = - "1b1ee554-f9ea-4bc8-821a-376b74e4c4b8"; - const PAYLOAD_EXTENSION_SYSTEM_SAMPLE_DURATION = - "c6bd9450-867f-4907-83a3-c77921b733ad"; - const PAYLOAD_EXTENSION_SYSTEM_ENCRYPTION_SAMPLE_ID = - "6698b84e-0afa-4330-aeb2-1c0a98d7a44d"; - - /** @var integer */ - private $_startTime; - - /** @var integer */ - private $_endTime; - - /** @var integer */ - private $_dataBitrate; - - /** @var integer */ - private $_bufferSize; - - /** @var integer */ - private $_initialBufferFullness; - - /** @var integer */ - private $_alternateDataBitrate; - - /** @var integer */ - private $_alternateBufferSize; - - /** @var integer */ - private $_alternateInitialBufferFullness; - - /** @var integer */ - private $_maximumObjectSize; - - /** @var integer */ - private $_flags; - - /** @var integer */ - private $_streamNumber; - - /** @var integer */ - private $_streamLanguageIndex; - - /** @var integer */ - private $_averageTimePerFrame; - - /** @var Array */ - private $_streamNames = array(); - - /** @var Array */ - private $_payloadExtensionSystems = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_startTime = $this->_reader->readInt64LE(); - $this->_endTime = $this->_reader->readInt64LE(); - $this->_dataBitrate = $this->_reader->readUInt32LE(); - $this->_bufferSize = $this->_reader->readUInt32LE(); - $this->_initialBufferFullness = $this->_reader->readUInt32LE(); - $this->_alternateDataBitrate = $this->_reader->readUInt32LE(); - $this->_alternateBufferSize = $this->_reader->readUInt32LE(); - $this->_alternateInitialBufferFullness = $this->_reader->readUInt32LE(); - $this->_maximumObjectSize = $this->_reader->readUInt32LE(); - $this->_flags = $this->_reader->readUInt32LE(); - $this->_streamNumber = $this->_reader->readUInt16LE(); - $this->_streamLanguageIndex = $this->_reader->readUInt16LE(); - $this->_averageTimePerFrame = $this->_reader->readInt64LE(); - $streamNameCount = $this->_reader->readUInt16LE(); - $payloadExtensionSystemCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $streamNameCount; $i++) { - $streamName = array("languageIndex" => $this->_reader->readUInt16LE()); - $streamNameLength = $this->_reader->readUInt16LE(); - $streamName["streamName"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($streamNameLength)); - $this->_streamNames[] = $streamName; - } - for ($i = 0; $i < $payloadExtensionSystemCount; $i++) { - $payloadExtensionSystem = array - ("extensionSystemId" => $this->_reader->readGUID(), - "extensionDataSize" => $this->_reader->readUInt16LE()); - $extensionSystemInfoLength = $this->_reader->readUInt32LE(); - $payloadExtensionSystem["extensionSystemInfo"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($extensionSystemInfoLength)); - $this->_payloadExtensionSystems[] = $payloadExtensionSystem; - } - } - - /** - * Returns the presentation time of the first object, indicating where this - * digital media stream starts within the context of the timeline of the ASF - * file as a whole. This time value corresponds to presentation times as they - * appear in the data packets (adjusted by the preroll). This field is given - * in units of milliseconds and can optionally be set to 0, in which case it - * will be ignored. - * - * @return integer - */ - public function getStartTime() { return $this->_startTime; } - - /** - * Returns the presentation time of the last object plus the duration of play, - * indicating where this digital media stream ends within the context of the - * timeline of the ASF file as a whole. This time value corresponds to - * presentation times as they appear in the data packets (adjusted by the - * preroll). This field is given in units of milliseconds and can optionally - * be set to 0, in which case it will be ignored. - * - * @return integer - */ - public function getEndTime() { return $this->_endTime; } - - /** - * Returns the leak rate R, in bits per second, of a leaky bucket that - * contains the data portion of the stream without overflowing, excluding all - * ASF Data Packet overhead. The size of the leaky bucket is specified by the - * value of the <i>Buffer Size</i> field. This field has a non-zero value. - * - * @return integer - */ - public function getDataBitrate() { return $this->_dataBitrate; } - - /** - * Returns the size B, in milliseconds, of the leaky bucket used in the - * <i>Data Bitrate</i> definition. - * - * @return integer - */ - public function getBufferSize() { return $this->_bufferSize; } - - /** - * Returns the initial fullness, in milliseconds, of the leaky bucket used in - * the <i>Data Bitrate</i> definition. This is the fullness of the buffer at - * the instant before the first bit in the stream is dumped into the bucket. - * Typically, this value is set to 0. This value shall not exceed the value in - * the <i>Buffer Size</i> field. - * - * @return integer - */ - public function getInitialBufferFullness() - { - return $this->_initialBufferFullness; - } - - /** - * Returns the leak rate RAlt, in bits per second, of a leaky bucket that - * contains the data portion of the stream without overflowing, excluding all - * ASF <i>Data Packet</i> overhead. The size of the leaky bucket is specified - * by the value of the <i>Alternate Buffer Size</i> field. This value is - * relevant in most scenarios where the bit rate is not exactly constant, but - * it is especially useful for streams that have highly variable bit rates. - * This field can optionally be set to the same value as the <i>Data - * Bitrate</i> field. - * - * @return integer - */ - public function getAlternateDataBitrate() - { - return $this->_alternateDataBitrate; - } - - /** - * Returns the size BAlt, in milliseconds, of the leaky bucket used in the - * <i>Alternate Data Bitrate</i> definition. This value is relevant in most - * scenarios where the bit rate is not exactly constant, but it is especially - * useful for streams that have highly variable bit rates. This field can - * optionally be set to the same value as the <i>Buffer Size</i> field. - * - * @return integer - */ - public function getAlternateBufferSize() - { - return $this->_alternateBufferSize; - } - - /** - * Returns the initial fullness, in milliseconds, of the leaky bucket used in - * the <i>Alternate Data Bitrate</i> definition. This is the fullness of the - * buffer at the instant before the first bit in the stream is dumped into the - * bucket. Typically, this value is set to 0. This value does not exceed the - * value of the <i>Alternate Buffer Size</i> field. - * - * @return integer - */ - public function getAlternateInitialBufferFullness() - { - return $this->_alternateInitialBufferFullness; - } - - /** - * Returns the maximum size of the largest sample stored in the data packets - * for a stream. A value of 0 means unknown. - * - * @return integer - */ - public function getMaximumObjectSize() - { - return $this->_maximumObjectSize; - } - - /** - * Returns the average time duration, measured in 100-nanosecond units, of - * each frame. This number should be rounded to the nearest integer. This - * field can optionally be set to 0 if the average time per frame is unknown - * or unimportant. It is recommended that this field be set for video. - * - * @return integer - */ - public function getAverageTimePerFrame() - { - return $this->_averageTimePerFrame; - } - - /** - * Returns the number of this stream. 0 is an invalid stream number (that is, - * other <i>Header Objects</i> use stream number 0 to refer to the entire file - * as a whole rather than to a specific media stream within the file). Valid - * values are between 1 and 127. - * - * @return integer - */ - public function getStreamNumber() - { - return $this->_streamNumber; - } - - /** - * Returns the language, if any, which the content of the stream uses or - * assumes. Refer to the {@link LanguageList Language List Object} description - * for the details concerning how the <i>Stream Language Index</i> and - * <i>Language Index</i> fields should be used. Note that this is an index - * into the languages listed in the <i>Language List Object</i> rather than a - * language identifier. - * - * @return integer - */ - public function getStreamLanguageIndex() - { - return $this->_streamLanguageIndex; - } - - /** - * Returns an array of Stream Names. Each stream name instance is potentially - * localized into a specific language. The <i>Language Index</i> field - * indicates the language in which the <i>Stream Name</i> has been written. - * - * The array contains the following keys: - * o languageIndex -- The language index - * o streamName -- The localized stream name - * - * @return Array - */ - public function getStreamNames() - { - return $this->_streamNames; - } - - /** - * Returns an array of payload extension systems. Payload extensions provide a - * way for content creators to specify kinds of data that will appear in the - * payload header for every payload from this stream. This system is used when - * stream properties must be conveyed at the media object level. The - * <i>Replicated Data</i> bytes in the payload header will contain these - * properties in the order in which the <i>Payload Extension Systems</i> - * appear in this object. A <i>Payload Extension System</i> must appear in the - * <i>Extended Stream Properties Object</i> for each type of per-media-object - * properties that will appear with the payloads for this stream. - * - * The array contains the following keys: - * o extensionSystemId -- Specifies a unique identifier for the extension - * system. - * o extensionDataSize -- Specifies the fixed size of the extension data for - * this system that will appear in the replicated data alongside every - * payload for this stream. If this extension system uses variable-size - * data, then this should be set to 0xffff. Note, however, that replicated - * data length is limited to 255 bytes, which limits the total size of all - * extension systems for a particular stream. - * o extensionSystemInfo -- Specifies additional information to describe - * this extension system (optional). - * - * @return Array - */ - public function getPayloadExtensionSystems() - { - return $this->_payloadExtensionSystems; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/FileProperties.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/FileProperties.php deleted file mode 100644 index c1e4ada..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/FileProperties.php +++ /dev/null @@ -1,255 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: FileProperties.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>File Properties Object</i> defines the global characteristics of the - * combined digital media streams found within the Data Object. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_FileProperties extends ASF_Object -{ - /** - * Indicates, if set, that a file is in the process of being created (for - * example, for recording applications), and thus that various values stored - * in the header objects are invalid. It is highly recommended that - * post-processing be performed to remove this condition at the earliest - * opportunity. - */ - const BROADCAST = 1; - - /** - * Indicates, if set, that a file is seekable. Note that for files containing - * a single audio stream and a <i>Minimum Data Packet Size</i> field equal to - * the <i>Maximum Data Packet Size</i> field, this flag shall always be set to - * 1. For files containing a single audio stream and a video stream or - * mutually exclusive video streams, this flag is only set to 1 if the file - * contains a matching <i>Simple Index Object</i> for each regular video - * stream. - */ - const SEEKABLE = 2; - - /** @var string */ - private $_fileId; - - /** @var integer */ - private $_fileSize; - - /** @var integer */ - private $_creationDate; - - /** @var integer */ - private $_dataPacketsCount; - - /** @var integer */ - private $_playDuration; - - /** @var integer */ - private $_sendDuration; - - /** @var integer */ - private $_preroll; - - /** @var integer */ - private $_flags; - - /** @var integer */ - private $_minimumDataPacketSize; - - /** @var integer */ - private $_maximumDataPacketSize; - - /** @var integer */ - private $_maximumBitrate; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_fileId = $this->_reader->readGUID(); - $this->_fileSize = $this->_reader->readInt64LE(); - $this->_creationDate = $this->_reader->readInt64LE(); - $this->_dataPacketsCount = $this->_reader->readInt64LE(); - $this->_playDuration = $this->_reader->readInt64LE(); - $this->_sendDuration = $this->_reader->readInt64LE(); - $this->_preroll = $this->_reader->readInt64LE(); - $this->_flags = $this->_reader->readUInt32LE(); - $this->_minimumDataPacketSize = $this->_reader->readUInt32LE(); - $this->_maximumDataPacketSize = $this->_reader->readUInt32LE(); - $this->_maximumBitrate = $this->_reader->readUInt32LE(); - } - - /** - * Returns the file id field. - * - * @return integer - */ - public function getFileId() { return $this->_fileId; } - - /** - * Returns the size, in bytes, of the entire file. The value of this field is - * invalid if the broadcast flag bit in the flags field is set to 1. - * - * @return integer - */ - public function getFileSize() { return $this->_fileSize; } - - /** - * Returns the date and time of the initial creation of the file. The value is - * given as the number of 100-nanosecond intervals since January 1, 1601, - * according to Coordinated Universal Time (Greenwich Mean Time). The value of - * this field may be invalid if the broadcast flag bit in the flags field is - * set to 1. - * - * @return integer - */ - public function getCreationDate() { return $this->_creationDate; } - - /** - * Returns the number of Data Packet entries that exist within the - * {@link ASF_Object_Data Data Object}. The value of this field is invalid if - * the broadcast flag bit in the flags field is set to 1. - * - * @return integer - */ - public function getDataPacketsCount() { return $this->_dataPacketsCount; } - - /** - * Returns the time needed to play the file in 100-nanosecond units. This - * value should include the duration (estimated, if an exact value is - * unavailable) of the the last media object in the presentation. The value of - * this field is invalid if the broadcast flag bit in the flags field is set - * to 1. - * - * @return integer - */ - public function getPlayDuration() { return $this->_playDuration; } - - /** - * Returns the time needed to send the file in 100-nanosecond units. This - * value should include the duration of the last packet in the content. The - * value of this field is invalid if the broadcast flag bit in the flags field - * is set to 1. - * - * @return integer - */ - public function getSendDuration() { return $this->_sendDuration; } - - /** - * Returns the amount of time to buffer data before starting to play the file, - * in millisecond units. If this value is nonzero, the <i>Play Duration</i> - * field and all of the payload <i>Presentation Time</i> fields have been - * offset by this amount. Therefore, player software must subtract the value - * in the preroll field from the play duration and presentation times to - * calculate their actual values. - * - * @return integer - */ - public function getPreroll() { return $this->_preroll; } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the flags field. - * - * @return integer - */ - public function getFlags() { return $this->_flags; } - - /** - * Returns the minimum <i>Data Packet</i> size in bytes. In general, the value - * of this field is invalid if the broadcast flag bit in the flags field is - * set to 1. However, the values for the <i>Minimum Data Packet Size</i> and - * <i>Maximum Data Packet Size</i> fields shall be set to the same value, and - * this value should be set to the packet size, even when the broadcast flag - * in the flags field is set to 1. - * - * @return integer - */ - public function getMinimumDataPacketSize() - { - return $this->_minimumDataPacketSize; - } - - /** - * Returns the maximum <i>Data Packet</i> size in bytes. In general, the value - * of this field is invalid if the broadcast flag bit in the flags field is - * set to 1. However, the values for the <i>Minimum Data Packet Size</i> and - * <i>Maximum Data Packet Size</i> fields shall be set to the same value, and - * this value should be set to the packet size, even when the broadcast flag - * in the flags field is set to 1. - * - * @return integer - */ - public function getMaximumDataPacketSize() - { - return $this->_maximumDataPacketSize; - } - - /** - * Returns the maximum instantaneous bit rate in bits per second for the - * entire file. This is equal the sum of the bit rates of the individual - * digital media streams. - * - * @return integer - */ - public function getMaximumBitrate() { return $this->_maximumBitrate; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/GroupMutualExclusion.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/GroupMutualExclusion.php deleted file mode 100644 index f5bc6e4..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/GroupMutualExclusion.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: GroupMutualExclusion.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Group Mutual Exclusion Object</i> is used to describe mutual exclusion - * relationships between groups of streams. This object is organized in terms of - * records, each containing one or more streams, where a stream in record N - * cannot coexist with a stream in record M for N != M (however, streams in the - * same record can coexist). This mutual exclusion object would be used - * typically for the purpose of language mutual exclusion, and a record would - * consist of all streams for a particular language. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_GroupMutualExclusion extends ASF_Object -{ - const MUTEX_LANGUAGE = "d6e22a00-35da-11d1-9034-00a0c90349be"; - const MUTEX_BITRATE = "d6e22a01-35da-11d1-9034-00a0c90349be"; - const MUTEX_UNKNOWN = "d6e22a02-35da-11d1-9034-00a0c90349be"; - - /** @var string */ - private $_exclusionType; - - /** @var Array */ - private $_records = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - $this->_exclusionType = $this->_reader->readGUID(); - $recordCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $recordCount; $i++) { - $streamNumbersCount = $this->_reader->readUInt16LE(); - $streamNumbers = array(); - for ($j = 0; $j < $streamNumbersCount; $j++) - $streamNumbers[] = array - ("streamNumbers" => $this->_reader->readUInt16LE()); - $this->_records[] = $streamNumbers; - } - } - - /** - * Returns the nature of the mutual exclusion relationship. - * - * @return string - */ - public function getExclusionType() { return $this->_exclusionType; } - - /** - * Returns an array of records. Each record consists of the following keys. - * - * o streamNumbers -- Specifies the stream numbers for this record. Valid - * values are between 1 and 127. - * - * @return Array - */ - public function getRecords() { return $this->_records; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Header.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Header.php deleted file mode 100644 index 489ea78..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Header.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Header.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object/Container.php"); -/**#@-*/ - -/** - * The role of the header object is to provide a well-known byte sequence at the - * beginning of ASF files and to contain all the information that is needed to - * properly interpret the information within the data object. The header object - * can optionally contain metadata such as bibliographic information. - * - * Of the three top-level ASF objects, the header object is the only one that - * contains other ASF objects. The header object may include a number of - * standard objects including, but not limited to: - * - * o File Properties Object -- Contains global file attributes. - * o Stream Properties Object -- Defines a digital media stream and its - * characteristics. - * o Header Extension Object -- Allows additional functionality to be added to - * an ASF file while maintaining backward compatibility. - * o Content Description Object -- Contains bibliographic information. - * o Script Command Object -- Contains commands that can be executed on the - * playback timeline. - * o Marker Object -- Provides named jump points within a file. - * - * Note that objects in the header object may appear in any order. To be valid, - * the header object must contain a {@link ASF_Object_FileProperties File - * Properties Object}, a {@link ASF_Object_HeaderExtension Header Extension - * Object}, and at least one {@link ASF_Object_StreamProperties Stream - * Properties Object}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_Header extends ASF_Object_Container -{ - const FILE_PROPERTIES = "8cabdca1-a947-11cf-8ee4-00c00c205365"; - const STREAM_PROPERTIES = "b7dc0791-a9b7-11cf-8ee6-00c00c205365"; - const HEADER_EXTENSION = "5fbf03b5-a92e-11cf-8ee3-00c00c205365"; - const CODEC_LIST = "86d15240-311d-11d0-a3a4-00a0c90348f6"; - const SCRIPT_COMMAND = "1efb1a30-0b62-11d0-a39b-00a0c90348f6"; - const MARKER = "f487cd01-a951-11cf-8ee6-00c00c205365"; - const BITRATE_MUTUAL_EXCLUSION = "d6e229dc-35da-11d1-9034-00a0c90349be"; - const ERROR_CORRECTION = "75b22635-668e-11cf-a6d9-00aa0062ce6c"; - const CONTENT_DESCRIPTION = "75b22633-668e-11cf-a6d9-00aa0062ce6c"; - const EXTENDED_CONTENT_DESCRIPTION = "d2d0a440-e307-11d2-97f0-00a0c95ea850"; - const CONTENT_BRANDING = "2211b3fa-bd23-11d2-b4b7-00a0c955fc6e"; - const STREAM_BITRATE_PROPERTIES = "7bf875ce-468d-11d1-8d82-006097c9a2b2"; - const CONTENT_ENCRYPTION = "2211b3fb-bd23-11d2-b4b7-00a0c955fc6e"; - const EXTENDED_CONTENT_ENCRYPTION = "298ae614-2622-4c17-b935-dae07ee9289c"; - const DIGITAL_SIGNATURE = "2211b3fc-bd23-11d2-b4b7-00a0c955fc6e"; - const PADDING = "1806d474-cadf-4509-a4ba-9aabcb96aae8"; - - /** - * Constructs the class with given parameters and options. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(6); - $this->constructObjects - (array - (self::FILE_PROPERTIES => "FileProperties", - self::STREAM_PROPERTIES => "StreamProperties", - self::HEADER_EXTENSION => "HeaderExtension", - self::CODEC_LIST => "CodecList", - self::SCRIPT_COMMAND => "ScriptCommand", - self::MARKER => "Marker", - self::BITRATE_MUTUAL_EXCLUSION => "BitrateMutualExclusion", - self::ERROR_CORRECTION => "ErrorCorrection", - self::CONTENT_DESCRIPTION => "ContentDescription", - self::EXTENDED_CONTENT_DESCRIPTION => "ExtendedContentDescription", - self::CONTENT_BRANDING => "ContentBranding", - self::STREAM_BITRATE_PROPERTIES => "StreamBitrateProperties", - self::CONTENT_ENCRYPTION => "ContentEncryption", - self::EXTENDED_CONTENT_ENCRYPTION => "ExtendedContentEncryption", - self::DIGITAL_SIGNATURE => "DigitalSignature", - self::PADDING => "Padding")); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/HeaderExtension.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/HeaderExtension.php deleted file mode 100644 index 92c8c0d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/HeaderExtension.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: HeaderExtension.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object/Container.php"); -/**#@-*/ - -/** - * The <i>Header Extension Object</i> allows additional functionality to be - * added to an ASF file while maintaining backward compatibility. The Header - * Extension Object is a container containing zero or more additional extended - * header objects. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_HeaderExtension extends ASF_Object_Container -{ - const EXTENDED_STREAM_PROPERTIES = "14e6a5cb-c672-4332-8399-a96952065b5a"; - const ADVANCED_MUTUAL_EXCLUSION = "a08649cf-4775-4670-8a16-6e35357566cd"; - const GROUP_MUTUAL_EXCLUSION = "d1465a40-5a79-4338-b71b-e36b8fd6c249"; - const STREAM_PRIORITIZATION = "d4fed15b-88d3-454f-81f0-ed5c45999e24"; - const BANDWIDTH_SHARING = "a69609e6-517b-11d2-b6af-00c04fd908e9"; - const LANGUAGE_LIST = "7c4346a9-efe0-4bfc-b229-393ede415c85"; - const METADATA = "c5f8cbea-5baf-4877-8467-aa8c44fa4cca"; - const METADATA_LIBRARY = "44231c94-9498-49d1-a141-1d134e457054"; - const INDEX_PARAMETERS = "d6e229df-35da-11d1-9034-00a0c90349be"; - const MEDIA_OBJECT_INDEX_PARAMETERS = "6b203bad-3f11-48e4-aca8-d7613de2cfa7"; - const TIMECODE_INDEX_PARAMETERS = "f55e496d-9797-4b5d-8c8b-604dfe9bfb24"; - const COMPATIBILITY = "75b22630-668e-11cf-a6d9-00aa0062ce6c"; - const ADVANCED_CONTENT_ENCRYPTION = "43058533-6981-49e6-9b74-ad12cb86d58c"; - const PADDING = "1806d474-cadf-4509-a4ba-9aabcb96aae8"; - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(22); - $this->constructObjects - (array - (self::EXTENDED_STREAM_PROPERTIES => "ExtendedStreamProperties", - self::ADVANCED_MUTUAL_EXCLUSION => "AdvancedMutualExclusion", - self::GROUP_MUTUAL_EXCLUSION => "GroupMutualExclusion", - self::STREAM_PRIORITIZATION => "StreamPrioritization", - self::BANDWIDTH_SHARING => "BandwidthSharing", - self::LANGUAGE_LIST => "LanguageList", - self::METADATA => "Metadata", - self::METADATA_LIBRARY => "MetadataLibrary", - self::INDEX_PARAMETERS => "IndexParameters", - self::MEDIA_OBJECT_INDEX_PARAMETERS => "MediaObjectIndexParameters", - self::TIMECODE_INDEX_PARAMETERS => "TimecodeIndexParameters", - self::COMPATIBILITY => "Compatibility", - self::ADVANCED_CONTENT_ENCRYPTION => "AdvancedContentEncryption", - self::PADDING => "Padding")); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Index.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Index.php deleted file mode 100644 index 6ce63ca..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Index.php +++ /dev/null @@ -1,185 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Index.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * This top-level ASF object supplies the necessary indexing information for an - * ASF file that contains more than just a plain script-audio-video combination. - * It includes stream-specific indexing information based on an adjustable index - * entry time interval. The index is designed to be broken into blocks to - * facilitate storage that is more space-efficient by using 32-bit offsets - * relative to a 64-bit base. That is, each index block has a full 64-bit offset - * in the block header that is added to the 32-bit offsets found in each index - * entry. If a file is larger than 2^32 bytes, then multiple index blocks can be - * used to fully index the entire large file while still keeping index entry - * offsets at 32 bits. - * - * Indices into the <i>Index Object</i> are in terms of presentation times. The - * corresponding <i>Offset</i> field values of the <i>Index Entry</i> byte - * offsets that, when combined with the <i>Block Position</i> value of the - * <i>Index Block</i>, indicate the starting location in bytes of an ASF Data - * Packet relative to the start of the first ASF Data Packet in the file. - * - * An offset value of 0xFFFFFFFF is used to indicate an invalid offset value. - * Invalid offsets signify that this particular index entry does not identify a - * valid indexible point. Invalid offsets may occur for the initial index - * entries of a digital media stream whose first ASF Data Packet has a non-zero - * send time. Invalid offsets may also occur in the case where a digital media - * stream has a large gap in the presentation time of successive objects. - * - * The <i>Index Object</i> is not recommended for use with files where the - * <i>Send Time</i> of the first <i>Data Packet</i> within the <i>Data - * Object</i> has a <i>Send Time</i> value significantly greater than zero - * (otherwise the index itself will be sparse and inefficient). - * - * Any ASF file containing an <i>Index Object</i> does also contain an <i>Index - * Parameters Object</i> in its {@link ASF_Object_Header ASF Header}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_Index extends ASF_Object -{ - /** - * Indicates that the index type is Nearest Past Data Packet. The Nearest - * Past Data Packet indexes point to the data packet whose presentation time - * is closest to the index entry time. - */ - const NEAREST_PAST_DATA_PACKET = 1; - - /** - * Indicates that the index type is Nearest Past Media. The Nearest Past - * Object indexes point to the closest data packet containing an entire object - * or first fragment of an object. - */ - const NEAREST_PAST_MEDIA = 2; - - /** - * Indicates that the index type is Nearest Past Cleanpoint. The Nearest Past - * Cleanpoint indexes point to the closest data packet containing an entire - * object (or first fragment of an object) that has the Cleanpoint Flag set. - * - * Nearest Past Cleanpoint is the most common type of index. - */ - const NEAREST_PAST_CLEANPOINT = 3; - - /** @var integer */ - private $_indexEntryTimeInterval; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** @var Array */ - private $_indexBlocks = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_indexEntryTimeInterval = $this->_reader->readUInt32LE(); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - $indexBlocksCount = $this->_reader->readUInt32LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - for ($i = 0; $i < $indexBlocksCount; $i++) { - $indexEntryCount = $this->_reader->readUInt32LE(); - $blockPositions = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $blockPositions[] = $this->_reader->readInt64LE(); - $offsets = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $offsets[] = $this->_reader->readUInt32LE(); - $this->_indexBlocks[] = array - ("blockPositions" => $blockPositions, - "indexEntryOffsets" => $offsets); - } - } - - /** - * Returns the time interval between each index entry in ms. - * - * @return integer - */ - public function getIndexEntryTimeInterval() - { - return $this->_indexEntryTimeInterval; - } - - /** - * Returns an array of index specifiers. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the <i>Index - * Specifiers</i> refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o blockPositions -- Specifies a list of byte offsets of the beginnings of - * the blocks relative to the beginning of the first Data Packet (for - * example, the beginning of the Data Object + 50 bytes). - * - * o indexEntryOffsets -- Specifies the offset. An offset value of - * 0xffffffff indicates an invalid offset value. - * - * @return Array - */ - public function getIndexBlocks() { return $this->_indexBlocks; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/IndexParameters.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/IndexParameters.php deleted file mode 100644 index d8229d9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/IndexParameters.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IndexParameters.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Index Parameters Object</i> supplies information about those streams - * that are actually indexed (there must be at least one stream in an index) by - * the {@link ASF_Object_Index Index Object} and how they are being indexed. - * This object shall be present in the {@link ASF_Object_Header Header Object} - * if there is an {@link ASF_Object_Index Index Object} present in the file. - * - * An Index Specifier is required for each stream that will be indexed by the - * {@link ASF_Object_Index Index Object}. These specifiers must exactly match - * those in the {@link ASF_Object_Index Index Object}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_IndexParameters extends ASF_Object -{ - /** @var string */ - private $_indexEntryTimeInterval; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_indexEntryTimeInterval = $this->_reader->readUInt32LE(); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) { - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - } - } - - /** - * Returns the time interval between index entries in milliseconds. This value - * cannot be 0. - * - * @return integer - */ - public function getIndexEntryTimeInterval() - { - return $this->_indexEntryTimeInterval; - } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the Index Specifiers - * refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. Values are as follows: - * 1 = Nearest Past Data Packet, - * 2 = Nearest Past Media Object, and - * 3 = Nearest Past Cleanpoint. - * The Nearest Past Data Packet indexes point to the data packet whose - * presentation time is closest to the index entry time. The Nearest Past - * Object indexes point to the closest data packet containing an entire - * object or first fragment of an object. The Nearest Past Cleanpoint - * indexes point to the closest data packet containing an entire object - * (or first fragment of an object) that has the Cleanpoint Flag set. - * Nearest Past Cleanpoint is the most common type of index. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/LanguageList.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/LanguageList.php deleted file mode 100644 index 13c6950..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/LanguageList.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: LanguageList.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Language List Object</i> contains an array of Unicode-based language - * IDs. All other header objects refer to languages through zero-based positions - * in this array. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_LanguageList extends ASF_Object -{ - /** @var Array */ - private $_languages = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $languageIdRecordsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $languageIdRecordsCount; $i++) { - $languageIdLength = $this->_reader->readInt8(); - $languageId = $this->_reader->readString16LE($languageIdLength); - $this->_languages[] = iconv - ("utf-16le", $this->getOption("encoding"), $languageId); - } - } - - /** - * Returns the array of language ids. - * - * @return Array - */ - public function getLanguage() { return $this->_languages; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Marker.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Marker.php deleted file mode 100644 index 697cb4a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Marker.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Marker.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Marker Object</i> class. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_Marker extends ASF_Object -{ - /** @var string */ - private $_name; - - /** @var Array */ - private $_markers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(16); - $markersCount = $this->_reader->readUInt32LE(); - $this->_reader->skip(2); - $nameLength = $this->_reader->readUInt16LE(); - $this->_name = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($nameLength)); - for ($i = 0; $i < $markersCount; $i++) { - $marker = array - ("offset" => $this->_reader->readInt64LE(), - "presentationTime" => $this->_reader->readInt64LE()); - $this->_reader->skip(2); - $marker["sendTime"] = $this->_reader->readUInt32LE(); - $marker["flags"] = $this->_reader->readUInt32LE(); - $descriptionLength = $this->_reader->readUInt32LE(); - $marker["description"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($descriptionLength)); - $this->_markers[] = $marker; - } - } - - /** - * Returns the name of the Marker Object. - * - * @return Array - */ - public function getName() { return $this->_name; } - - /** - * Returns an array of markers. Each entry consists of the following keys. - * - * o offset -- Specifies a byte offset into the <i>Data Object</i> to the - * actual position of the marker in the <i>Data Object</i>. ASF parsers - * must seek to this position to properly display data at the specified - * marker <i>Presentation Time</i>. - * - * o presentationTime -- Specifies the presentation time of the marker, in - * 100-nanosecond units. - * - * o sendTime -- Specifies the send time of the marker entry, in - * milliseconds. - * - * o flags -- Flags are reserved and should be set to 0. - * - * o description -- Specifies a description of the marker entry. - * - * @return Array - */ - public function getMarkers() { return $this->_markers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndex.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndex.php deleted file mode 100644 index 676abd1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndex.php +++ /dev/null @@ -1,176 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MediaObjectIndex.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * This top-level ASF object supplies media object indexing information for the - * streams of an ASF file. It includes stream-specific indexing information - * based on an adjustable index entry media object count interval. This object - * can be used to index all the video frames or key frames in a video stream. - * The index is designed to be broken into blocks to facilitate storage that is - * more space-efficient by using 32-bit offsets relative to a 64-bit base. That - * is, each index block has a full 64-bit offset in the block header that is - * added to the 32-bit offset found in each index entry. If a file is larger - * than 2^32 bytes, then multiple index blocks can be used to fully index the - * entire large file while still keeping index entry offsets at 32 bits. - * - * Indices into the <i>Media Object Index Object</i> are in terms of media - * object numbers, with the first frame for a given stream in the ASF file - * corresponding to entry 0 in the <i>Media Object Index Object</i>. The - * corresponding <i>Offset</i> field values of the <i>Index Entry</i> are byte - * offsets that, when combined with the <i>Block Position</i> value of the - * Index Block, indicate the starting location in bytes of an ASF Data Packet - * relative to the start of the first ASF Data Packet in the file. - * - * Any ASF file containing a <i>Media Object Index Object</i> shall also contain - * a <i>Media Object Index Parameters Object</i> in its - * {@link ASF_Object_Header ASF Header}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_MediaObjectIndex extends ASF_Object -{ - /** - * Indicates that the index type is Nearest Past Data Packet. The Nearest - * Past Data Packet indexes point to the data packet whose presentation time - * is closest to the index entry time. - */ - const NEAREST_PAST_DATA_PACKET = 1; - - /** - * Indicates that the index type is Nearest Past Media. The Nearest Past - * Object indexes point to the closest data packet containing an entire object - * or first fragment of an object. - */ - const NEAREST_PAST_MEDIA = 2; - - /** - * Indicates that the index type is Nearest Past Cleanpoint. The Nearest Past - * Cleanpoint indexes point to the closest data packet containing an entire - * object (or first fragment of an object) that has the Cleanpoint Flag set. - * - * Nearest Past Cleanpoint is the most common type of index. - */ - const NEAREST_PAST_CLEANPOINT = 3; - - /** @var integer */ - private $_indexEntryCountInterval; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** @var Array */ - private $_indexBlocks = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_indexEntryCountInterval = $this->_reader->readUInt32LE(); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - $indexBlocksCount = $this->_reader->readUInt32LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - for ($i = 0; $i < $indexBlocksCount; $i++) { - $indexEntryCount = $this->_reader->readUInt32LE(); - $blockPositions = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $blockPositions[] = $this->_reader->readInt64LE(); - $offsets = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $offsets[] = $this->_reader->readUInt32LE(); - $this->_indexBlocks[] = array - ("blockPositions" => $blockPositions, - "indexEntryOffsets" => $offsets); - } - } - - /** - * Returns the interval between each index entry in number of media objects. - * - * @return integer - */ - public function getIndexEntryCountInterval() - { - return $this->_indexEntryCountInterval; - } - - /** - * Returns an array of index specifiers. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the <i>Index - * Specifiers</i> refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o blockPositions -- Specifies a list of byte offsets of the beginnings of - * the blocks relative to the beginning of the first Data Packet (for - * example, the beginning of the Data Object + 50 bytes). - * - * o indexEntryOffsets -- Specifies the offset. An offset value of - * 0xffffffff indicates an invalid offset value. - * - * @return Array - */ - public function getIndexBlocks() { return $this->_indexBlocks; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndexParameters.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndexParameters.php deleted file mode 100644 index ffc8998..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MediaObjectIndexParameters.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MediaObjectIndexParameters.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Media Object Index Parameters Object</i> supplies information about - * those streams that actually indexed (there must be at least one stream in an - * index) by media objects. This object shall be present in the - * {@link ASF_Object_Header Header Object} if there is a - * {@link ASF_Object_MediaObjectIndex Media Object Index Object} present in the - * file. - * - * An Index Specifier is required for each stream that will be indexed by the - * {@link ASF_Object_MediaObjectIndex Media Object Index Object}. These - * specifiers must exactly match those in the - * {@link ASF_Object_MediaObjectIndex Media Object Index Object}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_MediaObjectIndexParameters extends ASF_Object -{ - /** @var string */ - private $_indexEntryCountInterval; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_indexEntryCountInterval = $this->_reader->readUInt32LE(); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) { - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - } - } - - /** - * Returns the interval between each index entry by the number of media - * objects. This value cannot be 0. - * - * @return integer - */ - public function getIndexEntryCountInterval() - { - return $this->_indexEntryCountInterval; - } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the Index Specifiers - * refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. Values are defined as - * follows: - * 1 = Nearest Past Data Packet, - * 2 = Nearest Past Media Object, - * 3 = Nearest Past Cleanpoint, - * 0xff = Frame Number Offset. - * For a video stream, the Nearest Past Media Object and Nearest Past Data - * Packet indexes point to the closest data packet containing an entire - * video frame or first fragment of a video frame; Nearest Past Cleanpoint - * indexes point to the closest data packet containing an entire video - * frame (or first fragment of a video frame) that is a key frame; and - * Frame Number Offset indicates how many more frames need to be read for - * the given stream, starting with the first frame in the packet pointed - * to by the index entry, in order to get to the requested frame. Nearest - * Past Media Object is the most common value. Because ASF payloads do not - * contain the full frame number, there is often a Frame Number Offset - * index alongside one of the other types of indexes to allow the user to - * identify the exact frame being seeked to. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Metadata.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Metadata.php deleted file mode 100644 index 67b75e2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Metadata.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Metadata.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Metadata Object</i> permits authors to store stream-based metadata in - * a file. This object supports the same types of metadata information as the - * <i>Extended Content Description Object</i> except that it also allows a - * stream number to be specified. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_Metadata extends ASF_Object -{ - /** @var Array */ - private $_descriptions = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $descriptionRecordsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $descriptionRecordsCount; $i++) { - $this->_reader->skip(2); - $record = array("streamNumber" => $this->_reader->readUInt16LE()); - $nameLength = $this->_reader->readUInt16LE(); - $dataType = $this->_reader->readUInt16LE(); - $dataLength = $this->_reader->readUInt32LE(); - $record["name"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($nameLength)); - switch ($dataType) { - case 0: - $record["data"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($dataLength)); - break; - case 1: - $record["data"] = $this->_reader->readString16LE($dataLength); - break; - case 2: - $record["data"] = $this->_reader->readUInt16LE() ? true : false; - break; - case 3: - $record["data"] = $this->_reader->readUInt32LE(); - break; - case 4: - $record["data"] = $this->_reader->readInt64LE(); - break; - case 5: - $record["data"] = $this->_reader->readUInt16LE(); - break; - } - $this->_descriptions[] = $record; - } - } - - /** - * Returns the array of description records. - * - * @return Array - */ - public function getDescriptions() { return $this->_descriptions; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MetadataLibrary.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MetadataLibrary.php deleted file mode 100644 index 4a03fdf..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/MetadataLibrary.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MetadataLibrary.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Metadata Library Object</i> lets authors store stream-based, - * language-attributed, multiply defined, and large metadata attributes in a - * file. - * - * This object supports the same types of metadata as the - * <i>{@link ASF_Object_Metadata Metadata Object}</i>, as well as attributes - * with language IDs, attributes that are defined more than once, large - * attributes, and attributes with the GUID data type. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_MetadataLibrary extends ASF_Object -{ - /** @var Array */ - private $_descriptionRecords = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $descriptionRecordsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $descriptionRecordsCount; $i++) { - $descriptionRecord = array - ("languageIndex" => $this->_reader->readUInt16LE(), - "streamNumber" => $this->_reader->readUInt16LE()); - $nameLength = $this->_reader->readUInt16LE(); - $dataType = $this->_reader->readUInt16LE(); - $dataLength = $this->_reader->readUInt32LE(); - $descriptionRecord["name"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($nameLength)); - switch ($dataType) { - case 0: // Unicode string - $descriptionRecord["data"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($dataLength)); - break; - case 1: // BYTE array - $descriptionRecord["data"] = $this->_reader->read($dataLength); - break; - case 2: // BOOL - $descriptionRecord["data"] = $this->_reader->readUInt16LE() == 1; - break; - case 3: // DWORD - $descriptionRecord["data"] = $this->_reader->readUInt32LE(); - break; - case 4: // QWORD - $descriptionRecord["data"] = $this->_reader->readInt64LE(); - break; - case 5: // WORD - $descriptionRecord["data"] = $this->_reader->readUInt16LE(); - break; - case 6: // GUID - $descriptionRecord["data"] = $this->_reader->readGUID(); - break; - } - $this->_descriptionRecords[] = $descriptionRecord; - } - } - - /** - * Returns an array of description records. Each record consists of the - * following keys. - * - * o languageIndex -- Specifies the index into the <i>Language List - * Object</i> that identifies the language of this attribute. If there is - * no <i>Language List Object</i> present, this field is zero. - * - * o streamNumber -- Specifies whether the entry applies to a specific - * digital media stream or whether it applies to the whole file. A value - * of 0 in this field indicates that it applies to the whole file; - * otherwise, the entry applies only to the indicated stream number. Valid - * values are between 1 and 127. - * - * o name -- Specifies the name that identifies the attribute being - * described. - * - * o data -- Specifies the actual metadata being stored. - * - * @return Array - */ - public function getDescriptionRecords() { return $this->_descriptionRecords; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Padding.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Padding.php deleted file mode 100644 index 4e0be36..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/Padding.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Padding.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Padding Object</i> is a dummy object that is used to pad the size of - * the <i>Header Object</i>. This object enables the size of any object stored - * in the <i>Header Object</i> to grow or shrink without having to rewrite the - * entire <i>Data Object</i> and <i>Index Object</i> sections of the ASF file. - * For instance, if entries in the <i>Content Description Object</i> or - * <i>Extended Content Description Object</i> need to be removed or shortened, - * the size of the <i>Padding Object</i> can be increased to compensate for the - * reduction in size of the <i>Content Description Object</i>. The ASF file can - * then be updated by overwriting the previous <i>Header Object</i> with the - * edited <i>Header Object</i> of identical size, without having to move or - * rewrite the data contained in the <i>Data Object</i>. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_Padding extends ASF_Object -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ScriptCommand.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ScriptCommand.php deleted file mode 100644 index 4fdbfd6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/ScriptCommand.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ScriptCommand.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Script Command Object</i> provides a list of type/parameter pairs of - * strings that are synchronized to the ASF file's timeline. Types can include - * URL or FILENAME values. Other type values may also be freely defined and - * used. The semantics and treatment of this set of types are defined by the - * local implementations. The parameter value is specific to the type field. You - * can use this type/parameter pairing for many purposes, including sending URLs - * to be launched by a client into an HTML frame (in other words, the URL type) - * or launching another ASF file for the chained continuous play of audio or - * video presentations (in other words, the FILENAME type). This object is also - * used as a method to stream text, as well as to provide script commands that - * you can use to control elements within the client environment. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_ScriptCommand extends ASF_Object -{ - /** @var Array */ - private $_commandTypes = array(); - - /** @var Array */ - private $_commands = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(16); - $commandsCount = $this->_reader->readUInt16LE(); - $commandTypesCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $commandTypesCount; $i++) { - $commandTypeNameLength = $this->_reader->readUInt16LE(); - $this->_commandTypes[] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($commandTypeNameLength * 2)); - } - for ($i = 0; $i < $commandsCount; $i++) { - $command = array - ("presentationTime" => $this->_reader->readUInt32LE(), - "typeIndex" => $this->_reader->readUInt16LE()); - $commandNameLength = $this->_reader->readUInt16LE(); - $command["name"] = iconv - ("utf-16le", $this->getOption("encoding"), - $this->_reader->readString16LE($commandNameLength * 2)); - $this->_commands[] = $command; - } - } - - /** - * Returns an array of command type names. - * - * @return Array - */ - public function getCommandTypes() { return $this->_commandTypes; } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o presentationTime -- Specifies the presentation time of the command, in - * milliseconds. - * - * o typeIndex -- Specifies the type of this command, as a zero-based index - * into the array of Command Types of this object. - * - * o name -- Specifies the name of this command. - * - * @return Array - */ - public function getCommands() { return $this->_commands; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/SimpleIndex.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/SimpleIndex.php deleted file mode 100644 index 14de7c9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/SimpleIndex.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SimpleIndex.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * For each video stream in an ASF file, there should be one instance of the - * <i>Simple Index Object</i>. Additionally, the instances of the <i>Simple - * Index Object</i> shall be ordered by stream number. - * - * Index entries in the <i>Simple Index Object</i> are in terms of - * <i>Presentation Times</i>. The corresponding <i>Packet Number</i> field - * values (of the <i>Index Entry</i>, see below) indicate the packet number of - * the ASF <i>Data Packet</i> with the closest past key frame. Note that for - * video streams that contain both key frames and non-key frames, the <i>Packet - * Number</i> field will always point to the closest past key frame. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_SimpleIndex extends ASF_Object -{ - /** @var string */ - private $_fileId; - - /** @var integer */ - private $_indexEntryTimeInterval; - - /** @var integer */ - private $_maximumPacketCount; - - /** @var Array */ - private $_indexEntries = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_fileId = $this->_reader->readGUID(); - $this->_indexEntryTimeInterval = $this->_reader->readInt64LE(); - $this->_maximumPacketCount = $this->_reader->readUInt32LE(); - $indexEntriesCount = $this->_reader->readUInt32LE(); - for ($i = 0; $i < $indexEntriesCount; $i++) { - $this->_indexEntries[] = array - ("packetNumber" => $this->_reader->readUInt32LE(), - "packetCount" => $this->_reader->readUInt16LE()); - } - } - - /** - * Returns the unique identifier for this ASF file. The value of this field - * should be changed every time the file is modified in any way. The value of - * this field may be set to 0 or set to be identical to the value of the - * <i>File ID</i> field of the <i>Data Object</i> and the <i>Header - * Object</i>. - * - * @return string - */ - public function getFileId() { return $this->_fileId; } - - /** - * Returns the time interval between each index entry in 100-nanosecond units. - * The most common value is 10000000, to indicate that the index entries are - * in 1-second intervals, though other values can be used as well. - * - * @return integer - */ - public function getIndexEntryTimeInterval() - { - return $this->_indexEntryTimeInterval; - } - - /** - * Returns the maximum <i>Packet Count</i> value of all <i>Index Entries</i>. - * - * @return integer - */ - public function getMaximumPacketCount() { return $this->_maximumPacketCount; } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o packetNumber -- Specifies the number of the Data Packet associated - * with this index entry. Note that for video streams that contain both - * key frames and non-key frames, this field will always point to the - * closest key frame prior to the time interval. - * - * o packetCount -- Specifies the number of <i>Data Packets</i> to send at - * this index entry. If a video key frame has been fragmented into two - * Data Packets, the value of this field will be equal to 2. - * - * @return Array - */ - public function getIndexEntries() { return $this->_indexEntries; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamBitrateProperties.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamBitrateProperties.php deleted file mode 100644 index 98fd037..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamBitrateProperties.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: StreamBitrateProperties.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Stream Bitrate Properties Object</i> defines the average bit rate of - * each digital media stream. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_StreamBitrateProperties extends ASF_Object -{ - /** @var Array */ - private $_bitrateRecords = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $bitrateRecordsCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $bitrateRecordsCount; $i++) - $this->_bitrateRecords[] = array - ("streamNumber" => ($tmp = $this->_reader->readInt16LE()) & 0x1f, - "flags" => $tmp >> 5, - "averageBitrate" => $this->_reader->readUInt32LE()); - } - - /** - * Returns an array of bitrate records. Each record consists of the following - * keys. - * - * o streamNumber -- Specifies the number of this stream described by this - * record. 0 is an invalid stream. Valid values are between 1 and 127. - * - * o flags -- These bits are reserved and should be set to 0. - * - * o averageBitrate -- Specifies the average bit rate of the stream in bits - * per second. This value should include an estimate of ASF packet and - * payload overhead associated with this stream. - * - * @return Array - */ - public function getBitrateRecords() { return $this->_bitrateRecords; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php deleted file mode 100644 index e5f1bf5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: StreamPrioritization.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Stream Prioritization Object</i> indicates the author's intentions as - * to which streams should or should not be dropped in response to varying - * network congestion situations. There may be special cases where this - * preferential order may be ignored (for example, the user hits the "mute" - * button). Generally it is expected that implementations will try to honor the - * author's preference. - * - * The priority of each stream is indicated by how early in the list that - * stream's stream number is listed (in other words, the list is ordered in - * terms of decreasing priority). - * - * The Mandatory flag field shall be set if the author wants that stream kept - * "regardless". If this flag is not set, then that indicates that the stream - * should be dropped in response to network congestion situations. Non-mandatory - * streams must never be assigned a higher priority than mandatory streams. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_StreamPrioritization extends ASF_Object -{ - /** @var Array */ - private $_priorityRecords = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - $priorityRecordCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $priorityRecordCount; $i++) - $this->_priorityRecords[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "flags" => $this->_reader->readUInt16LE()); - } - - /** - * Returns an array of records. Each record consists of the following keys. - * - * o streamNumber -- Specifies the stream number. Valid values are between - * 1 and 127. - * - * o flags -- Specifies the flags. The mandatory flag is the bit 1 (LSB). - * - * @return Array - */ - public function getPriorityRecords() { return $this->_priorityRecords; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamProperties.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamProperties.php deleted file mode 100644 index 8c42d57..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamProperties.php +++ /dev/null @@ -1,288 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: StreamProperties.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Stream Properties Object</i> defines the specific properties and - * characteristics of a digital media stream. This object defines how a digital - * media stream within the <i>Data Object</i> is interpreted, as well as the - * specific format (of elements) of the <i>Data Packet</i> itself. - * - * Whereas every stream in an ASF presentation, including each stream in a - * mutual exclusion relationship, must be represented by a <i>Stream Properties - * Object</i>, in certain cases, this object might be found embedded in the - * <i>Extended Stream Properties Object</i>. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -final class ASF_Object_StreamProperties extends ASF_Object -{ - /** - * Indicates, if set, that the data contained in this stream is encrypted and - * will be unreadable unless there is a way to decrypt the stream. - */ - const ENCRYPTED_CONTENT = 0x8000; - - const AUDIO_MEDIA = "f8699e40-5b4d-11cf-a8fd-00805f5c442b"; - const VIDEO_MEDIA = "bc19efc0-5b4d-11cf-a8fd-00805f5c442b"; - const COMMAND_MEDIA = "59dacfc0-59e6-11d0-a3ac-00a0c90348f6"; - const JFIF_MEDIA = "b61be100-5b4e-11cf-a8fD-00805f5c442b"; - const DEGRADABLE_JPEG_MEDIA = "35907dE0-e415-11cf-a917-00805f5c442b"; - const FILE_TRANSFER_MEDIA = "91bd222c-f21c-497a-8b6d-5aa86bfc0185"; - const BINARY_MEDIA = "3afb65e2-47ef-40f2-ac2c-70a90d71d343"; - - const NO_ERROR_CORRECTION = "20fb5700-5b55-11cf-a8fd-00805f5c442b"; - const AUDIO_SPREAD = "bfc3cd50-618f-11cf-8bb2-00aa00b4e220"; - - /** @var string */ - private $_streamType; - - /** @var string */ - private $_errorCorrectionType; - - /** @var integer */ - private $_timeOffset; - - /** @var integer */ - private $_flags; - - /** @var Array */ - private $_typeSpecificData = array(); - - /** @var Array */ - private $_errorCorrectionData = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_streamType = $this->_reader->readGUID(); - $this->_errorCorrectionType = $this->_reader->readGUID(); - $this->_timeOffset = $this->_reader->readInt64LE(); - $typeSpecificDataLength = $this->_reader->readUInt32LE(); - $errorCorrectionDataLength = $this->_reader->readUInt32LE(); - $this->_flags = $this->_reader->readUInt16LE(); - $this->_reader->skip(4); - switch ($this->_streamType) { - case self::AUDIO_MEDIA: - $this->_typeSpecificData = array - ("codecId" => $this->_reader->readUInt16LE(), - "numberOfChannels" => $this->_reader->readUInt16LE(), - "samplesPerSecond" => $this->_reader->readUInt32LE(), - "avgNumBytesPerSecond" => $this->_reader->readUInt32LE(), - "blockAlignment" => $this->_reader->readUInt16LE(), - "bitsPerSample" => $this->_reader->readUInt16LE()); - $codecSpecificDataSize = $this->_reader->readUInt16LE(); - $this->_typeSpecificData["codecSpecificData"] = - $this->_reader->read($codecSpecificDataSize); - break; - case self::VIDEO_MEDIA: - $this->_typeSpecificData = array - ("encodedImageWidth" => $this->_reader->readUInt32LE(), - "encodedImageHeight" => $this->_reader->readUInt32LE(), - "reservedFlags" => $this->_reader->readInt8()); - $this->_reader->skip(2); - $formatDataSize = $this->_reader->readUInt32LE(); - $this->_typeSpecificData = array_merge - ($this->_typeSpecificData, array - ("imageWidth" => $this->_reader->readUInt32LE(), - "imageHeight" => $this->_reader->readUInt32LE(), - "reserved" => $this->_reader->readUInt16LE(), - "bitsPerPixelCount" => $this->_reader->readUInt16LE(), - "compressionId" => $this->_reader->readUInt32LE(), - "imageSize" => $this->_reader->readUInt32LE(), - "horizontalPixelsPerMeter" => $this->_reader->readUInt32LE(), - "verticalPixelsPerMeter" => $this->_reader->readUInt32LE(), - "colorsUsedCount" => $this->_reader->readUInt32LE(), - "importantColorsCount" => $this->_reader->readUInt32LE(), - "codecSpecificData" => $this->_reader->read($formatDataSize - 38))); - break; - case self::JFIF_MEDIA: - $this->_typeSpecificData = array - ("imageWidth" => $this->_reader->readUInt32LE(), - "imageHeight" => $this->_reader->readUInt32LE(), - "reserved" => $this->_reader->readUInt32LE()); - break; - case self::DEGRADABLE_JPEG_MEDIA: - $this->_typeSpecificData = array - ("imageWidth" => $this->_reader->readUInt32LE(), - "imageHeight" => $this->_reader->readUInt32LE(), - $this->_reader->readUInt16LE(), - $this->_reader->readUInt16LE(), - $this->_reader->readUInt16LE()); - $interchangeDataSize = $this->_reader->readUInt16LE(); - if ($interchangeDataSize == 0) - $interchangeDataSize++; - $this->_typeSpecificData["interchangeData"] = - $this->_reader->read($interchangeDataSize); - break; - case self::FILE_TRANSFER_MEDIA: - case self::BINARY_MEDIA: - $this->_typeSpecificData = array - ("majorMediaType" => $this->_reader->getGUID(), - "mediaSubtype" => $this->_reader->getGUID(), - "fixedSizeSamples" => $this->_reader->readUInt32LE(), - "temporalCompression" => $this->_reader->readUInt32LE(), - "sampleSize" => $this->_reader->readUInt32LE(), - "formatType" => $this->_reader->getGUID()); - $formatDataSize = $this->_reader->readUInt32LE(); - $this->_typeSpecificData["formatData"] = - $this->_reader->read($formatDataSize); - break; - case self::COMMAND_MEDIA: - default: - $this->_reader->skip($typeSpecificDataLength); - } - switch ($this->_errorCorrectionType) { - case self::AUDIO_SPREAD: - $this->_errorCorrectionData = array - ("span" => $this->_reader->readInt8(), - "virtualPacketLength" => $this->_reader->readUInt16LE(), - "virtualChunkLength" => $this->_reader->readUInt16LE()); - $silenceDataSize = $this->_reader->readUInt16LE(); - $this->_errorCorrectionData["silenceData"] = - $this->_reader->read($silenceDataSize); - break; - case self::NO_ERROR_CORRECTION: - default: - $this->_reader->skip($errorCorrectionDataLength); - } - } - - /** - * Returns the number of this stream. 0 is an invalid stream. Valid values are - * between 1 and 127. The numbers assigned to streams in an ASF presentation - * may be any combination of unique values; parsing logic must not assume that - * streams are numbered sequentially. - * - * @return integer - */ - public function getStreamNumber() { return $this->_flags & 0x3f; } - - /** - * Returns the type of the stream (for example, audio, video, and so on). - * - * @return string - */ - public function getStreamType() { return $this->_streamType; } - - /** - * Returns the error correction type used by this digital media stream. For - * streams other than audio, this value should be set to NO_ERROR_CORRECTION. - * For audio streams, this value should be set to AUDIO_SPREAD. - * - * @return string - */ - public function getErrorCorrectionType() - { - return $this->_errorCorrectionType; - } - - /** - * Returns the presentation time offset of the stream in 100-nanosecond units. - * The value of this field is added to all of the timestamps of the samples in - * the stream. This value shall be equal to the send time of the first - * interleaved packet in the data section. The value of this field is - * typically 0. It is non-zero in the case when an ASF file is edited and it - * is not possible for the editor to change the presentation times and send - * times of ASF packets. Note that if more than one stream is present in an - * ASF file the offset values of all stream properties objects must be equal. - * - * @return integer - */ - public function getTimeOffset() { return $this->_timeOffset; } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the flags field. - * - * @return integer - */ - public function getFlags() { return $this->_flags; } - - /** - * Returns type-specific format data. The structure for the <i>Type-Specific - * Data</i> field is determined by the value stored in the <i>Stream Type</i> - * field. - * - * The type-specific data is returned as key-value pairs of an associate - * array. - * - * @return Array - */ - public function getTypeSpecificData() { return $this->_typeSpecificData; } - - /** - * Returns data specific to the error correction type. The structure for the - * <i>Error Correction Data</i> field is determined by the value stored in the - * <i>Error Correction Type</i> field. For example, an audio data stream might - * need to know how codec chunks were redistributed, or it might need a sample - * of encoded silence. - * - * The error correction type-specific data is returned as key-value pairs of - * an associate array. - * - * @return integer - */ - public function getErrorCorrectionData() - { - return $this->_errorCorrectionData; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndex.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndex.php deleted file mode 100644 index 943a353..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndex.php +++ /dev/null @@ -1,181 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TimecodeIndex.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * This top-level ASF object supplies timecode indexing information for the - * streams of an ASF file. It includes stream-specific indexing information - * based on the timecodes found in the file. If the <i>Timecode Index Object</i> - * is used, it is recommended that timecodes be stored as a <i>Payload Extension - * System</i> on the appropriate stream. It is also recommended that every - * timecode appearing in the ASF file have a corresponging index entry. - * - * The index is designed to be broken into blocks to facilitate storage that is - * more space-efficient by using 32-bit offsets relative to a 64-bit base. That - * is, each index block has a full 64-bit offset in the block header that is - * added to the 32-bit offsets found in each index entry. If a file is larger - * than 2^32 bytes, then multiple index blocks can be used to fully index the - * entire large file while still keeping index entry offsets at 32 bits. - * - * To locate an object with a particular timecode in an ASF file, one would - * typically look through the <i>Timecode Index Object</i> in blocks of the - * appropriate range and try to locate the nearest possible timecode. The - * corresponding <i>Offset</i> field values of the <i>Index Entry</i> are byte - * offsets that, when combined with the <i>Block Position</i> value of the Index - * Block, indicate the starting location in bytes of an ASF Data Packet relative - * to the start of the first ASF Data Packet in the file. - * - * Any ASF file containing a <i>Timecode Index Object</i> shall also contain a - * <i>Timecode Index Parameters Object</i> in its - * {@link ASF_Object_Header ASF Header}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_TimecodeIndex extends ASF_Object -{ - /** - * Indicates that the index type is Nearest Past Data Packet. The Nearest - * Past Data Packet indexes point to the data packet whose presentation time - * is closest to the index entry time. - */ - const NEAREST_PAST_DATA_PACKET = 1; - - /** - * Indicates that the index type is Nearest Past Media. The Nearest Past - * Object indexes point to the closest data packet containing an entire object - * or first fragment of an object. - */ - const NEAREST_PAST_MEDIA = 2; - - /** - * Indicates that the index type is Nearest Past Cleanpoint. The Nearest Past - * Cleanpoint indexes point to the closest data packet containing an entire - * object (or first fragment of an object) that has the Cleanpoint Flag set. - * - * Nearest Past Cleanpoint is the most common type of index. - */ - const NEAREST_PAST_CLEANPOINT = 3; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** @var Array */ - private $_indexBlocks = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(4); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - $indexBlocksCount = $this->_reader->readUInt32LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - for ($i = 0; $i < $indexBlocksCount; $i++) { - $indexEntryCount = $this->_reader->readUInt32LE(); - $timecodeRange = $this->_reader->readUInt16LE(); - $blockPositions = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $blockPositions[] = $this->_reader->readInt64LE(); - $indexEntries = array(); - for ($i = 0; $i < $indexEntryCount; $i++) { - $timecode = $this->_reader->readUInt32LE(); - $offsets = array(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) - $offsets[] = $this->_reader->readUInt32LE(); - $indexEntries[] = array - ("timecode" => $timecode, - "offsets" => $offsets); - } - $this->_indexBlocks[] = array - ("timecodeRange" => $timecodeRange, - "blockPositions" => $blockPositions, - "indexEntries" => $indexEntries); - } - } - - /** - * Returns an array of index specifiers. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the <i>Index - * Specifiers</i> refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o timecodeRange -- Specifies the timecode range for this block. - * Subsequent blocks must contain range numbers greater than or equal to - * this one. - * - * o blockPositions -- Specifies a list of byte offsets of the beginnings of - * the blocks relative to the beginning of the first Data Packet (for - * example, the beginning of the Data Object + 50 bytes). - * - * o indexEntries -- An array that consists of the following keys - * o timecode -- This is the 4-byte timecode for these entries. - * o offsets -- Specifies the offset. An offset value of 0xffffffff - * indicates an invalid offset value. - * - * @return Array - */ - public function getIndexBlocks() { return $this->_indexBlocks; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndexParameters.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndexParameters.php deleted file mode 100644 index a7a9ef8..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/TimecodeIndexParameters.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ASF - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TimecodeIndexParameters.php 108 2008-09-05 17:00:05Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ASF/Object.php"); -/**#@-*/ - -/** - * The <i>Timecode Index Parameters Object</i> supplies information about those - * streams that are actually indexed (there must be at least one stream in an - * index) by timecodes. All streams referred to in the - * {@link ASF_Object_TimecodeIndexParameters Timecode Index Parameters Object} - * must have timecode Payload Extension Systems associated with them in the - * {@link ASF_Object_ExtendedStreamProperties Extended Stream Properties - * Object}. This object shall be present in the {@link ASF_Object_Header Header - * Object} if there is a {@link ASF_Object_TimecodeIndex Timecode Index Object} - * present in the file. - * - * An Index Specifier is required for each stream that will be indexed by the - * {@link ASF_Object_TimecodeIndex Timecode Index Object}. These specifiers must - * exactly match those in the {@link ASF_Object_TimecodeIndex Timecode Index - * Object}. - * - * @package php-reader - * @subpackage ASF - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 108 $ - */ -final class ASF_Object_TimecodeIndexParameters extends ASF_Object -{ - /** @var string */ - private $_indexEntryCountInterval; - - /** @var Array */ - private $_indexSpecifiers = array(); - - /** - * Constructs the class with given parameters and reads object related data - * from the ASF file. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_indexEntryCountInterval = $this->_reader->readUInt32LE(); - $indexSpecifiersCount = $this->_reader->readUInt16LE(); - for ($i = 0; $i < $indexSpecifiersCount; $i++) { - $this->_indexSpecifiers[] = array - ("streamNumber" => $this->_reader->readUInt16LE(), - "indexType" => $this->_reader->readUInt16LE()); - } - } - - /** - * Returns the interval between each index entry by the number of media - * objects. This value cannot be 0. - * - * @return integer - */ - public function getIndexEntryCountInterval() - { - return $this->_indexEntryCountInterval; - } - - /** - * Returns an array of index entries. Each entry consists of the following - * keys. - * - * o streamNumber -- Specifies the stream number that the Index Specifiers - * refer to. Valid values are between 1 and 127. - * - * o indexType -- Specifies the type of index. Values are defined as - * follows: - * 2 = Nearest Past Media Object, - * 3 = Nearest Past Cleanpoint (1 is not a valid value). - * For a video stream, The Nearest Past Media Object indexes point to the - * closest data packet containing an entire video frame or the first - * fragment of a video frame, and the Nearest Past Cleanpoint indexes - * point to the closest data packet containing an entire video frame (or - * first fragment of a video frame) that is a key frame. Nearest Past - * Media Object is the most common value. - * - * @return Array - */ - public function getIndexSpecifiers() { return $this->_indexSpecifiers; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Encoding.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Encoding.php deleted file mode 100644 index 5fd8e7f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Encoding.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Encoding.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/** - * The <var>Encoding</var> interface implies that the ID3v2 frame supports - * content encoding. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -interface ID3_Encoding -{ - /** The ISO-8859-1 encoding. */ - const ISO88591 = 0; - - /** The UTF-16 Unicode encoding with BOM. */ - const UTF16 = 1; - - /** The UTF-16LE Unicode encoding without BOM. */ - const UTF16LE = 4; - - /** The UTF-16BE Unicode encoding without BOM. */ - const UTF16BE = 2; - - /** The UTF-8 Unicode encoding. */ - const UTF8 = 3; - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding(); - - /** - * Sets the text encoding. - * - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding); -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Exception.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Exception.php deleted file mode 100644 index e9b2a8b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Exception.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Exception.php 39 2008-03-26 17:27:22Z svollbehr $ - */ - -/** - * The ID3_Exception is thrown whenever an error occurs within the {@link ID3v1} - * or the {@link ID3v2} classes. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 39 $ - */ -class ID3_Exception extends Exception -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/ExtendedHeader.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/ExtendedHeader.php deleted file mode 100644 index 9a90bd5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/ExtendedHeader.php +++ /dev/null @@ -1,323 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ExtendedHeader.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Object.php"); -/**#@-*/ - -/** - * The extended header contains information that can provide further insight in - * the structure of the tag, but is not vital to the correct parsing of the tag - * information; hence the extended header is optional. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_ExtendedHeader extends ID3_Object -{ - /** - * A flag to denote that the present tag is an update of a tag found earlier - * in the present file or stream. If frames defined as unique are found in - * the present tag, they are to override any corresponding ones found in the - * earlier tag. This flag has no corresponding data. - * - * @since ID3v2.4.0 - */ - const UPDATE = 64; - - /** - * @since ID3v2.4.0 A flag to denote that a CRC-32 data is included in the - * extended header. The CRC is calculated on all the data between the header - * and footer as indicated by the header's tag length field, minus the - * extended header. Note that this includes the padding (if there is any), but - * excludes the footer. The CRC-32 is stored as an 35 bit synchsafe integer, - * leaving the upper four bits always zeroed. - * - * @since ID3v2.3.0 The CRC is calculated before unsynchronisation on the data - * between the extended header and the padding, i.e. the frames and only the - * frames. - */ - const CRC32 = 32; - - /** - * A flag to denote whether or not the tag has restrictions applied on it. - * - * @since ID3v2.4.0 - */ - const RESTRICTED = 16; - - /** @var integer */ - private $_size; - - /** @var integer */ - private $_flags = 0; - - /** @var integer */ - private $_padding; - - /** @var integer */ - private $_crc; - - /** @var integer */ - private $_restrictions = 0; - - /** - * Constructs the class with given parameters and reads object related data - * from the ID3v2 tag. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $offset = $this->_reader->getOffset(); - $this->_size = $this->_reader->readUInt32BE(); - - /* ID3v2.3.0 ExtendedHeader */ - if ($this->getOption("version", 4) < 4) { - if ($this->_reader->readUInt16BE() == 0x8000) - $this->_flags = self::CRC32; - $this->_padding = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::CRC32)) - $this->_crc = Transform::readUInt32BE(); - } - - /* ID3v2.4.0 ExtendedHeader */ - else { - $this->_size = $this->decodeSynchsafe32($this->_size); - $this->_reader->skip(1); - $this->_flags = $this->_reader->readInt8(); - if ($this->hasFlag(self::UPDATE)) - $this->_reader->skip(1); - if ($this->hasFlag(self::CRC32)) { - $this->_reader->skip(1); - $this->_crc = - Transform::fromInt8($this->_reader->read(1)) * (0xfffffff + 1) + - decodeSynchsafe32(Transform::fromUInt32BE($this->_reader->read(4))); - } - if ($this->hasFlag(self::RESTRICTED)) { - $this->_reader->skip(1); - $this->_restrictions = $this->_reader->readInt8(1); - } - } - } - - /** - * Returns the extended header size in bytes. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the flags byte. - * - * @return integer - */ - public function getFlags($flags) { return $this->_flags; } - - /** - * Sets the flags byte. - * - * @param integer $flags The flags byte. - */ - public function setFlags($flags) { $this->_flags = $flags; } - - /** - * Returns the CRC-32 data. - * - * @return integer - */ - public function getCrc() - { - if ($this->hasFlag(self::CRC32)) - return $this->_crc; - return false; - } - - /** - * Sets whether the CRC-32 should be generated upon tag write. - * - * @param boolean $useCrc Whether CRC-32 should be generated. - */ - public function useCrc($useCrc) - { - if ($useCrc) - $this->setFlags($this->getFlags() | self::CRC32); - else - $this->setFlags($this->getFlags() & ~self::CRC32); - } - - /** - * Sets the CRC-32. The CRC-32 value is calculated of all the frames in the - * tag and includes padding. - * - * @param integer $crc The 32-bit CRC value. - */ - public function setCrc($crc) - { - if (is_bool($crc)) - $this->useCrc($crc); - else - $this->_crc = $crc; - } - - /** - * Returns the restrictions. For some applications it might be desired to - * restrict a tag in more ways than imposed by the ID3v2 specification. Note - * that the presence of these restrictions does not affect how the tag is - * decoded, merely how it was restricted before encoding. If this flag is set - * the tag is restricted as follows: - * - * <pre> - * Restrictions %ppqrrstt - * - * p - Tag size restrictions - * - * 00 No more than 128 frames and 1 MB total tag size. - * 01 No more than 64 frames and 128 KB total tag size. - * 10 No more than 32 frames and 40 KB total tag size. - * 11 No more than 32 frames and 4 KB total tag size. - * - * q - Text encoding restrictions - * - * 0 No restrictions - * 1 Strings are only encoded with ISO-8859-1 or UTF-8. - * - * r - Text fields size restrictions - * - * 00 No restrictions - * 01 No string is longer than 1024 characters. - * 10 No string is longer than 128 characters. - * 11 No string is longer than 30 characters. - * - * Note that nothing is said about how many bytes is used to represent those - * characters, since it is encoding dependent. If a text frame consists of - * more than one string, the sum of the strungs is restricted as stated. - * - * s - Image encoding restrictions - * - * 0 No restrictions - * 1 Images are encoded only with PNG [PNG] or JPEG [JFIF]. - * - * t - Image size restrictions - * - * 00 No restrictions - * 01 All images are 256x256 pixels or smaller. - * 10 All images are 64x64 pixels or smaller. - * 11 All images are exactly 64x64 pixels, unless required otherwise. - * </pre> - * - * @return integer - */ - public function getRestrictions() { return $this->_restrictions; } - - /** - * Sets the restrictions byte. See {@link #getRestrictions} for more. - * - * @param integer $restrictions The restrictions byte. - */ - public function setRestrictions($restrictions) - { - $this->_restrictions = $restrictions; - } - - /** - * Returns the total padding size, or simply the total tag size excluding the - * frames and the headers. - * - * @return integer - * @deprecated ID3v2.3.0 - */ - public function getPadding() { return $this->_padding; } - - /** - * Sets the total padding size, or simply the total tag size excluding the - * frames and the headers. - * - * @param integer $padding The padding size. - * @deprecated ID3v2.3.0 - */ - public function setPadding($padding) { return $this->_padding = $padding; } - - /** - * Returns the header raw data. - * - * @return string - */ - public function __toString() - { - /* ID3v2.3.0 ExtendedHeader */ - if ($this->getOption("version", 4) < 4) { - return Transform::toUInt32BE($this->_size) . - Transform::toUInt16BE($this->hasFlag(self::CRC32) ? 0x8000 : 0) . - Transform::toUInt32BE($this->_padding) . - ($this->hasFlag(self::CRC32) ? Transform::toUInt32BE($this->_crc) : ""); - } - - /* ID3v2.4.0 ExtendedHeader */ - else { - return Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) . - Transform::toInt8(1) . Transform::toInt8($this->_flags) . - ($this->hasFlag(self::UPDATE) ? "\0" : "") . - ($this->hasFlag(self::CRC32) ? Transform::toInt8(5) . - Transform::toInt8($this->_crc & 0xf0000000 >> 28 & 0xf /*eq >>> 28*/) . - Transform::toUInt32BE($this->encodeSynchsafe32($this->_crc)) : "") . - ($this->hasFlag(self::RESTRICTED) ? - Transform::toInt8(1) . Transform::toInt8($this->_restrictions) : ""); - } - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame.php deleted file mode 100644 index cf4a6dc..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame.php +++ /dev/null @@ -1,295 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Frame.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Object.php"); -/**#@-*/ - -/** - * A base class for all ID3v2 frames as described in the - * {@link http://www.id3.org/id3v2.4.0-frames ID3v2 frames document}. - * - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -class ID3_Frame extends ID3_Object -{ - /** - * This flag tells the tag parser what to do with this frame if it is unknown - * and the tag is altered in any way. This applies to all kinds of - * alterations, including adding more padding and reordering the frames. - */ - const DISCARD_ON_TAGCHANGE = 16384; - - /** - * This flag tells the tag parser what to do with this frame if it is unknown - * and the file, excluding the tag, is altered. This does not apply when the - * audio is completely replaced with other audio data. - */ - const DISCARD_ON_FILECHANGE = 8192; - - /** - * This flag, if set, tells the software that the contents of this frame are - * intended to be read only. Changing the contents might break something, - * e.g. a signature. - */ - const READ_ONLY = 4096; - - /** - * This flag indicates whether or not this frame belongs in a group with - * other frames. If set, a group identifier byte is added to the frame. Every - * frame with the same group identifier belongs to the same group. - */ - const GROUPING_IDENTITY = 32; - - /** - * This flag indicates whether or not the frame is compressed. A <i>Data - * Length Indicator</i> byte is included in the frame. - * - * @see DATA_LENGTH_INDICATOR - */ - const COMPRESSION = 8; - - /** - * This flag indicates whether or not the frame is encrypted. If set, one byte - * indicating with which method it was encrypted will be added to the frame. - * See description of the {@link ID3_Frame_ENCR} frame for more information - * about encryption method registration. Encryption should be done after - * compression. Whether or not setting this flag requires the presence of a - * <i>Data Length Indicator</i> depends on the specific algorithm used. - * - * @see DATA_LENGTH_INDICATOR - */ - const ENCRYPTION = 4; - - /** - * This flag indicates whether or not unsynchronisation was applied to this - * frame. - * - * @since ID3v2.4.0 - */ - const UNSYNCHRONISATION = 2; - - /** - * This flag indicates that a data length indicator has been added to the - * frame. - * - * @since ID3v2.4.0 - */ - const DATA_LENGTH_INDICATOR = 1; - - /** @var integer */ - private $_identifier; - - /** @var integer */ - private $_size = 0; - - /** @var integer */ - private $_flags = 0; - - /** - * Raw content of the frame. - * - * @var string - */ - protected $_data = ""; - - /** - * Constructs the class with given parameters and reads object related data - * from the ID3v2 tag. - * - * @todo Only limited subset of flags are processed. - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) { - $this->_identifier = substr(get_class($this), -4); - } else { - $this->_identifier = $this->_reader->readString8(4); - - /* ID3v2.3.0 size and flags; convert flags to 2.4.0 format */ - if ($this->getOption("version", 4) < 4) { - $this->_size = $this->_reader->readUInt32BE(); - $flags = $this->_reader->readUInt16BE(); - if (($flags & 0x8000) == 0x8000) - $this->_flags |= self::DISCARD_ON_TAGCHANGE; - if (($flags & 0x4000) == 0x4000) - $this->_flags |= self::DISCARD_ON_FILECHANGE; - if (($flags & 0x2000) == 0x2000) - $this->_flags |= self::READ_ONLY; - if (($flags & 0x80) == 0x80) - $this->_flags |= self::COMPRESSION; - if (($flags & 0x40) == 0x40) - $this->_flags |= self::ENCRYPTION; - if (($flags & 0x20) == 0x20) - $this->_flags |= self::GROUPING_IDENTITY; - } - - /* ID3v2.4.0 size and flags */ - else { - $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); - $this->_flags = $this->_reader->readUInt16BE(); - } - - $dataLength = $this->_size; - if ($this->hasFlag(self::DATA_LENGTH_INDICATOR)) { - $dataLength = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); - $this->_size -= 4; - } - $this->_data = $this->_reader->read($this->_size); - $this->_size = $dataLength; - - if ($this->hasFlag(self::UNSYNCHRONISATION) || - $this->getOption("unsyncronisation", false) === true) - $this->_data = $this->decodeUnsynchronisation($this->_data); - } - } - - /** - * Returns the frame identifier string. - * - * @return string - */ - public function getIdentifier() { return $this->_identifier; } - - /** - * Sets the frame identifier. - * - * @param string $identifier The identifier. - */ - public function setIdentifier($identifier) - { - $this->_identifier = $identifier; - } - - /** - * Returns the size of the data in the final frame, after encryption, - * compression and unsynchronisation. The size is excluding the frame header. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the frame flags byte. - * - * @return integer - */ - public function getFlags($flags) { return $this->_flags; } - - /** - * Sets the frame flags byte. - * - * @param string $flags The flags byte. - */ - public function setFlags($flags) { $this->_flags = $flags; } - - /** - * Sets the frame raw data. - * - * @param string $data - */ - protected function setData($data) - { - $this->_data = $data; - $this->_size = strlen($data); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - /* ID3v2.3.0 Flags; convert from 2.4.0 format */ - if ($this->getOption("version", 4) < 4) { - $flags = 0; - if ($this->hasFlag(self::DISCARD_ON_TAGCHANGE)) - $flags = $flags | 0x8000; - if ($this->hasFlag(self::DISCARD_ON_FILECHANGE)) - $flags = $flags | 0x4000; - if ($this->hasFlag(self::READ_ONLY)) - $flags = $flags | 0x2000; - if ($this->hasFlag(self::COMPRESSION)) - $flags = $flags | 0x80; - if ($this->hasFlag(self::ENCRYPTION)) - $flags = $flags | 0x40; - if ($this->hasFlag(self::GROUPING_IDENTITY)) - $flags = $flags | 0x20; - } - - /* ID3v2.4.0 Flags */ - else - $flags = $this->_flags; - - $size = $this->_size; - if ($this->getOption("version", 4) < 4) - $data = $this->_data; - else { - $data = $this->encodeUnsynchronisation($this->_data); - if (($dataLength = strlen($data)) != $size) { - $size = 4 + $dataLength; - $data = Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)) . - $data; - $flags |= self::DATA_LENGTH_INDICATOR | self::UNSYNCHRONISATION; - $this->setOption("unsyncronisation", true); - } - } - return Transform::toString8(substr($this->_identifier, 0, 4), 4) . - Transform::toUInt32BE($this->encodeSynchsafe32($size)) . - Transform::toUInt16BE($flags) . $data; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AENC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AENC.php deleted file mode 100644 index a3971ae..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AENC.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: AENC.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Audio encryption</i> indicates if the actual audio stream is - * encrypted, and by whom. - * - * The identifier is a URL containing an email address, or a link to a location - * where an email address can be found, that belongs to the organisation - * responsible for this specific encrypted audio file. Questions regarding the - * encrypted audio should be sent to the email address specified. There may be - * more than one AENC frame in a tag, but only one with the same owner - * identifier. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_AENC extends ID3_Frame -{ - /** @var string */ - private $_owner; - - /** @var integer */ - private $_previewStart; - - /** @var integer */ - private $_previewLength; - - /** @var string */ - private $_encryptionInfo; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list($this->_owner, $this->_data) = $this->explodeString8($this->_data, 2); - $this->_previewStart = Transform::fromUInt16BE(substr($this->_data, 0, 2)); - $this->_previewLength = Transform::fromUInt16BE(substr($this->_data, 2, 2)); - $this->_encryptionInfo = substr($this->_data, 4); - } - - /** - * Returns the owner identifier string. - * - * @return string - */ - public function getOwner() { return $this->_owner; } - - /** - * Sets the owner identifier string. - * - * @param string $owner The owner identifier string. - */ - public function setOwner($owner) { $this->_owner = $owner; } - - /** - * Returns the pointer to an unencrypted part of the audio in frames. - * - * @return integer - */ - public function getPreviewStart() { return $this->_previewStart; } - - /** - * Sets the pointer to an unencrypted part of the audio in frames. - * - * @param integer $previewStart The pointer to an unencrypted part. - */ - public function setPreviewStart($previewStart) - { - $this->_previewStart = $previewStart; - } - - /** - * Returns the length of the preview in frames. - * - * @return integer - */ - public function getPreviewLength() { return $this->_previewLength; } - - /** - * Sets the length of the preview in frames. - * - * @param integer $previewLength The length of the preview. - */ - public function setPreviewLength($previewLength) - { - $this->_previewLength = $previewLength; - } - - /** - * Returns the encryption info. - * - * @return string - */ - public function getEncryptionInfo() { return $this->_encryptionInfo; } - - /** - * Sets the encryption info binary string. - * - * @param string $encryptionInfo The data string. - */ - public function setEncryptionInfo($encryptionInfo) - { - $this->_encryptionInfo = $encryptionInfo; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - ($this->_owner . "\0" . Transform::toUInt16BE($this->_previewStart) . - Transform::toUInt16BE($this->_previewLength) . $this->_encryptionInfo); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/APIC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/APIC.php deleted file mode 100644 index ebd4904..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/APIC.php +++ /dev/null @@ -1,253 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: APIC.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * The <i>Attached picture</i> frame contains a picture directly related to the - * audio file. Image format is the MIME type and subtype for the image. - * - * There may be several pictures attached to one file, each in their individual - * APIC frame, but only one with the same content descriptor. There may only - * be one picture with the same picture type. There is the possibility to put - * only a link to the image file by using the MIME type "-->" and having a - * complete URL instead of picture data. - * - * The use of linked files should however be used sparingly since there is the - * risk of separation of files. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_APIC extends ID3_Frame - implements ID3_Encoding -{ - /** - * The list of image types. - * - * @var Array - */ - public static $types = array - ("Other", "32x32 pixels file icon (PNG only)", "Other file icon", - "Cover (front)", "Cover (back)", "Leaflet page", - "Media (e.g. label side of CD)", "Lead artist/lead performer/soloist", - "Artist/performer", "Conductor", "Band/Orchestra", "Composer", - "Lyricist/text writer", "Recording Location", "During recording", - "During performance", "Movie/video screen capture", - "A bright coloured fish", "Illustration", "Band/artist logotype", - "Publisher/Studio logotype"); - - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_mimeType = "image/unknown"; - - /** @var integer */ - private $_imageType = 0; - - /** @var string */ - private $_description; - - /** @var string */ - private $_imageData; - - /** @var integer */ - private $_imageSize = 0; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_mimeType = substr - ($this->_data, 1, ($pos = strpos($this->_data, "\0", 1)) - 1); - $this->_imageType = Transform::fromUInt8($this->_data[++$pos]); - $this->_data = substr($this->_data, $pos + 1); - - switch ($this->_encoding) { - case self::UTF16: - list ($this->_description, $this->_imageData) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - break; - case self::UTF16BE: - list ($this->_description, $this->_imageData) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - break; - default: - list ($this->_description, $this->_imageData) = - $this->explodeString8($this->_data, 2); - } - - $this->_imageSize = strlen($this->_imageData); - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the MIME type. The MIME type is always ISO-8859-1 encoded. - * - * @return string - */ - public function getMimeType() { return $this->_mimeType; } - - /** - * Sets the MIME type. The MIME type is always ISO-8859-1 encoded. - * - * @param string $mimeType The MIME type. - */ - public function setMimeType($mimeType) { $this->_mimeType = $mimeType; } - - /** - * Returns the image type. - * - * @return integer - */ - public function getImageType() { return $this->_imageType; } - - /** - * Sets the image type code. - * - * @param integer $imageType The image type code. - */ - public function setImageType($imageType) { $this->_imageType = $imageType; } - - /** - * Returns the file description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. - * - * @param string $description The content description text. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $encoding = false) - { - $this->_description = $description; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the embedded image data. - * - * @return string - */ - public function getImageData() { return $this->_imageData; } - - /** - * Sets the embedded image data. Also updates the image size field to - * correspond the new data. - * - * @param string $imageData The image data. - */ - public function setImageData($imageData) - { - $this->_imageData = $imageData; - $this->_imageSize = strlen($imageData); - } - - /** - * Returns the size of the embedded image data. - * - * @return integer - */ - public function getImageSize() { return $this->_imageSize; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0" . - Transform::toUInt8($this->_imageType); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($this->_description, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) . - "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_description) . "\0\0"; - break; - default: - $data .= $this->_description . "\0"; - } - parent::setData($data . $this->_imageData); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ASPI.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ASPI.php deleted file mode 100644 index d51cc01..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ASPI.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ASPI.php 75 2008-04-14 23:57:21Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * Audio files with variable bit rates are intrinsically difficult to deal with - * in the case of seeking within the file. The <i>Audio seek point index</i> or - * ASPI frame makes seeking easier by providing a list a seek points within the - * audio file. The seek points are a fractional offset within the audio data, - * providing a starting point from which to find an appropriate point to start - * decoding. The presence of an ASPI frame requires the existence of a - * {@link ID3_Frame_TLEN} frame, indicating the duration of the file in - * milliseconds. There may only be one audio seek point index frame in a tag. - * - * @todo Data parsing and write support - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_ASPI extends ID3_Frame -{ - /** @var integer */ - private $_dataStart; - - /** @var integer */ - private $_dataLength; - - /** @var integer */ - private $_size; - - /** @var Array */ - private $_fractions = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - throw new ID3_Exception("Write not supported yet"); - - $this->_dataStart = Transform::fromInt32BE(substr($this->_data, 0, 4)); - $this->_dataLength = Transform::fromInt32BE(substr($this->_data, 4, 4)); - $this->_size = Transform::fromInt16BE(substr($this->_data, 8, 2)); - - $bitsPerPoint = Transform::fromInt8($this->_data[10]); - /*for ($i = 0, $offset = 11; $i < $this->_size; $i++) { - if ($bitsPerPoint == 16) { - $this->_fractions[$i] = substr($this->_data, $offset, 2); - $offset += 2; - } else { - $this->_fractions[$i] = substr($this->_data, $offset, 1); - $offset ++; - } - }*/ - } - - /** - * Returns the byte offset from the beginning of the file. - * - * @return integer - */ - public function getDataStart() { return $this->_dataStart; } - - /** - * Sets the byte offset from the beginning of the file. - * - * @param integer $dataStart The offset. - */ - public function setDataStart($dataStart) { $this->_dataStart = $dataStart; } - - /** - * Returns the byte length of the audio data being indexed. - * - * @return integer - */ - public function getDataLength() { return $this->_dataLength; } - - /** - * Sets the byte length of the audio data being indexed. - * - * @param integer $dataLength The length. - */ - public function setDataLength($dataLength) - { - $this->_dataLength = $dataLength; - } - - /** - * Returns the number of index points in the frame. - * - * @return integer - */ - public function getSize() { return count($this->_fractions); } - - /** - * Returns the numerator of the fraction representing a relative position in - * the data or <var>false</var> if index not defined. The denominator is 2 - * to the power of b. - * - * @param integer $index The fraction numerator. - * @return integer - */ - public function getFractionAt($index) - { - if (isset($this->_fractions[$index])) - return $this->_fractions[$index]; - return false; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractLink.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractLink.php deleted file mode 100644 index 24166cb..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractLink.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: AbstractLink.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * A base class for all the URL link frames. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -abstract class ID3_Frame_AbstractLink extends ID3_Frame -{ - /** @var string */ - protected $_link; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader !== null) - $this->_link = implode($this->explodeString8($this->_data, 1), ""); - } - - /** - * Returns the link associated with the frame. - * - * @return string - */ - public function getLink() { return $this->_link; } - - /** - * Sets the link. The link encoding is always ISO-8859-1. - * - * @param string $link The link. - */ - public function setLink($link) { $this->_link = $link; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData($this->_link); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractText.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractText.php deleted file mode 100644 index ca2081a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/AbstractText.php +++ /dev/null @@ -1,170 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: AbstractText.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * A base class for all the text frames. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -abstract class ID3_Frame_AbstractText extends ID3_Frame - implements ID3_Encoding -{ - /** - * The text encoding. - * - * @var integer - */ - protected $_encoding = ID3_Encoding::UTF8; - - /** - * The text array. - * - * @var string - */ - protected $_text; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_data = substr($this->_data, 1); - switch ($this->_encoding) { - case self::UTF16: - $this->_text = - $this->explodeString16(Transform::fromString16($this->_data)); - break; - case self::UTF16BE: - $this->_text = - $this->explodeString16(Transform::fromString16BE($this->_data)); - break; - default: - $this->_text = - $this->explodeString8(Transform::fromString8($this->_data)); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the first text chunk the frame contains. - * - * @return string - */ - public function getText() { return $this->_text[0]; } - - /** - * Returns an array of texts the frame contains. - * - * @return Array - */ - public function getTexts() { return $this->_text; } - - /** - * Sets the text using given encoding. - * - * @param mixed $text The test string or an array of strings. - * @param integer $encoding The text encoding. - */ - public function setText($text, $encoding = false) - { - $this->_text = is_array($text) ? $text : array($text); - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $array = $this->_text; - foreach ($array as &$text) - $text = Transform::toString16($text); - $data .= Transform::toString16 - (implode("\0\0", $array), $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER); - break; - case self::UTF16BE: - $data .= Transform::toString16BE(implode("\0\0", $this->_text)); - break; - default: - $data .= implode("\0", $this->_text); - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMM.php deleted file mode 100644 index 8f66a41..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMM.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: COMM.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -require_once("ID3/Language.php"); -require_once("ID3/Exception.php"); -/**#@-*/ - -/** - * The <i>Comments</i> frame is intended for any kind of full text information - * that does not fit in any other frame. It consists of a frame header followed - * by encoding, language and content descriptors and is ended with the actual - * comment as a text string. Newline characters are allowed in the comment text - * string. There may be more than one comment frame in each tag, but only one - * with the same language and content descriptor. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_COMM extends ID3_Frame - implements ID3_Encoding, ID3_Language -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_language = "und"; - - /** @var string */ - private $_description; - - /** @var string */ - private $_text; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_language = substr($this->_data, 1, 3); - if ($this->_language == "XXX") - $this->_language = "und"; - $this->_data = substr($this->_data, 4); - - switch ($this->_encoding) { - case self::UTF16: - list ($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - $this->_text = Transform::fromString16($this->_text); - break; - case self::UTF16BE: - list ($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - $this->_text = Transform::fromString16BE($this->_text); - break; - default: - list ($this->_description, $this->_text) = - $this->explodeString8($this->_data, 2); - $this->_description = Transform::fromString8($this->_description); - $this->_text = Transform::fromString8($this->_text); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Sets the text language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @see ID3_Language - * @param string $language The language code. - */ - public function setLanguage($language) - { - if ($language == "XXX") - $language = "und"; - $this->_language = substr($language, 0, 3); - } - - /** - * Returns the short content description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. The description - * language and encoding must be that of the actual text. - * - * @param string $description The content description text. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $language = false, - $encoding = false) - { - $this->_description = $description; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the comment text. - * - * @return string - */ - public function getText() { return $this->_text; } - - /** - * Sets the text using given encoding. The text language and encoding must be - * that of the description text. - * - * @param mixed $text The test string. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setText($text, $language = false, $encoding = false) - { - $this->_text = $text; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_language; - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - $data .= Transform::toString16($this->_description, $order) . "\0\0" . - Transform::toString16($this->_text, $order); - break; - case self::UTF16BE: - $data .= Transform::toString16BE - ($this->_description . "\0\0" . $this->_text); - break; - default: - $data .= $this->_description . "\0" . $this->_text; - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMR.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMR.php deleted file mode 100644 index bd0125b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/COMR.php +++ /dev/null @@ -1,373 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: COMR.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * The <i>Commercial frame</i> enables several competing offers in the same tag - * by bundling all needed information. That makes this frame rather complex but - * it's an easier solution than if one tries to achieve the same result with - * several frames. - * - * There may be more than one commercial frame in a tag, but no two may be - * identical. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_COMR extends ID3_Frame - implements ID3_Encoding -{ - /** - * The delivery types. - * - * @var Array - */ - public static $types = array - ("Other", "Standard CD album with other songs", "Compressed audio on CD", - "File over the Internet", "Stream over the Internet", "As note sheets", - "As note sheets in a book with other sheets", "Music on other media", - "Non-musical merchandise"); - - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_currency = "EUR"; - - /** @var string */ - private $_price; - - /** @var string */ - private $_date; - - /** @var string */ - private $_contact; - - /** @var integer */ - private $_delivery = 0; - - /** @var string */ - private $_seller; - - /** @var string */ - private $_description; - - /** @var string */ - private $_mimeType = false; - - /** @var string */ - private $_imageData; - - /** @var integer */ - private $_imageSize = 0; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - list($pricing, $this->_data) = - $this->explodeString8(substr($this->_data, 1), 2); - $this->_currency = substr($pricing, 0, 3); - $this->_price = substr($pricing, 3); - $this->_date = substr($this->_data, 0, 8); - list($this->_contact, $this->_data) = - $this->explodeString8(substr($this->_data, 8), 2); - $this->_delivery = Transform::fromUInt8($this->_data[0]); - $this->_data = substr($this->_data, 1); - - switch ($this->_encoding) { - case self::UTF16: - list ($this->_seller, $this->_description, $this->_data) = - $this->explodeString16($this->_data, 3); - $this->_seller = Transform::fromString16($this->_seller); - $this->_description = Transform::fromString16($this->_description); - break; - case self::UTF16BE: - list ($this->_seller, $this->_description, $this->_data) = - $this->explodeString16($this->_data, 3); - $this->_seller = Transform::fromString16BE($this->_seller); - $this->_description = Transform::fromString16BE($this->_description); - break; - default: - list ($this->_seller, $this->_description, $this->_data) = - $this->explodeString8($this->_data, 3); - $this->_seller = Transform::fromString8($this->_seller); - $this->_description = Transform::fromString8($this->_description); - } - - if (strlen($this->_data) == 0) - return; - - list($this->_mimeType, $this->_imageData) = - $this->explodeString8($this->_data, 2); - - $this->_imageSize = strlen($this->_imageData); - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the currency code, encoded according to - * {@link http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm - * ISO 4217} alphabetic currency code. - * - * @return string - */ - public function getCurrency() { return $this->_currency; } - - /** - * Sets the currency used in transaction, encoded according to - * {@link http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm - * ISO 4217} alphabetic currency code. - * - * @param string $currency The currency code. - */ - public function setCurrency($currency) { $this->_currency = $currency; } - - /** - * Returns the price as a numerical string using "." as the decimal separator. - * - * In the price string several prices may be concatenated, separated by a "/" - * character, but there may only be one currency of each type. - * - * @return string - */ - public function getPrice() { return $this->_price; } - - /** - * Sets the price. The price must use "." as the decimal separator and have - * multiple values be separated by a "/" character. - * - * @param string $price The price. - */ - public function setPrice($price) - { - $this->_price = $price; - } - - /** - * Returns the date as an 8 character date string (YYYYMMDD), describing for - * how long the price is valid. - * - * @return string - */ - public function getDate() { return $this->_date; } - - /** - * Sets the date describing for how long the price is valid for. The date must - * be an 8 character date string (YYYYMMDD). - * - * @param string $date The date string. - */ - public function setDate($date) { $this->_date = $date; } - - /** - * Returns the contact URL, with which the user can contact the seller. - * - * @return string - */ - public function getContact() { return $this->_contact; } - - /** - * Sets the contact URL, with which the user can contact the seller. - * - * @param string $contact The contact URL. - */ - public function setContact($contact) { $this->_contact = $contact; } - - /** - * Returns the delivery type with whitch the audio was delivered when bought. - * - * @return integer - */ - public function getDelivery() { return $this->_delivery; } - - /** - * Sets the delivery type with whitch the audio was delivered when bought. - * - * @param integer $delivery The delivery type code. - */ - public function setDelivery($delivery) { $this->_delivery = $delivery; } - - /** - * Returns the name of the seller. - * - * @return string - */ - public function getSeller() { return $this->_seller; } - - /** - * Sets the name of the seller using given encoding. The seller text encoding - * must be that of the description text. - * - * @param string $seller The name of the seller. - * @param integer $encoding The text encoding. - */ - public function setSeller($seller, $encoding = false) - { - $this->_seller = $seller; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the short description of the product. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. The description - * encoding must be that of the seller text. - * - * @param string $description The content description text. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $encoding = false) - { - $this->_description = $description; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the MIME type of the seller's company logo, if attached, or - * <var>false</var> otherwise. Currently only "image/png" and "image/jpeg" - * are allowed. - * - * @return string - */ - public function getMimeType() { return $this->_mimeType; } - - /** - * Sets the MIME type. Currently only "image/png" and "image/jpeg" are - * allowed. The MIME type is always ISO-8859-1 encoded. - * - * @param string $mimeType The MIME type. - */ - public function setMimeType($mimeType) { $this->_mimeType = $mimeType; } - - /** - * Returns the embedded image binary data. - * - * @return string - */ - public function getImageData() { return $this->_imageData; } - - /** - * Sets the embedded image data. Also updates the image size to correspond the - * new data. - * - * @param string $imageData The image data. - */ - public function setImageData($imageData) - { - $this->_imageData = $imageData; - $this->_imageSize = strlen($imageData); - } - - /** - * Returns the size of the embedded image data. - * - * @return integer - */ - public function getImageSize() { return $this->_imageSize; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_currency . - $this->_price . "\0" . $this->_date . $this->_contact . "\0" . - Transform::toUInt8($this->_delivery); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - $data .= Transform::toString16($this->_seller, $order) . "\0\0" . - Transform::toString16($this->_description, $order) . "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE - ($this->_seller . "\0\0" . $this->_description . "\0\0"); - break; - default: - $data .= $this->_seller . "\0" . $this->_description . "\0"; - } - parent::setData - ($data . ($this->_mimeType ? - $this->_mimeType . "\0" . $this->_imageData : "")); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ENCR.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ENCR.php deleted file mode 100644 index 881823f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ENCR.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ENCR.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * To identify with which method a frame has been encrypted the encryption - * method must be registered in the tag with the <i>Encryption method - * registration</i> frame. - * - * The owner identifier a URL containing an email address, or a link to a - * location where an email address can be found, that belongs to the - * organisation responsible for this specific encryption method. Questions - * regarding the encryption method should be sent to the indicated email - * address. - * - * The method symbol contains a value that is associated with this method - * throughout the whole tag, in the range $80-F0. All other values are reserved. - * The method symbol may optionally be followed by encryption specific data. - * - * There may be several ENCR frames in a tag but only one containing the same - * symbol and only one containing the same owner identifier. The method must be - * used somewhere in the tag. See {@link ID3_Frame#ENCRYPTION} for more - * information. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_ENCR extends ID3_Frame -{ - /** @var string */ - private $_owner; - - /** @var integer */ - private $_method; - - /** @var string */ - private $_encryptionData; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list($this->_owner, $this->_data) = $this->explodeString8($this->_data, 2); - $this->_method = Transform::fromInt8($this->_data[0]); - $this->_encryptionData = substr($this->_data, 1); - } - - /** - * Returns the owner identifier string. - * - * @return string - */ - public function getOwner() { return $this->_owner; } - - /** - * Sets the owner identifier string. - * - * @param string $owner The owner identifier string. - */ - public function setOwner($owner) { $this->_owner = $owner; } - - /** - * Returns the method symbol. - * - * @return integer - */ - public function getMethod() { return $this->_method; } - - /** - * Sets the method symbol. - * - * @param integer $method The method symbol byte. - */ - public function setMethod($method) { $this->_method = $method; } - - /** - * Returns the encryption data. - * - * @return string - */ - public function getEncryptionData() { return $this->_encryptionData; } - - /** - * Sets the encryption data. - * - * @param string $encryptionData The encryption data string. - */ - public function setEncryptionData($encryptionData) - { - $this->_encryptionData = $encryptionData; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - parent::setData - ($this->_owner . "\0" . Transform::toInt8($this->_method) . - $this->_encryptionData); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQU2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQU2.php deleted file mode 100644 index 3721121..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQU2.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: EQU2.php 105 2008-07-30 14:56:47Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Equalisation (2)</i> is another subjective, alignment frame. It allows - * the user to predefine an equalisation curve within the audio file. There may - * be more than one EQU2 frame in each tag, but only one with the same - * identification string. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_EQU2 extends ID3_Frame -{ - /** - * Interpolation type that defines that no interpolation is made. A jump from - * one adjustment level to another occurs in the middle between two adjustment - * points. - */ - const BAND = 0; - - /** - * Interpolation type that defines that interpolation between adjustment - * points is linear. - */ - const LINEAR = 1; - - /** @var integer */ - private $_interpolation; - - /** @var string */ - private $_device; - - /** @var Array */ - private $_adjustments; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_interpolation = Transform::fromInt8($this->_data[0]); - list ($this->_device, $this->_data) = - $this->explodeString8(substr($this->_data, 1), 2); - - for ($i = 0; $i < strlen($this->_data); $i += 4) - $this->_adjustments - [(int)(Transform::fromUInt16BE(substr($this->_data, $i, 2)) / 2)] = - Transform::fromInt16BE(substr($this->_data, $i + 2, 2)) / 512.0; - ksort($this->_adjustments); - } - - /** - * Returns the interpolation method. The interpolation method describes which - * method is preferred when an interpolation between the adjustment point that - * follows. - * - * @return integer - */ - public function getInterpolation() { return $this->_interpolation; } - - /** - * Sets the interpolation method. The interpolation method describes which - * method is preferred when an interpolation between the adjustment point that - * follows. - * - * @param integer $interpolation The interpolation method code. - */ - public function setInterpolation($interpolation) - { - $this->_interpolation = $interpolation; - } - - /** - * Returns the device where the adjustments should apply. - * - * @return string - */ - public function getDevice() { return $this->_device; } - - /** - * Sets the device where the adjustments should apply. - * - * @param string $device The device. - */ - public function setDevice($device) { $this->_device = $device; } - - /** - * Returns the array containing adjustments having frequencies as keys and - * their corresponding adjustments as values. - * - * Adjustment points are ordered by frequency. - * - * @return Array - */ - public function getAdjustments() { return $this->_adjustments; } - - /** - * Adds a volume adjustment setting for given frequency. The frequency can - * have a value from 0 to 32767 Hz, and the adjustment </> +/- 64 dB with a - * precision of 0.001953125 dB. - * - * @param integer $frequency The frequency, in hertz. - * @param integer $adjustment The adjustment, in dB. - */ - public function addAdjustment($frequency, $adjustment) - { - $this->_adjustments[$frequency] = $adjustment; - ksort($this->_adjustments); - } - - /** - * Sets the adjustments array. The array must have frequencies as keys and - * their corresponding adjustments as values. The frequency can have a value - * from 0 to 32767 Hz, and the adjustment </> +/- 64 dB with a precision of - * 0.001953125 dB. One frequency should only be described once in the frame. - * - * @param Array $adjustments The adjustments array. - */ - public function setAdjustments($adjustments) - { - $this->_adjustments = $adjustments; - ksort($this->_adjustments); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toInt8($this->_interpolation) . $this->_device . "\0"; - foreach ($this->_adjustments as $frequency => $adjustment) - $data .= Transform::toUInt16BE($frequency * 2) . - Transform::toInt16BE($adjustment * 512); - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQUA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQUA.php deleted file mode 100644 index 42adab2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/EQUA.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: EQUA.php 105 2008-07-30 14:56:47Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Equalisation</i> frame is another subjective, alignment frame. It - * allows the user to predefine an equalisation curve within the audio file. - * There may only be one EQUA frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_EQUA extends ID3_Frame -{ - /** @var Array */ - private $_adjustments; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $adjustmentBits = Transform::fromInt8($this->_data[0]); - if ($adjustmentBits <= 8 || $adjustmentBits > 16) - throw new ID3_Exception - ("Unsupported adjustment bit size of: " . $adjustmentBits); - - for ($i = 1; $i < strlen($this->_data); $i += 4) { - $frequency = Transform::fromUInt16BE(substr($this->_data, $i, 2)); - $this->_adjustments[($frequency & 0x7fff)] = - ($frequency & 0x8000) == 0x8000 ? - Transform::fromUInt16BE(substr($this->_data, $i + 2, 2)) : - -Transform::fromUInt16BE(substr($this->_data, $i + 2, 2)); - } - ksort($this->_adjustments); - } - - /** - * Returns the array containing adjustments having frequencies as keys and - * their corresponding adjustments as values. - * - * @return Array - */ - public function getAdjustments() { return $this->_adjustments; } - - /** - * Adds a volume adjustment setting for given frequency. The frequency can - * have a value from 0 to 32767 Hz. - * - * @param integer $frequency The frequency, in hertz. - * @param integer $adjustment The adjustment, in dB. - */ - public function addAdjustment($frequency, $adjustment) - { - $this->_adjustments[$frequency] = $adjustment; - ksort($this->_adjustments); - } - - /** - * Sets the adjustments array. The array must have frequencies as keys and - * their corresponding adjustments as values. The frequency can have a value - * from 0 to 32767 Hz. One frequency should only be described once in the - * frame. - * - * @param Array $adjustments The adjustments array. - */ - public function setAdjustments($adjustments) - { - $this->_adjustments = $adjustments; - ksort($this->_adjustments); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toInt8(16); - foreach ($this->_adjustments as $frequency => $adjustment) - $data .= Transform::toUInt16BE - ($adjustment > 0 ? $frequency | 0x8000 : $frequency & ~0x8000) . - Transform::toUInt16BE(abs($adjustment)); - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ETCO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ETCO.php deleted file mode 100644 index 14e8516..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/ETCO.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ETCO.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Timing.php"); -/**#@-*/ - -/** - * The <i>Event timing codes</i> allows synchronisation with key events in the - * audio. - * - * The events are an array of timestamp and type pairs. The time stamp is set to - * zero if directly at the beginning of the sound or after the previous event. - * All events are sorted in chronological order. - * - * The events $E0-EF are for user events. You might want to synchronise your - * music to something, like setting off an explosion on-stage, activating a - * screensaver etc. - * - * There may only be one ETCO frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_ETCO extends ID3_Frame - implements ID3_Timing -{ - /** - * The list of event types. - * - * @var Array - */ - public static $types = array - ("Padding", "End of initial silence", "Intro start", "Main part start", - "Outro start", "Outro end", "Verse start","Refrain start", - "Interlude start", "Theme start", "Variation start", "Key change", - "Time change", "Momentary unwanted noise", "Sustained noise", - "Sustained noise end", "Intro end", "Main part end", "Verse end", - "Refrain end", "Theme end", "Profanity", "Profanity end", - - 0xe0 => "User event", "User event", "User event", "User event", - "User event", "User event", "User event", "User event", "User event", - "User event", "User event", "User event", "User event", "User event", - - 0xfd => "Audio end (start of silence)", "Audio file ends", - "One more byte of events follows"); - - /** @var integer */ - private $_format = ID3_Timing::MPEG_FRAMES; - - /** @var Array */ - private $_events = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_format = Transform::fromUInt8($this->_data[0]); - for ($i = 1; $i < $this->getSize(); $i += 5) { - $this->_events[Transform::fromUInt32BE(substr($this->_data, $i + 1, 4))] = - $data = Transform::fromUInt8($this->_data[$i]); - if ($data == 0xff) - break; - } - ksort($this->_events); - } - - /** - * Returns the timing format. - * - * @return integer - */ - public function getFormat() { return $this->_format; } - - /** - * Sets the timing format. - * - * @see ID3_Timing - * @param integer $format The timing format. - */ - public function setFormat($format) { $this->_format = $format; } - - /** - * Returns the events as an associated array having the timestamps as keys and - * the event types as values. - * - * @return Array - */ - public function getEvents() { return $this->_events; } - - /** - * Sets the events using given format. The value must be an associated array - * having the timestamps as keys and the event types as values. - * - * @param Array $events The events array. - * @param integer $format The timing format. - */ - public function setEvents($events, $format = false) - { - $this->_events = $events; - if ($format !== false) - $this->_format = $format; - ksort($this->_events); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_format); - foreach ($this->_events as $timestamp => $type) - $data .= Transform::toUInt8($type) . Transform::toUInt32BE($timestamp); - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GEOB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GEOB.php deleted file mode 100644 index dbfcc84..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GEOB.php +++ /dev/null @@ -1,226 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: GEOB.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * In the <i>General encapsulated object</i> frame any type of file can be - * encapsulated. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_GEOB extends ID3_Frame - implements ID3_Encoding -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_mimeType; - - /** @var string */ - private $_filename; - - /** @var string */ - private $_description; - - /** @var string */ - private $_objectData; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_mimeType = substr - ($this->_data, 1, ($pos = strpos($this->_data, "\0", 1)) - 1); - $this->_data = substr($this->_data, $pos + 1); - - switch ($this->_encoding) { - case self::UTF16: - list ($this->_filename, $this->_description, $this->_objectData) = - $this->explodeString16($this->_data, 3); - $this->_filename = Transform::fromString16($this->_filename); - $this->_description = Transform::fromString16($this->_description); - break; - case self::UTF16BE: - list ($this->_filename, $this->_description, $this->_objectData) = - $this->explodeString16($this->_data, 3); - $this->_filename = Transform::fromString16BE($this->_filename); - $this->_description = Transform::fromString16BE($this->_description); - break; - default: - list ($this->_filename, $this->_description, $this->_objectData) = - $this->explodeString8($this->_data, 3); - $this->_filename = Transform::fromString8($this->_filename); - $this->_description = Transform::fromString8($this->_description); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the MIME type. The MIME type is always encoded with ISO-8859-1. - * - * @return string - */ - public function getMimeType() { return $this->_mimeType; } - - /** - * Sets the MIME type. The MIME type is always ISO-8859-1 encoded. - * - * @param string $mimeType The MIME type. - */ - public function setMimeType($mimeType) { $this->_mimeType = $mimeType; } - - /** - * Returns the file name. - * - * @return string - */ - public function getFilename() { return $this->_filename; } - - /** - * Sets the file name using given encoding. The file name encoding must be - * that of the description text. - * - * @param string $description The file description text. - * @param integer $encoding The text encoding. - */ - public function setFilename($filename, $encoding = false) - { - $this->_filename = $filename; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the file description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the file description text using given encoding. The description - * encoding must be that of the file name. - * - * @param string $description The file description text. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $encoding = false) - { - $this->_description = $description; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the embedded object binary data. - * - * @return string - */ - public function getObjectData() { return $this->_objectData; } - - /** - * Sets the embedded object binary data. - * - * @param string $objectData The object data. - */ - public function setObjectData($objectData) - { - $this->_objectData = $objectData; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_mimeType . "\0"; - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - $data .= Transform::toString16($this->_filename, $order) . "\0\0" . - Transform::toString16($this->_description, $order) . "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE - ($this->_filename . "\0\0" . $this->_description . "\0\0"); - break; - default: - $data .= $this->_filename . "\0" . $this->_description . "\0"; - } - $this->setData($data . $this->_objectData); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GRID.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GRID.php deleted file mode 100644 index 513654d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/GRID.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: GRID.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Group identification registration</i> frame enables grouping of - * otherwise unrelated frames. This can be used when some frames are to be - * signed. To identify which frames belongs to a set of frames a group - * identifier must be registered in the tag with this frame. - * - * The owner identifier is a URL containing an email address, or a link to a - * location where an email address can be found, that belongs to the - * organisation responsible for this grouping. Questions regarding the grouping - * should be sent to the indicated email address. - * - * The group symbol contains a value that associates the frame with this group - * throughout the whole tag, in the range $80-F0. All other values are reserved. - * The group symbol may optionally be followed by some group specific data, e.g. - * a digital signature. There may be several GRID frames in a tag but only one - * containing the same symbol and only one containing the same owner identifier. - * The group symbol must be used somewhere in the tag. See - * {@link ID3_Frame#GROUPING_ownerENTITY} for more information. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_GRID extends ID3_Frame -{ - /** @var string */ - private $_owner; - - /** @var integer */ - private $_group; - - /** @var string */ - private $_groupData; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list($this->_owner, $this->_data) = $this->explodeString8($this->_data, 2); - $this->_group = Transform::fromUInt8($this->_data[0]); - $this->_groupData = substr($this->_data, 1); - } - - /** - * Returns the owner identifier string. - * - * @return string - */ - public function getOwner() { return $this->_owner; } - - /** - * Sets the owner identifier string. - * - * @param string $owner The owner identifier string. - */ - public function setOwner($owner) { $this->_owner = $owner; } - - /** - * Returns the group symbol. - * - * @return integer - */ - public function getGroup() { return $this->_group; } - - /** - * Sets the group symbol. - * - * @param integer $group The group symbol. - */ - public function setGroup($group) { $this->_group = $group; } - - /** - * Returns the group dependent data. - * - * @return string - */ - public function getGroupData() { return $this->_groupData; } - - /** - * Sets the group dependent data. - * - * @param string $groupData The data. - */ - public function setGroupData($groupData) { $this->_groupData = $groupData; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - parent::setData - ($this->_owner . "\0" . Transform::toUInt8($this->_group) . - $this->_groupData); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/IPLS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/IPLS.php deleted file mode 100644 index 3200a11..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/IPLS.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IPLS.php 105 2008-07-30 14:56:47Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * The <i>Involved people list</i> is a frame containing the names of those - * involved, and how they were involved. There may only be one IPLS frame in - * each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_IPLS extends ID3_Frame - implements ID3_Encoding -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var Array */ - private $_people = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $data = substr($this->_data, 1); - $order = Transform::MACHINE_ENDIAN_ORDER; - switch ($this->_encoding) { - case self::UTF16: - $data = $this->explodeString16($data); - foreach ($data as &$str) - $str = Transform::fromString16($str, $order); - break; - case self::UTF16BE: - $data = $this->explodeString16($data); - foreach ($data as &$str) - $str = Transform::fromString16BE($str); - break; - default: - $data = $this->explodeString8($data); - } - - for ($i = 0; $i < count($data) - 1; $i += 2) - $this->_people[] = array($data[$i] => @$data[$i + 1]); - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the involved people list as an array. For each person, the array - * contains an entry, which too is an associate array with involvement as its - * key and involvee as its value. - * - * @return Array - */ - public function getPeople() { return $this->_people; } - - /** - * Adds a person with his involvement. - * - * @return string - */ - public function addPerson($involvement, $person) - { - $this->_people[] = array($involvement => $person); - } - - /** - * Sets the involved people list array. For each person, the array must - * contain an associate array with involvement as its key and involvee as its - * value. - * - * @param Array $people The involved people list. - */ - public function setPeople($people) { $this->_people = $people; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding); - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - foreach ($this->_people as $entry) { - foreach ($entry as $key => $val) { - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16($key, $order) . "\0\0" . - Transform::toString16($val, $order) . "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE($key . "\0\0" . $val . "\0\0"); - break; - default: - $data .= $key . "\0" . $val . "\0"; - } - } - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/LINK.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/LINK.php deleted file mode 100644 index b01a9de..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/LINK.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: LINK.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Linked information</i> frame is used to keep information duplication - * as low as possible by linking information from another ID3v2 tag that might - * reside in another audio file or alone in a binary file. It is recommended - * that this method is only used when the files are stored on a CD-ROM or other - * circumstances when the risk of file separation is low. - * - * Data should be retrieved from the first tag found in the file to which this - * link points. There may be more than one LINK frame in a tag, but only one - * with the same contents. - * - * A linked frame is to be considered as part of the tag and has the same - * restrictions as if it was a physical part of the tag (i.e. only one - * {@link ID3_Frame_RVRB} frame allowed, whether it's linked or not). - * - * Frames that may be linked and need no additional data are - * {@link ID3_Frame_ASPI}, {@link ID3_Frame_ETCO}, {@link ID3_Frame_EQU2}, - * {@link ID3_Frame_MCDI}, {@link ID3_Frame_MLLT}, {@link ID3_Frame_OWNE}, - * {@link ID3_Frame_RVA2}, {@link ID3_Frame_RVRB}, {@link ID3_Frame_SYTC}, the - * text information frames (ie frames descendats of - * {@link ID3_Frame_AbstractText}) and the URL link frames (ie frames descendants - * of {@link ID3_Frame_AbstractLink}). - * - * The {@link ID3_Frame_AENC}, {@link ID3_Frame_APIC}, {@link ID3_Frame_GEOB} - * and {@link ID3_Frame_TXXX} frames may be linked with the content descriptor - * as additional ID data. - * - * The {@link ID3_Frame_USER} frame may be linked with the language field as - * additional ID data. - * - * The {@link ID3_Frame_PRIV} frame may be linked with the owner identifier as - * additional ID data. - * - * The {@link ID3_Frame_COMM}, {@link ID3_Frame_SYLT} and {@link ID3_Frame_USLT} - * frames may be linked with three bytes of language descriptor directly - * followed by a content descriptor as additional ID data. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_LINK extends ID3_Frame -{ - /** @var string */ - private $_target; - - /** @var string */ - private $_url; - - /** @var string */ - private $_qualifier; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_target = substr($this->_data, 0, 4); - list($this->_url, $this->_qualifier) = - $this->explodeString8(substr($this->_data, 4), 2); - } - - /** - * Returns the target tag identifier. - * - * @return string - */ - public function getTarget() { return $this->_target; } - - /** - * Sets the target tag identifier. - * - * @param string $target The target tag identifier. - */ - public function setTarget($target) { $this->_target = $target; } - - /** - * Returns the target tag URL. - * - * @return string - */ - public function getUrl() { return $this->_url; } - - /** - * Sets the target tag URL. - * - * @param string $url The target URL. - */ - public function setUrl($url) { $this->_url = $url; } - - /** - * Returns the additional data to identify further the tag. - * - * @return string - */ - public function getQualifier() { return $this->_qualifier; } - - /** - * Sets the additional data to be used in tag identification. - * - * @param string $identifier The qualifier. - */ - public function setQualifier($qualifier) - { - $this->_qualifier = $qualifier; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - (Transform::toString8(substr($this->_target, 0, 4), 4) . - $this->_url . "\0" . $this->_qualifier); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MCDI.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MCDI.php deleted file mode 100644 index d5b99c4..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MCDI.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MCDI.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * This frame is intended for music that comes from a CD, so that the CD can be - * identified in databases such as the CDDB. The frame consists of a binary dump - * of the Table Of Contents, TOC, from the CD, which is a header of 4 bytes and - * then 8 bytes/track on the CD plus 8 bytes for the lead out, making a - * maximum of 804 bytes. The offset to the beginning of every track on the CD - * should be described with a four bytes absolute CD-frame address per track, - * and not with absolute time. When this frame is used the presence of a valid - * {@link ID3_Frame_TRCK} frame is required, even if the CD's only got one - * track. It is recommended that this frame is always added to tags originating - * from CDs. - * - * There may only be one MCDI frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_MCDI extends ID3_Frame -{ - /** - * Returns the CD TOC binary dump. - * - * @return string - */ - public function getData() { return $this->_data; } - - /** - * Sets the CD TOC binary dump. - * - * @param string $data The CD TOC binary dump string. - */ - public function setData($data) { parent::setData($data); } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MLLT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MLLT.php deleted file mode 100644 index 05aa6a0..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/MLLT.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MLLT.php 75 2008-04-14 23:57:21Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * To increase performance and accuracy of jumps within a MPEG audio file, - * frames with time codes in different locations in the file might be useful. - * The <i>MPEG location lookup table</i> frame includes references that the - * software can use to calculate positions in the file. - * - * The MPEG frames between reference describes how much the frame counter should - * be increased for every reference. If this value is two then the first - * reference points out the second frame, the 2nd reference the 4th frame, the - * 3rd reference the 6th frame etc. In a similar way the bytes between reference - * and milliseconds between reference points out bytes and milliseconds - * respectively. - * - * Each reference consists of two parts; a certain number of bits that describes - * the difference between what is said in bytes between reference and the - * reality and a certain number of bits that describes the difference between - * what is said in milliseconds between reference and the reality. - * - * There may only be one MLLT frame in each tag. - * - * @todo Data parsing and write support - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - */ -final class ID3_Frame_MLLT extends ID3_Frame -{ - /** @var integer */ - private $_frames; - - /** @var integer */ - private $_bytes; - - /** @var integer */ - private $_milliseconds; - - /** @var Array */ - private $_deviation = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - throw new ID3_Exception("Write not supported yet"); - - $this->_frames = Transform::fromInt16BE(substr($this->_data, 0, 2)); - $this->_bytes = Transform::fromInt32BE(substr($this->_data, 2, 3)); - $this->_milliseconds = Transform::fromInt32BE(substr($this->_data, 5, 3)); - - $byteDevBits = Transform::fromInt8($this->_data[8]); - $millisDevBits = Transform::fromInt8($this->_data[9]); - - // $data = substr($this->_data, 10); - } - - /** - * Returns the number of MPEG frames between reference. - * - * @return integer - */ - public function getFrames() { return $this->_frames; } - - /** - * Sets the number of MPEG frames between reference. - * - * @param integer $frames The number of MPEG frames. - */ - public function setFrames($frames) { $this->_frames = $frames; } - - /** - * Returns the number of bytes between reference. - * - * @return integer - */ - public function getBytes() { return $this->_bytes; } - - /** - * Sets the number of bytes between reference. - * - * @param integer $bytes The number of bytes. - */ - public function setBytes($bytes) { $this->_bytes = $bytes; } - - /** - * Returns the number of milliseconds between references. - * - * @return integer - */ - public function getMilliseconds() { return $this->_milliseconds; } - - /** - * Sets the number of milliseconds between references. - * - * @param integer $milliseconds The number of milliseconds. - */ - public function setMilliseconds($milliseconds) - { - return $this->_milliseconds; - } - - /** - * Returns the deviations as an array. Each value is an array containing two - * values, ie the deviation in bytes, and the deviation in milliseconds, - * respectively. - * - * @return Array - */ - public function getDeviation() { return $this->_deviation; } - - /** - * Sets the deviations array. The array must consist of arrays, each of which - * having two values, the deviation in bytes, and the deviation in - * milliseconds, respectively. - * - * @param Array $deviation The deviations array. - */ - public function setDeviation($deviation) { $this->_deviation = $deviation; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/OWNE.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/OWNE.php deleted file mode 100644 index 3258f71..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/OWNE.php +++ /dev/null @@ -1,219 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: OWNE.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * The <i>Ownership frame</i> might be used as a reminder of a made transaction - * or, if signed, as proof. Note that the {@link ID3_Frame_USER} and - * {@link ID3_Frame_TOWN} frames are good to use in conjunction with this one. - * - * There may only be one OWNE frame in a tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_OWNE extends ID3_Frame - implements ID3_Encoding -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_currency = "EUR"; - - /** @var string */ - private $_price; - - /** @var string */ - private $_date; - - /** @var string */ - private $_seller; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - list($tmp, $this->_data) = - $this->explodeString8(substr($this->_data, 1), 2); - $this->_currency = substr($tmp, 0, 3); - $this->_price = substr($tmp, 3); - $this->_date = substr($this->_data, 0, 8); - $this->_data = substr($this->_data, 8); - - switch ($this->_encoding) { - case self::UTF16: - $this->_seller = Transform::fromString16($this->_data); - break; - case self::UTF16BE: - $this->_seller = Transform::fromString16BE($this->_data); - break; - default: - $this->_seller = Transform::fromString8($this->_data); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the currency used in transaction, encoded according to - * {@link http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm - * ISO 4217} alphabetic currency code. - * - * @return string - */ - public function getCurrency() { return $this->_currency; } - - /** - * Sets the currency used in transaction, encoded according to - * {@link http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list-1.htm - * ISO 4217} alphabetic currency code. - * - * @param string $currency The currency code. - */ - public function setCurrency($currency) { $this->_currency = $currency; } - - /** - * Returns the price as a numerical string using "." as the decimal separator. - * - * @return string - */ - public function getPrice() { return $this->_price; } - - /** - * Sets the price. - * - * @param integer $price The price. - */ - public function setPrice($price) - { - $this->_price = number_format($price, 2, ".", ""); - } - - /** - * Returns the date of purchase as an 8 character date string (YYYYMMDD). - * - * @return string - */ - public function getDate() { return $this->_date; } - - /** - * Sets the date of purchase. The date must be an 8 character date string - * (YYYYMMDD). - * - * @param string $date The date string. - */ - public function setDate($date) { $this->_date = $date; } - - /** - * Returns the name of the seller. - * - * @return string - */ - public function getSeller() { return $this->_seller; } - - /** - * Sets the name of the seller using given encoding. - * - * @param string $seller The name of the seller. - * @param integer $encoding The text encoding. - */ - public function setSeller($seller, $encoding = false) - { - $this->_seller = $seller; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_currency . - $this->_price . "\0" . $this->_date; - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($this->_seller, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER); - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_seller); - break; - default: - $data .= $this->_seller; - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PCNT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PCNT.php deleted file mode 100644 index aeff277..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PCNT.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: PCNT.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Play counter</i> is simply a counter of the number of times a file has - * been played. The value is increased by one every time the file begins to - * play. There may only be one PCNT frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_PCNT extends ID3_Frame -{ - /** @var integer */ - private $_counter = 0; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - if (strlen($this->_data) > 4) - $this->_counter = Transform::fromInt64BE($this->_data); // UInt64 - else - $this->_counter = Transform::fromUInt32BE($this->_data); - } - - /** - * Returns the counter. - * - * @return integer - */ - public function getCounter() { return $this->_counter; } - - /** - * Adds counter by one. - */ - public function addCounter() { $this->_counter++; } - - /** - * Sets the counter value. - * - * @param integer $counter The counter value. - */ - public function setCounter($counter) { $this->_counter = $counter; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - ($this->_counter > 4294967295 ? - Transform::toInt64BE($this->_counter) : // UInt64 - Transform::toUInt32BE($this->_counter)); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POPM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POPM.php deleted file mode 100644 index 332abef..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POPM.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: POPM.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The purpose of the <i>Popularimeter</i> frame is to specify how good an audio - * file is. Many interesting applications could be found to this frame such as a - * playlist that features better audio files more often than others or it could - * be used to profile a person's taste and find other good files by comparing - * people's profiles. The frame contains the email address to the user, one - * rating byte and a four byte play counter, intended to be increased with one - * for every time the file is played. - * - * The rating is 1-255 where 1 is worst and 255 is best. 0 is unknown. If no - * personal counter is wanted it may be omitted. When the counter reaches all - * one's, one byte is inserted in front of the counter thus making the counter - * eight bits bigger in the same away as the play counter - * {@link ID3_Frame_PCNT}. There may be more than one POPM frame in each tag, - * but only one with the same email address. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_POPM extends ID3_Frame -{ - /** @var string */ - private $_owner; - - /** @var integer */ - private $_rating = 0; - - /** @var integer */ - private $_counter = 0; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list($this->_owner, $this->_data) = $this->explodeString8($this->_data, 2); - $this->_rating = Transform::fromUInt8($this->_data[0]); - $this->_data = substr($this->_data, 1); - - if (strlen($this->_data) > 4) - $this->_counter = Transform::fromInt64BE($this->_data); // UInt64 - else if (strlen($this->_data) > 0) - $this->_counter = Transform::fromUInt32BE($this->_data); - } - - /** - * Returns the owner identifier string. - * - * @return string - */ - public function getOwner() { return $this->_owner; } - - /** - * Sets the owner identifier string. - * - * @param string $owner The owner identifier string. - */ - public function setOwner($owner) { return $this->_owner = $owner; } - - /** - * Returns the user rating. - * - * @return integer - */ - public function getRating() { return $this->_rating; } - - /** - * Sets the user rating. - * - * @param integer $rating The user rating. - */ - public function setRating($rating) { $this->_rating = $rating; } - - /** - * Returns the counter. - * - * @return integer - */ - public function getCounter() { return $this->_counter; } - - /** - * Adds counter by one. - */ - public function addCounter() { $this->_counter++; } - - /** - * Sets the counter value. - * - * @param integer $counter The counter value. - */ - public function setCounter($counter) { $this->_counter = $counter; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - ($this->_owner . "\0" . Transform::toInt8($this->_rating) . - ($this->_counter > 0xffffffff ? - Transform::toInt64BE($this->_counter) : - ($this->_counter > 0 ? Transform::toUInt32BE($this->_counter) : 0))); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POSS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POSS.php deleted file mode 100644 index 3de3f27..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/POSS.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: POSS.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Timing.php"); -/**#@-*/ - -/** - * The <i>Position synchronisation frame</i> delivers information to the - * listener of how far into the audio stream he picked up; in effect, it states - * the time offset from the first frame in the stream. There may only be one - * POSS frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_POSS extends ID3_Frame - implements ID3_Timing -{ - /** @var integer */ - private $_format = ID3_Timing::MPEG_FRAMES; - - /** @var integer */ - private $_position; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_format = Transform::fromUInt8($this->_data[0]); - $this->_position = Transform::fromUInt32BE(substr($this->_data, 1, 4)); - } - - /** - * Returns the timing format. - * - * @return integer - */ - public function getFormat() { return $this->_format; } - - /** - * Sets the timing format. - * - * @see ID3_Timing - * @param integer $format The timing format. - */ - public function setFormat($format) { $this->_format = $format; } - - /** - * Returns the position where in the audio the listener starts to receive, - * i.e. the beginning of the next frame. - * - * @return integer - */ - public function getPosition() { return $this->_position; } - - /** - * Sets the position where in the audio the listener starts to receive, - * i.e. the beginning of the next frame, using given format. - * - * @param integer $position The position. - * @param integer $format The timing format. - */ - public function setPosition($position, $format = false) - { - $this->_position = $position; - if ($format !== false) - $this->_format = $format; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - (Transform::toUInt8($this->_format) . - Transform::toUInt32BE($this->_position)); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PRIV.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PRIV.php deleted file mode 100644 index 4097204..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/PRIV.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: PRIV.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Private frame</i> is used to contain information from a software - * producer that its program uses and does not fit into the other frames. The - * frame consists of an owner identifier string and the binary data. The owner - * identifier is URL containing an email address, or a link to a location where - * an email address can be found, that belongs to the organisation responsible - * for the frame. Questions regarding the frame should be sent to the indicated - * email address. The tag may contain more than one PRIV frame but only with - * different contents. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_PRIV extends ID3_Frame -{ - /** @var string */ - private $_owner; - - /** @var string */ - private $_privateData; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list($this->_owner, $this->_privateData) = - $this->explodeString8($this->_data, 2); - } - - /** - * Returns the owner identifier string. - * - * @return string - */ - public function getOwner() { return $this->_owner; } - - /** - * Sets the owner identifier string. - * - * @param string $owner The owner identifier string. - */ - public function setOwner($owner) { $this->_owner = $owner; } - - /** - * Returns the private binary data associated with the frame. - * - * @return string - */ - public function getPrivateData() { return $this->_privateData; } - - /** - * Sets the private binary data associated with the frame. - * - * @param string $privateData The private binary data string. - */ - public function setPrivateData($privateData) - { - $this->_privateData = $privateData; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - parent::setData($this->_owner . "\0" . $this->_privateData); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RBUF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RBUF.php deleted file mode 100644 index 83c4cc0..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RBUF.php +++ /dev/null @@ -1,181 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: RBUF.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * Sometimes the server from which an audio file is streamed is aware of - * transmission or coding problems resulting in interruptions in the audio - * stream. In these cases, the size of the buffer can be recommended by the - * server using the <i>Recommended buffer size</i> frame. If the embedded info - * flag is set then this indicates that an ID3 tag with the maximum size - * described in buffer size may occur in the audio stream. In such case the tag - * should reside between two MPEG frames, if the audio is MPEG encoded. If the - * position of the next tag is known, offset to next tag may be used. The offset - * is calculated from the end of tag in which this frame resides to the first - * byte of the header in the next. This field may be omitted. Embedded tags are - * generally not recommended since this could render unpredictable behaviour - * from present software/hardware. - * - * For applications like streaming audio it might be an idea to embed tags into - * the audio stream though. If the clients connects to individual connections - * like HTTP and there is a possibility to begin every transmission with a tag, - * then this tag should include a recommended buffer size frame. If the client - * is connected to a arbitrary point in the stream, such as radio or multicast, - * then the recommended buffer size frame should be included in every tag. - * - * The buffer size should be kept to a minimum. There may only be one RBUF - * frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_RBUF extends ID3_Frame -{ - /** - * A flag to denote that an ID3 tag with the maximum size described in buffer - * size may occur in the audio stream. - */ - const EMBEDDED = 0x1; - - /** @var integer */ - private $_bufferSize; - - /** @var integer */ - private $_infoFlags; - - /** @var integer */ - private $_offset = 0; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_bufferSize = - Transform::fromUInt32BE("\0" . substr($this->_data, 0, 3)); - $this->_infoFlags = Transform::fromInt8($this->_data[3]); - if ($this->getSize() > 4) - $this->_offset = Transform::fromInt32BE(substr($this->_data, 4, 4)); - } - - /** - * Returns the buffer size. - * - * @return integer - */ - public function getBufferSize() { return $this->_bufferSize; } - - /** - * Sets the buffer size. - * - * @param integer $size The buffer size. - */ - public function setBufferSize($bufferSize) - { - $this->_bufferSize = $bufferSize; - } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasInfoFlag($flag) - { - return ($this->_infoFlags & $flag) == $flag; - } - - /** - * Returns the flags byte. - * - * @return integer - */ - public function getInfoFlags() { return $this->_infoFlags; } - - /** - * Sets the flags byte. - * - * @param string $flags The flags byte. - */ - public function setInfoFlags($infoFlags) { $this->_infoFlags = $infoFlags; } - - /** - * Returns the offset to next tag. - * - * @return integer - */ - public function getOffset() { return $this->_offset; } - - /** - * Sets the offset to next tag. - * - * @param integer $offset The offset. - */ - public function setOffset($offset) { $this->_offset = $offset; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - (substr(Transform::toUInt32BE($this->_bufferSize), 1, 3) . - Transform::toInt8($this->_infoFlags) . - Transform::toInt32BE($this->_offset)); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVA2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVA2.php deleted file mode 100644 index bfdd287..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVA2.php +++ /dev/null @@ -1,217 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: RVA2.php 105 2008-07-30 14:56:47Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Relative volume adjustment (2)</i> frame is a more subjective frame than - * the previous ones. It allows the user to say how much he wants to - * increase/decrease the volume on each channel when the file is played. The - * purpose is to be able to align all files to a reference volume, so that you - * don't have to change the volume constantly. This frame may also be used to - * balance adjust the audio. The volume adjustment is encoded as a fixed point - * decibel value, 16 bit signed integer representing (adjustment*512), giving - * +/- 64 dB with a precision of 0.001953125 dB. E.g. +2 dB is stored as $04 00 - * and -2 dB is $FC 00. - * - * There may be more than one RVA2 frame in each tag, but only one with the same - * identification string. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_RVA2 extends ID3_Frame -{ - /** - * The channel type key. - * - * @see $types - * @var string - */ - const channelType = "channelType"; - - /** - * The volume adjustment key. Adjustments are +/- 64 dB with a precision of - * 0.001953125 dB. - * - * @var string - */ - const volumeAdjustment = "volumeAdjustment"; - - /** - * The peak volume key. - * - * @var string - */ - const peakVolume = "peakVolume"; - - /** - * The list of channel types. - * - * @var Array - */ - public static $types = array - ("Other", "Master volume", "Front right", "Front left", "Back right", - "Back left", "Front centre", "Back centre", "Subwoofer"); - - /** @var string */ - private $_device; - - /** @var Array */ - private $_adjustments; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - list ($this->_device, $this->_data) = - $this->explodeString8($this->_data, 2); - - for ($i = $j = 0; $i < 9; $i++) { - $this->_adjustments[$i] = array - (self::channelType => Transform::fromInt8($this->_data[$j++]), - self::volumeAdjustment => - Transform::fromInt16BE(substr($this->_data, $j++, 2)) / 512.0); - $j++; - $bitsInPeak = Transform::fromInt8($this->_data[$j++]); - $bytesInPeak = $bitsInPeak > 0 ? ceil($bitsInPeak / 8) : 0; - switch ($bytesInPeak) { - case 8: - case 7: - case 6: - case 5: - $this->_adjustments[$i][self::peakVolume] = - Transform::fromInt64BE(substr($this->_data, $j, $bytesInPeak)); - break; - case 4: - case 3: - $this->_adjustments[$i][self::peakVolume] = - Transform::fromUInt32BE(substr($this->_data, $j, $bytesInPeak)); - break; - case 2: - $this->_adjustments[$i][self::peakVolume] = - Transform::fromUInt16BE(substr($this->_data, $j, $bytesInPeak)); - break; - case 1: - $this->_adjustments[$i][self::peakVolume] = - Transform::fromUInt8(substr($this->_data, $j, $bytesInPeak)); - } - $j += $bytesInPeak; - } - } - - /** - * Returns the device where the adjustments should apply. - * - * @return string - */ - public function getDevice() { return $this->_device; } - - /** - * Sets the device where the adjustments should apply. - * - * @param string $device The device. - */ - public function setDevice($device) { $this->_device = $device; } - - /** - * Returns the array containing volume adjustments for each channel. Volume - * adjustments are arrays themselves containing the following keys: - * channelType, volumeAdjustment, peakVolume. - * - * @return Array - */ - public function getAdjustments() { return $this->_adjustments; } - - /** - * Sets the array of volume adjustments for each channel. Each volume - * adjustment is an array too containing the following keys: channelType, - * volumeAdjustment, peakVolume. - * - * @param Array $adjustments The volume adjustments array. - */ - public function setAdjustments($adjustments) - { - $this->_adjustments = $adjustments; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = $this->_device . "\0"; - foreach ($this->_adjustments as $channel) { - $data .= Transform::toInt8($channel[self::channelType]) . - Transform::toInt16BE($channel[self::volumeAdjustment] * 512); - if (abs($channel[self::peakVolume]) <= 0xff) - $data .= Transform::toInt8(8) . - Transform::toUInt8($channel[self::peakVolume]); - else if (abs($channel[self::peakVolume]) <= 0xffff) - $data .= Transform::toInt8(16) . - Transform::toUInt16BE($channel[self::peakVolume]); - else if (abs($channel[self::peakVolume]) <= 0xffffffff) - $data .= Transform::toInt8(32) . - Transform::toUInt32BE($channel[self::peakVolume]); - else - $data .= Transform::toInt8(64) . - Transform::toInt64BE($channel[self::peakVolume]); // UInt64 - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVAD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVAD.php deleted file mode 100644 index c377aa7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVAD.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: RVAD.php 105 2008-07-30 14:56:47Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Relative volume adjustment</i> frame is a more subjective function - * than the previous ones. It allows the user to say how much he wants to - * increase/decrease the volume on each channel while the file is played. The - * purpose is to be able to align all files to a reference volume, so that you - * don't have to change the volume constantly. This frame may also be used to - * balance adjust the audio. - * - * There may only be one RVAD frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_RVAD extends ID3_Frame -{ - /* The required keys. */ - - /** @var string */ - const right = "right"; - - /** @var string */ - const left = "left"; - - /** @var string */ - const peakRight = "peakRight"; - - /** @var string */ - const peakLeft = "peakLeft"; - - /* The optional keys. */ - - /** @var string */ - const rightBack = "rightBack"; - - /** @var string */ - const leftBack = "leftBack"; - - /** @var string */ - const peakRightBack = "peakRightBack"; - - /** @var string */ - const peakLeftBack = "peakLeftBack"; - - /** @var string */ - const center = "center"; - - /** @var string */ - const peakCenter = "peakCenter"; - - /** @var string */ - const bass = "bass"; - - /** @var string */ - const peakBass = "peakBass"; - - /** @var Array */ - private $_adjustments; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $flags = Transform::fromInt8($this->_data[0]); - $descriptionBits = Transform::fromInt8($this->_data[1]); - if ($descriptionBits <= 8 || $descriptionBits > 16) - throw new ID3_Exception - ("Unsupported description bit size of: " . $descriptionBits); - - $this->_adjustments[self::right] = - ($flags & 0x1) == 0x1 ? - Transform::fromUInt16BE(substr($this->_data, 2, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 2, 2)); - $this->_adjustments[self::left] = - ($flags & 0x2) == 0x2 ? - Transform::fromUInt16BE(substr($this->_data, 4, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 4, 2)); - $this->_adjustments[self::peakRight] = - Transform::fromUInt16BE(substr($this->_data, 6, 2)); - $this->_adjustments[self::peakLeft] = - Transform::fromUInt16BE(substr($this->_data, 8, 2)); - - if ($this->getSize() <= 10) - return; - - $this->_adjustments[self::rightBack] = - ($flags & 0x4) == 0x4 ? - Transform::fromUInt16BE(substr($this->_data, 10, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 10, 2)); - $this->_adjustments[self::leftBack] = - ($flags & 0x8) == 0x8 ? - Transform::fromUInt16BE(substr($this->_data, 12, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 12, 2)); - $this->_adjustments[self::peakRightBack] = - Transform::fromUInt16BE(substr($this->_data, 14, 2)); - $this->_adjustments[self::peakLeftBack] = - Transform::fromUInt16BE(substr($this->_data, 16, 2)); - - if ($this->getSize() <= 18) - return; - - $this->_adjustments[self::center] = - ($flags & 0x10) == 0x10 ? - Transform::fromUInt16BE(substr($this->_data, 18, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 18, 2)); - $this->_adjustments[self::peakCenter] = - Transform::fromUInt16BE(substr($this->_data, 20, 2)); - - if ($this->getSize() <= 22) - return; - - $this->_adjustments[self::bass] = - ($flags & 0x20) == 0x20 ? - Transform::fromUInt16BE(substr($this->_data, 22, 2)) : - -Transform::fromUInt16BE(substr($this->_data, 22, 2)); - $this->_adjustments[self::peakBass] = - Transform::fromUInt16BE(substr($this->_data, 24, 2)); - } - - /** - * Returns the array containing the volume adjustments. The array must contain - * the following keys: right, left, peakRight, peakLeft. It may optionally - * contain the following keys: rightBack, leftBack, peakRightBack, - * peakLeftBack, center, peakCenter, bass, and peakBass. - * - * @return Array - */ - public function getAdjustments() { return $this->_adjustments; } - - /** - * Sets the array of volume adjustments. The array must contain the following - * keys: right, left, peakRight, peakLeft. It may optionally contain the - * following keys: rightBack, leftBack, peakRightBack, peakLeftBack, center, - * peakCenter, bass, and peakBass. - * - * @param Array $adjustments The volume adjustments array. - */ - public function setAdjustments($adjustments) - { - $this->_adjustments = $adjustments; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $flags = 0; - if ($this->_adjustments[self::right] > 0) - $flags = $flags | 0x1; - if ($this->_adjustments[self::left] > 0) - $flags = $flags | 0x2; - $data = Transform::toInt8(16) . - Transform::toUInt16BE(abs($this->_adjustments[self::right])) . - Transform::toUInt16BE(abs($this->_adjustments[self::left])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakRight])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakLeft])); - - if (isset($this->_adjustments[self::rightBack]) && - isset($this->_adjustments[self::leftBack]) && - isset($this->_adjustments[self::peakRightBack]) && - isset($this->_adjustments[self::peakLeftBack])) { - if ($this->_adjustments[self::rightBack] > 0) - $flags = $flags | 0x4; - if ($this->_adjustments[self::leftBack] > 0) - $flags = $flags | 0x8; - $data .= - Transform::toUInt16BE(abs($this->_adjustments[self::rightBack])) . - Transform::toUInt16BE(abs($this->_adjustments[self::leftBack])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakRightBack])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakLeftBack])); - } - - if (isset($this->_adjustments[self::center]) && - isset($this->_adjustments[self::peakCenter])) { - if ($this->_adjustments[self::center] > 0) - $flags = $flags | 0x10; - $data .= - Transform::toUInt16BE(abs($this->_adjustments[self::center])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakCenter])); - } - - if (isset($this->_adjustments[self::bass]) && - isset($this->_adjustments[self::peakBass])) { - if ($this->_adjustments[self::bass] > 0) - $flags = $flags | 0x20; - $data .= - Transform::toUInt16BE(abs($this->_adjustments[self::bass])) . - Transform::toUInt16BE(abs($this->_adjustments[self::peakBass])); - } - $this->setData(Transform::toInt8($flags) . $data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVRB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVRB.php deleted file mode 100644 index 1027ea8..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/RVRB.php +++ /dev/null @@ -1,314 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: RVRB.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Reverb</i> is yet another subjective frame, with which you can adjust - * echoes of different kinds. Reverb left/right is the delay between every - * bounce in milliseconds. Reverb bounces left/right is the number of bounces - * that should be made. $FF equals an infinite number of bounces. Feedback is - * the amount of volume that should be returned to the next echo bounce. $00 is - * 0%, $FF is 100%. If this value were $7F, there would be 50% volume reduction - * on the first bounce, 50% of that on the second and so on. Left to left means - * the sound from the left bounce to be played in the left speaker, while left - * to right means sound from the left bounce to be played in the right speaker. - * - * Premix left to right is the amount of left sound to be mixed in the right - * before any reverb is applied, where $00 id 0% and $FF is 100%. Premix right - * to left does the same thing, but right to left. Setting both premix to $FF - * would result in a mono output (if the reverb is applied symmetric). There may - * only be one RVRB frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_RVRB extends ID3_Frame -{ - /** @var integer */ - private $_reverbLeft; - - /** @var integer */ - private $_reverbRight; - - /** @var integer */ - private $_reverbBouncesLeft; - - /** @var integer */ - private $_reverbBouncesRight; - - /** @var integer */ - private $_reverbFeedbackLtoL; - - /** @var integer */ - private $_reverbFeedbackLtoR; - - /** @var integer */ - private $_reverbFeedbackRtoR; - - /** @var integer */ - private $_reverbFeedbackRtoL; - - /** @var integer */ - private $_premixLtoR; - - /** @var integer */ - private $_premixRtoL; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_reverbLeft = Transform::fromUInt16BE(substr($this->_data, 0, 2)); - $this->_reverbRight = Transform::fromUInt16BE(substr($this->_data, 2, 2)); - $this->_reverbBouncesLeft = Transform::fromUInt8($this->_data[4]); - $this->_reverbBouncesRight = Transform::fromUInt8($this->_data[5]); - $this->_reverbFeedbackLtoL = Transform::fromUInt8($this->_data[6]); - $this->_reverbFeedbackLtoR = Transform::fromUInt8($this->_data[7]); - $this->_reverbFeedbackRtoR = Transform::fromUInt8($this->_data[8]); - $this->_reverbFeedbackRtoL = Transform::fromUInt8($this->_data[9]); - $this->_premixLtoR = Transform::fromUInt8($this->_data[10]); - $this->_premixRtoL = Transform::fromUInt8($this->_data[11]); - } - - /** - * Returns the left reverb. - * - * @return integer - */ - public function getReverbLeft() { return $this->_reverbLeft; } - - /** - * Sets the left reverb. - * - * @param integer $reverbLeft The left reverb. - */ - public function setReverbLeft($reverbLeft) - { - return $this->_reverbLeft = $reverbLeft; - } - - /** - * Returns the right reverb. - * - * @return integer - */ - public function getReverbRight() { return $this->_reverbRight; } - - /** - * Sets the right reverb. - * - * @param integer $reverbRight The right reverb. - */ - public function setReverbRight($reverbRight) - { - return $this->_reverbRight = $reverbRight; - } - - /** - * Returns the left reverb bounces. - * - * @return integer - */ - public function getReverbBouncesLeft() { return $this->_reverbBouncesLeft; } - - /** - * Sets the left reverb bounces. - * - * @param integer $reverbBouncesLeft The left reverb bounces. - */ - public function setReverbBouncesLeft($reverbBouncesLeft) - { - $this->_reverbBouncesLeft = $reverbBouncesLeft; - } - - /** - * Returns the right reverb bounces. - * - * @return integer - */ - public function getReverbBouncesRight() { return $this->_reverbBouncesRight; } - - /** - * Sets the right reverb bounces. - * - * @param integer $reverbBouncesRight The right reverb bounces. - */ - public function setReverbBouncesRight($reverbBouncesRight) - { - $this->_reverbBouncesRight = $reverbBouncesRight; - } - - /** - * Returns the left-to-left reverb feedback. - * - * @return integer - */ - public function getReverbFeedbackLtoL() { return $this->_reverbFeedbackLtoL; } - - /** - * Sets the left-to-left reverb feedback. - * - * @param integer $reverbFeedbackLtoL The left-to-left reverb feedback. - */ - public function setReverbFeedbackLtoL($reverbFeedbackLtoL) - { - $this->_reverbFeedbackLtoL = $reverbFeedbackLtoL; - } - - /** - * Returns the left-to-right reverb feedback. - * - * @return integer - */ - public function getReverbFeedbackLtoR() { return $this->_reverbFeedbackLtoR; } - - /** - * Sets the left-to-right reverb feedback. - * - * @param integer $reverbFeedbackLtoR The left-to-right reverb feedback. - */ - public function setReverbFeedbackLtoR($reverbFeedbackLtoR) - { - $this->_reverbFeedbackLtoR = $reverbFeedbackLtoR; - } - - /** - * Returns the right-to-right reverb feedback. - * - * @return integer - */ - public function getReverbFeedbackRtoR() { return $this->_reverbFeedbackRtoR; } - - /** - * Sets the right-to-right reverb feedback. - * - * @param integer $reverbFeedbackRtoR The right-to-right reverb feedback. - */ - public function setReverbFeedbackRtoR($reverbFeedbackRtoR) - { - $this->_reverbFeedbackRtoR = $reverbFeedbackRtoR; - } - - /** - * Returns the right-to-left reverb feedback. - * - * @return integer - */ - public function getReverbFeedbackRtoL() { return $this->_reverbFeedbackRtoL; } - - /** - * Sets the right-to-left reverb feedback. - * - * @param integer $reverbFeedbackRtoL The right-to-left reverb feedback. - */ - public function setReverbFeedbackRtoL($reverbFeedbackRtoL) - { - $this->_reverbFeedbackRtoL = $reverbFeedbackRtoL; - } - - /** - * Returns the left-to-right premix. - * - * @return integer - */ - public function getPremixLtoR() { return $this->_premixLtoR; } - - /** - * Sets the left-to-right premix. - * - * @param integer $premixLtoR The left-to-right premix. - */ - public function setPremixLtoR($premixLtoR) - { - $this->_premixLtoR = $premixLtoR; - } - - /** - * Returns the right-to-left premix. - * - * @return integer - */ - public function getPremixRtoL() { return $this->_premixRtoL; } - - /** - * Sets the right-to-left premix. - * - * @param integer $premixRtoL The right-to-left premix. - */ - public function setPremixRtoL($premixRtoL) - { - $this->_premixRtoL = $premixRtoL; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData - (Transform::toUInt16BE($this->_reverbLeft) . - Transform::toUInt16BE($this->_reverbRight) . - Transform::toUInt8($this->_reverbBouncesLeft) . - Transform::toUInt8($this->_reverbBouncesRight) . - Transform::toUInt8($this->_reverbFeedbackLtoL) . - Transform::toUInt8($this->_reverbFeedbackLtoR) . - Transform::toUInt8($this->_reverbFeedbackRtoR) . - Transform::toUInt8($this->_reverbFeedbackRtoL) . - Transform::toUInt8($this->_premixLtoR) . - Transform::toUInt8($this->_premixRtoL)); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SEEK.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SEEK.php deleted file mode 100644 index d211bf6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SEEK.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SEEK.php 75 2008-04-14 23:57:21Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * The <i>Seek</i> frame indicates where other tags in a file/stream can be - * found. The minimum offset to next tag is calculated from the end of this tag - * to the beginning of the next. There may only be one seek frame in a tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_SEEK extends ID3_Frame -{ - /** @var integer */ - private $_minOffset; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_minOffset = Transform::fromInt32BE($this->_data); - } - - /** - * Returns the minimum offset to next tag in bytes. - * - * @return integer - */ - public function getMinimumOffset() { return $this->_minOffset; } - - /** - * Sets the minimum offset to next tag in bytes. - * - * @param integer $minOffset The minimum offset. - */ - public function setMinimumOffset($minOffset) - { - $this->_minOffset = $minOffset; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData(Transform::toInt32BE($this->_minOffset)); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SIGN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SIGN.php deleted file mode 100644 index ff37c63..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SIGN.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SIGN.php 105 2008-07-30 14:56:47Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * This frame enables a group of frames, grouped with the - * <i>Group identification registration</i>, to be signed. Although signatures - * can reside inside the registration frame, it might be desired to store the - * signature elsewhere, e.g. in watermarks. There may be more than one signature - * frame in a tag, but no two may be identical. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_SIGN extends ID3_Frame -{ - /** @var integer */ - private $_group; - - /** @var string */ - private $_signature; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_group = Transform::fromUInt8(substr($this->_data, 0, 1)); - $this->_signature = substr($this->_data, 1); - } - - /** - * Returns the group symbol byte. - * - * @return integer - */ - public function getGroup() { return $this->_group; } - - /** - * Sets the group symbol byte. - * - * @param integer $group The group symbol byte. - */ - public function setGroup($group) { $this->_group = $group; } - - /** - * Returns the signature binary data. - * - * @return string - */ - public function getSignature() { return $this->_signature; } - - /** - * Sets the signature binary data. - * - * @param string $signature The signature binary data string. - */ - public function setSignature($signature) { $this->_signature = $signature; } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $this->setData(Transform::toUInt8($this->_group) . $this->_signature); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYLT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYLT.php deleted file mode 100644 index f1995cc..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYLT.php +++ /dev/null @@ -1,313 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SYLT.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -require_once("ID3/Language.php"); -require_once("ID3/Timing.php"); -/**#@-*/ - -/** - * The <i>Synchronised lyrics/text</i> frame is another way of incorporating the - * words, said or sung lyrics, in the audio file as text, this time, however, - * in sync with the audio. It might also be used to describing events e.g. - * occurring on a stage or on the screen in sync with the audio. - * - * There may be more than one SYLT frame in each tag, but only one with the - * same language and content descriptor. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_SYLT extends ID3_Frame - implements ID3_Encoding, ID3_Language, ID3_Timing -{ - /** - * The list of content types. - * - * @var Array - */ - public static $types = array - ("Other", "Lyrics", "Text transcription", "Movement/Part name", "Events", - "Chord", "Trivia", "URLs to webpages", "URLs to images"); - - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_language = "und"; - - /** @var integer */ - private $_format = ID3_Timing::MPEG_FRAMES; - - /** @var integer */ - private $_type = 0; - - /** @var string */ - private $_description; - - /** @var Array */ - private $_events = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_language = substr($this->_data, 1, 3); - if ($this->_language == "XXX") - $this->_language = "und"; - $this->_format = Transform::fromUInt8($this->_data[4]); - $this->_type = Transform::fromUInt8($this->_data[5]); - $this->_data = substr($this->_data, 6); - - switch ($this->_encoding) { - case self::UTF16: - list($this->_description, $this->_data) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - break; - case self::UTF16BE: - list($this->_description, $this->_data) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - break; - default: - list($this->_description, $this->_data) = - $this->explodeString8($this->_data, 2); - $this->_description = Transform::fromString8($this->_description); - } - - while (strlen($this->_data) > 0) { - switch ($this->_encoding) { - case self::UTF16: - list($syllable, $this->_data) = - $this->explodeString16($this->_data, 2); - $syllable = Transform::fromString16($syllable); - break; - case self::UTF16BE: - list($syllable, $this->_data) = - $this->explodeString16($this->_data, 2); - $syllable = Transform::fromString16BE($syllable); - break; - default: - list($syllable, $this->_data) = - $this->explodeString8($this->_data, 2); - $syllable = Transform::fromString8($syllable); - } - $this->_events[Transform::fromUInt32BE(substr($this->_data, 0, 4))] = - $syllable; - $this->_data = substr($this->_data, 4); - } - ksort($this->_events); - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Sets the text language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @see ID3_Language - * @param string $language The language code. - */ - public function setLanguage($language) - { - if ($language == "XXX") - $language = "und"; - $this->_language = substr($language, 0, 3); - } - - /** - * Returns the timing format. - * - * @return integer - */ - public function getFormat() { return $this->_format; } - - /** - * Sets the timing format. - * - * @see ID3_Timing - * @param integer $format The timing format. - */ - public function setFormat($format) { $this->_format = $format; } - - /** - * Returns the content type code. - * - * @return integer - */ - public function getType() { return $this->_type; } - - /** - * Sets the content type code. - * - * @param integer $type The content type code. - */ - public function setType($type) { $this->_type = $type; } - - /** - * Returns the content description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. The description - * language and encoding must be that of the actual text. - * - * @param string $description The content description text. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $language = false, - $encoding = false) - { - $this->_description = $description; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the syllable events with their timestamps. - * - * @return Array - */ - public function getEvents() { return $this->_events; } - - /** - * Sets the syllable events with their timestamps using given encoding. - * The text language and encoding must be that of the description text. - * - * @param Array $text The test string. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setEvents($events, $language = false, $encoding = false) - { - $this->_events = $events; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - ksort($this->_events); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_language . - Transform::toUInt8($this->_format) . Transform::toUInt8($this->_type); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($this->_description, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) . - "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_description) . "\0\0"; - break; - default: - $data .= $this->_description . "\0"; - } - foreach ($this->_events as $timestamp => $syllable) { - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($syllable, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) . - "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE($syllable) . "\0\0"; - break; - default: - $data .= $syllable . "\0"; - } - $data .= Transform::toUInt32BE($timestamp); - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYTC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYTC.php deleted file mode 100644 index 5673a4e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/SYTC.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SYTC.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Timing.php"); -/**#@-*/ - -/** - * For a more accurate description of the tempo of a musical piece, the - * <i>Synchronised tempo codes</i> frame might be used. - * - * The tempo data consists of one or more tempo codes. Each tempo code consists - * of one tempo part and one time part. The tempo is in BPM described with one - * or two bytes. If the first byte has the value $FF, one more byte follows, - * which is added to the first giving a range from 2 - 510 BPM, since $00 and - * $01 is reserved. $00 is used to describe a beat-free time period, which is - * not the same as a music-free time period. $01 is used to indicate one single - * beat-stroke followed by a beat-free period. - * - * The tempo descriptor is followed by a time stamp. Every time the tempo in the - * music changes, a tempo descriptor may indicate this for the player. All tempo - * descriptors must be sorted in chronological order. The first beat-stroke in - * a time-period is at the same time as the beat description occurs. There may - * only be one SYTC frame in each tag. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -final class ID3_Frame_SYTC extends ID3_Frame - implements ID3_Timing -{ - /** Describes a beat-free time period. */ - const BEAT_FREE = 0x00; - - /** Indicate one single beat-stroke followed by a beat-free period. */ - const SINGLE_BEAT = 0x01; - - /** @var integer */ - private $_format = ID3_Timing::MPEG_FRAMES; - - /** @var Array */ - private $_events = array(); - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $offset = 0; - $this->_format = Transform::fromUInt8($this->_data[$offset++]); - while ($offset < strlen($this->_data)) { - $tempo = Transform::fromUInt8($this->_data[$offset++]); - if ($tempo == 0xff) - $tempo += Transform::fromUInt8($this->_data[$offset++]); - $this->_events - [Transform::fromUInt32BE(substr($this->_data, $offset, 4))] = $tempo; - $offset += 4; - } - ksort($this->_events); - } - - /** - * Returns the timing format. - * - * @return integer - */ - public function getFormat() { return $this->_format; } - - /** - * Sets the timing format. - * - * @see ID3_Timing - * @param integer $format The timing format. - */ - public function setFormat($format) { $this->_format = $format; } - - /** - * Returns the time-bpm tempo events. - * - * @return Array - */ - public function getEvents() { return $this->_events; } - - /** - * Sets the time-bpm tempo events. - * - * @param Array $events The time-bpm tempo events. - */ - public function setEvents($events) - { - $this->_events = $events; - ksort($this->_events); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_format); - foreach ($this->_events as $timestamp => $tempo) { - if ($tempo >= 0xff) - $data .= Transform::toUInt8(0xff) . Transform::toUInt8($tempo - 0xff); - else - $data .= Transform::toUInt8($tempo); - $data .= Transform::toUInt32BE($timestamp); - } - parent::setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TALB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TALB.php deleted file mode 100644 index e3834f6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TALB.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TALB.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Album/Movie/Show title</i> frame is intended for the title of the - * recording (or source of sound) from which the audio in the file is taken. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TALB extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TBPM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TBPM.php deleted file mode 100644 index 775d55f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TBPM.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TBPM.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>BPM</i> frame contains the number of beats per minute in the main part - * of the audio. The BPM is an integer and represented as a numerical string. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TBPM extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOM.php deleted file mode 100644 index d5e79c8..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOM.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TCOM.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Composer</i> frame is intended for the name of the composer. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TCOM extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCON.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCON.php deleted file mode 100644 index 41abd78..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCON.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TCON.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Content type</i>, which ID3v1 was stored as a one byte numeric value - * only, is now a string. You may use one or several of the ID3v1 types as - * numerical strings, or, since the category list would be impossible to - * maintain with accurate and up to date categories, define your own. - * - * You may also use any of the following keywords: - * - * <pre> - * RX Remix - * CR Cover - * </pre> - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TCON extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOP.php deleted file mode 100644 index 7cbed31..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TCOP.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TCOP.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Copyright message</i> frame, in which the string must begin with a - * year and a space character (making five characters), is intended for the - * copyright holder of the original sound, not the audio file itself. The - * absence of this frame means only that the copyright information is - * unavailable or has been removed, and must not be interpreted to mean that the - * audio is public domain. Every time this field is displayed the field must be - * preceded with "Copyright " (C) " ", where (C) is one character showing a C in - * a circle. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TCOP extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDAT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDAT.php deleted file mode 100644 index de8dda2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDAT.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDAT.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Date</i> frame is a numeric string in the DDMM format containing the - * date for the recording. This field is always four characters long. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TDAT extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDEN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDEN.php deleted file mode 100644 index 3c55b51..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDEN.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDEN.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Encoding time</i> frame contains a timestamp describing when the audio - * was encoded. Timestamp format is described in the - * {@link http://www.id3.org/id3v2.4.0-structure ID3v2 structure document}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TDEN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDLY.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDLY.php deleted file mode 100644 index 59d2779..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDLY.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDLY.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Playlist delay</i> defines the numbers of milliseconds of silence that - * should be inserted before this audio. The value zero indicates that this is a - * part of a multifile audio track that should be played continuously. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TDLY extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDOR.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDOR.php deleted file mode 100644 index 46a2acd..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDOR.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDOR.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original release time</i> frame contains a timestamp describing when - * the original recording of the audio was released. Timestamp format is - * described in the {@link http://www.id3.org/id3v2.4.0-structure ID3v2 - * structure document}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TDOR extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRC.php deleted file mode 100644 index fc6a871..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRC.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDRC.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Recording time</i> frame contains a timestamp describing when the - * audio was recorded. Timestamp format is described in the - * {@link http://www.id3.org/id3v2.4.0-structure ID3v2 structure document}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TDRC extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRL.php deleted file mode 100644 index b3cdddf..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDRL.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDRL.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Release time</i> frame contains a timestamp describing when the audio - * was first released. Timestamp format is described in the - * {@link http://www.id3.org/id3v2.4.0-structure ID3v2 structure document}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TDRL extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDTG.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDTG.php deleted file mode 100644 index 9e724e5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TDTG.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TDTG.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Tagging time</i> frame contains a timestamp describing then the audio - * was tagged. Timestamp format is described in the - * {@link http://www.id3.org/id3v2.4.0-structure ID3v2 structure document}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TDTG extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TENC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TENC.php deleted file mode 100644 index f55becd..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TENC.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TENC.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Encoded by</i> frame contains the name of the person or organisation - * that encoded the audio file. This field may contain a copyright message, if - * the audio file also is copyrighted by the encoder. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TENC extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TEXT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TEXT.php deleted file mode 100644 index fc4cc76..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TEXT.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TEXT.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Lyricist/Text writer</i> frame is intended for the writer of the text - * or lyrics in the recording. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TEXT extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TFLT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TFLT.php deleted file mode 100644 index 2e7279f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TFLT.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TFLT.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>File type</i> frame indicates which type of audio this tag defines. - * The following types and refinements are defined: - * - * <pre> - * MIME MIME type follows - * MPG MPEG Audio - * /1 MPEG 1/2 layer I - * /2 MPEG 1/2 layer II - * /3 MPEG 1/2 layer III - * /2.5 MPEG 2.5 - * /AAC Advanced audio compression - * VQF Transform-domain Weighted Interleave Vector Quantisation - * PCM Pulse Code Modulated audio - * </pre> - * - * but other types may be used, but not for these types though. This is used in - * a similar way to the predefined types in the {@link ID3_Frame_TMED} - * frame. If this frame is not present audio type is assumed to be MPG. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TFLT extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIME.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIME.php deleted file mode 100644 index 1165986..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIME.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TIME.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Time</i> frame is a numeric string in the HHMM format containing the - * time for the recording. This field is always four characters long. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TIME extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIPL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIPL.php deleted file mode 100644 index 3882383..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIPL.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TIPL.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Involved people list</i> is very similar to the musician credits list, - * but maps between functions, like producer, and names. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TIPL extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT1.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT1.php deleted file mode 100644 index 929dd75..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT1.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TIT1.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Content group description</i> frame is used if the sound belongs to a - * larger category of sounds/music. For example, classical music is often sorted - * in different musical sections (e.g. "Piano Concerto", "Weather - Hurricane"). - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TIT1 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT2.php deleted file mode 100644 index b1128b3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT2.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TIT2.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Title/Songname/Content description</i> frame is the actual name of the - * piece (e.g. "Adagio", "Hurricane Donna"). - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TIT2 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT3.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT3.php deleted file mode 100644 index 2b03f5a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TIT3.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TIT3.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Subtitle/Description refinement</i> frame is used for information - * directly related to the contents title (e.g. "Op. 16" or "Performed live at - * Wembley"). - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TIT3 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TKEY.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TKEY.php deleted file mode 100644 index b0cbe72..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TKEY.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TKEY.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Initial key</i> frame contains the musical key in which the sound - * starts. It is represented as a string with a maximum length of three - * characters. The ground keys are represented with "A", "B", "C", "D", "E", "F" - * and "G" and halfkeys represented with "b" and "#". Minor is represented as - * "m", e.g. "Dbm" $00. Off key is represented with an "o" only. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TKEY extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLAN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLAN.php deleted file mode 100644 index 61b07ad..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLAN.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TLAN.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Language</i> frame should contain the languages of the text or lyrics - * spoken or sung in the audio. The language is represented with three - * characters according to {@link http://www.loc.gov/standards/iso639-2/ - * ISO-639-2}. If more than one language is used in the text their language - * codes should follow according to the amount of their usage, e.g. - * "eng" $00 "sve" $00. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TLAN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLEN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLEN.php deleted file mode 100644 index 3ba2c2e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TLEN.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TLEN.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Length</i> frame contains the length of the audio file in - * milliseconds, represented as a numeric string. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TLEN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMCL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMCL.php deleted file mode 100644 index 8cf57e7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMCL.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TMCL.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Musician credits list</i> is intended as a mapping between instruments - * and the musician that played it. Every odd field is an instrument and every - * even is an artist or a comma delimited list of artists. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TMCL extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMED.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMED.php deleted file mode 100644 index ef70d69..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMED.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TMED.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Media type</i> frame describes from which media the sound originated. - * This may be a text string or a reference to the predefined media types found - * in the list below. Example: "VID/PAL/VHS" $00. - * - * <pre> - * DIG Other digital media - * /A Analogue transfer from media - * - * ANA Other analogue media - * /WAC Wax cylinder - * /8CA 8-track tape cassette - * - * CD CD - * /A Analogue transfer from media - * /DD DDD - * /AD ADD - * /AA AAD - * - * LD Laserdisc - * - * TT Turntable records - * /33 33.33 rpm - * /45 45 rpm - * /71 71.29 rpm - * /76 76.59 rpm - * /78 78.26 rpm - * /80 80 rpm - * - * MD MiniDisc - * /A Analogue transfer from media - * - * DAT DAT - * /A Analogue transfer from media - * /1 standard, 48 kHz/16 bits, linear - * /2 mode 2, 32 kHz/16 bits, linear - * /3 mode 3, 32 kHz/12 bits, non-linear, low speed - * /4 mode 4, 32 kHz/12 bits, 4 channels - * /5 mode 5, 44.1 kHz/16 bits, linear - * /6 mode 6, 44.1 kHz/16 bits, 'wide track' play - * - * DCC DCC - * /A Analogue transfer from media - * - * DVD DVD - * /A Analogue transfer from media - * - * TV Television - * /PAL PAL - * /NTSC NTSC - * /SECAM SECAM - * - * VID Video - * /PAL PAL - * /NTSC NTSC - * /SECAM SECAM - * /VHS VHS - * /SVHS S-VHS - * /BETA BETAMAX - * - * RAD Radio - * /FM FM - * /AM AM - * /LW LW - * /MW MW - * - * TEL Telephone - * /I ISDN - * - * MC MC (normal cassette) - * /4 4.75 cm/s (normal speed for a two sided cassette) - * /9 9.5 cm/s - * /I Type I cassette (ferric/normal) - * /II Type II cassette (chrome) - * /III Type III cassette (ferric chrome) - * /IV Type IV cassette (metal) - * - * REE Reel - * /9 9.5 cm/s - * /19 19 cm/s - * /38 38 cm/s - * /76 76 cm/s - * /I Type I cassette (ferric/normal) - * /II Type II cassette (chrome) - * /III Type III cassette (ferric chrome) - * /IV Type IV cassette (metal) - * </pre> - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TMED extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMOO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMOO.php deleted file mode 100644 index eb4cd8f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TMOO.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TMOO.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Mood</i> frame is intended to reflect the mood of the audio with a few - * keywords, e.g. "Romantic" or "Sad". - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TMOO extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOAL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOAL.php deleted file mode 100644 index 11ec617..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOAL.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TOAL.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original album/movie/show title</i> frame is intended for the title of - * the original recording (or source of sound), if for example the music in the - * file should be a cover of a previously released song. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TOAL extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOFN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOFN.php deleted file mode 100644 index f923049..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOFN.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TOFN.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original filename</i> frame contains the preferred filename for the - * file, since some media doesn't allow the desired length of the filename. The - * filename is case sensitive and includes its suffix. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TOFN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOLY.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOLY.php deleted file mode 100644 index ee6acc6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOLY.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TOLY.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original lyricist/text writer</i> frame is intended for the text - * writer of the original recording, if for example the music in the file should - * be a cover of a previously released song. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TOLY extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOPE.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOPE.php deleted file mode 100644 index e77bff0..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOPE.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TOPE.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original artist/performer</i> frame is intended for the performer of - * the original recording, if for example the music in the file should be a - * cover of a previously released song. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TOPE extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TORY.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TORY.php deleted file mode 100644 index 41d5ab3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TORY.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TORY.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Original release year</i> frame is intended for the year when the - * original recording, if for example the music in the file should be a cover of - * a previously released song, was released. The field is formatted as in the - * {@link ID3_Frame_TYER} frame. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TORY extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOWN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOWN.php deleted file mode 100644 index 780a0e6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TOWN.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TOWN.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>File owner/licensee</i> frame contains the name of the owner or - * licensee of the file and it's contents. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TOWN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE1.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE1.php deleted file mode 100644 index 478c3ba..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE1.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPE1.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Lead artist/Lead performer/Soloist/Performing group</i> is used for - * the main artist. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPE1 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE2.php deleted file mode 100644 index 13032d3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE2.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPE2.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Band/Orchestra/Accompaniment</i> frame is used for additional - * information about the performers in the recording. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPE2 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE3.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE3.php deleted file mode 100644 index 79c5da8..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE3.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPE3.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Conductor</i> frame is used for the name of the conductor. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPE3 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE4.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE4.php deleted file mode 100644 index d1fe19c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPE4.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPE4.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Interpreted, remixed, or otherwise modified by</i> frame contains more - * information about the people behind a remix and similar interpretations of - * another existing piece. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPE4 extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPOS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPOS.php deleted file mode 100644 index 3f578c1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPOS.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPOS.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Part of a set</i> frame is a numeric string that describes which part - * of a set the audio came from. This frame is used if the source described in - * the {@link ID3_Frame_TALB} frame is divided into several mediums, e.g. - * a double CD. The value may be extended with a "/" character and a numeric - * string containing the total number of parts in the set. E.g. "1/2". - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPOS extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPRO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPRO.php deleted file mode 100644 index 152c555..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPRO.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPRO.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Produced notice</i> frame, in which the string must begin with a year - * and a space character (making five characters), is intended for the - * production copyright holder of the original sound, not the audio file itself. - * The absence of this frame means only that the production copyright - * information is unavailable or has been removed, and must not be interpreted - * to mean that the audio is public domain. Every time this field is displayed - * the field must be preceded with "Produced " (P) " ", where (P) is one - * character showing a P in a circle. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TPRO extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPUB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPUB.php deleted file mode 100644 index f55a62e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TPUB.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TPUB.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Publisher</i> frame simply contains the name of the label or - * publisher. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TPUB extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRCK.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRCK.php deleted file mode 100644 index c2461ed..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRCK.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRCK.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Track number/Position in set</i> frame is a numeric string containing - * the order number of the audio-file on its original recording. This may be - * extended with a "/" character and a numeric string containing the total - * number of tracks/elements on the original recording. E.g. "4/9". - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TRCK extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRDA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRDA.php deleted file mode 100644 index 3cef5c9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRDA.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRDA.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Recording dates</i> frame is intended to be used as complement to - * the {@link ID3_Frame_TYER}, {@link ID3_Frame_TDAT} and {@link ID3_Frame_TIME} - * frames. E.g. "4th-7th June, 12th June" in combination with the - * {@link ID3_Frame_TYER} frame. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TRDA extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSN.php deleted file mode 100644 index ba58981..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSN.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRSN.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Internet radio station name</i> frame contains the name of the - * internet radio station from which the audio is streamed. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TRSN extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSO.php deleted file mode 100644 index 7c58a0c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TRSO.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRSO.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Internet radio station owner</i> frame contains the name of the owner - * of the internet radio station from which the audio is streamed. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TRSO extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSIZ.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSIZ.php deleted file mode 100644 index b4cfab6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSIZ.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSIZ.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Size</i> frame contains the size of the audiofile in bytes, excluding - * the ID3v2 tag, represented as a numeric string. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TSIZ extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOA.php deleted file mode 100644 index 1ba7d79..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOA.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSOA.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Album sort order</i> frame defines a string which should be used - * instead of the {@link ID3_Frame_TALB} album name frame for sorting purposes. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TSOA extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOP.php deleted file mode 100644 index 764fc91..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOP.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSOP.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Performer sort order</i> frame defines a string which should be used - * instead of the {@link ID3_Frame_TPE2} performer frame for sorting purposes. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TSOP extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOT.php deleted file mode 100644 index bf96f7c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSOT.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSOT.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Title sort order</i> frame defines a string which should be used - * instead of the {@link ID3_Frame_TIT2} title frame for sorting purposes. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TSOT extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSRC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSRC.php deleted file mode 100644 index b74ba10..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSRC.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSRC.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>ISRC</i> frame should contain the International Standard Recording - * Code (12 characters). - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_ISRC extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSSE.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSSE.php deleted file mode 100644 index a342b65..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSSE.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSSE.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Software/Hardware and settings used for encoding</i> frame includes - * the used audio encoder and its settings when the file was encoded. Hardware - * refers to hardware encoders, not the computer on which a program was run. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_TSSE extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSST.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSST.php deleted file mode 100644 index b13b41b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TSST.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TSST.php 65 2008-04-02 15:22:46Z svollbehr $ - * @since ID3v2.4.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Set subtitle</i> frame is intended for the subtitle of the part of a - * set this track belongs to. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - * @since ID3v2.4.0 - */ -final class ID3_Frame_TSST extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TXXX.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TXXX.php deleted file mode 100644 index f1facd1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TXXX.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TXXX.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * This frame is intended for one-string text information concerning the audio - * file in a similar way to the other T-frames. The frame body consists of a - * description of the string, represented as a terminated string, followed by - * the actual string. There may be more than one TXXX frame in each tag, but - * only one with the same description. - * - * The description is the first value, and the its value the second in the text - * array. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_TXXX extends ID3_Frame_AbstractText -{ - /** @var string */ - private $_description; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - ID3_Frame::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_data = substr($this->_data, 1); - - switch ($this->_encoding) { - case self::UTF16: - list($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - $this->_text = array(Transform::fromString16($this->_text)); - break; - case self::UTF16BE: - list($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - $this->_text = array(Transform::fromString16BE($this->_text)); - break; - default: - list($this->_description, $this->_text) = - $this->explodeString8($this->_data, 2); - $this->_text = array($this->_text); - } - } - - /** - * Returns the description text. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the description text using given encoding. - * - * @param string $description The content description text. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $encoding = false) - { - $this->_description = $description; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - $data .= Transform::toString16($this->_description, $order) . "\0\0" . - Transform::toString16($this->_text[0], $order); - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_description) . "\0\0" . - Transform::toString16BE($this->_text[0]); - break; - default: - $data .= $this->_description . "\0" . $this->_text[0]; - } - $this->setData($data); - return ID3_Frame::__toString(); - } -} - diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TYER.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TYER.php deleted file mode 100644 index ed338bf..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/TYER.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TYER.php 75 2008-04-14 23:57:21Z svollbehr $ - * @deprecated ID3v2.3.0 - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractText.php"); -/**#@-*/ - -/** - * The <i>Year</i> frame is a numeric string with a year of the recording. This - * frames is always four characters long (until the year 10000). - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 75 $ - * @deprecated ID3v2.3.0 - */ -final class ID3_Frame_TYER extends ID3_Frame_AbstractText {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USER.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USER.php deleted file mode 100644 index a46cfd7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USER.php +++ /dev/null @@ -1,186 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: USER.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -require_once("ID3/Language.php"); -/**#@-*/ - -/** - * The <i>Terms of use frame</i> contains a brief description of the terms of - * use and ownership of the file. More detailed information concerning the legal - * terms might be available through the {@link ID3_Frame_WCOP} frame. Newlines - * are allowed in the text. There may be more than one Terms of use frames in a - * tag, but only one with the same language. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_USER extends ID3_Frame - implements ID3_Encoding, ID3_Language -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_language = "und"; - - /** @var string */ - private $_text; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_language = substr($this->_data, 1, 3); - if ($this->_language == "XXX") - $this->_language = "und"; - $this->_data = substr($this->_data, 4); - - switch ($this->_encoding) { - case self::UTF16: - $this->_text = Transform::fromString16($this->_data); - break; - case self::UTF16BE: - $this->_text = Transform::fromString16BE($this->_data); - break; - default: - $this->_text = Transform::fromString8($this->_data); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Sets the text language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @see ID3_Language - * @param string $language The language code. - */ - public function setLanguage($language) - { - if ($language == "XXX") - $language = "und"; - $this->_language = substr($language, 0, 3); - } - - /** - * Returns the text. - * - * @return string - */ - public function getText() { return $this->_text; } - - /** - * Sets the text using given language and encoding. - * - * @param string $text The text. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setText($text, $language = false, $encoding = false) - { - $this->_text = $text; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_language; - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($this->_text, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER); - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_text); - break; - default: - $data .= $this->_text; - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USLT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USLT.php deleted file mode 100644 index 000a540..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/USLT.php +++ /dev/null @@ -1,225 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: USLT.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame.php"); -require_once("ID3/Encoding.php"); -require_once("ID3/Language.php"); -/**#@-*/ - -/** - * The <i>Unsynchronised lyrics/text transcription</i> frame contains the lyrics - * of the song or a text transcription of other vocal activities. There may be - * more than one unsynchronised lyrics/text transcription frame in each tag, but - * only one with the same language and content descriptor. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_USLT extends ID3_Frame - implements ID3_Encoding, ID3_Language -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_language = "und"; - - /** @var string */ - private $_description; - - /** @var string */ - private $_text; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_language = substr($this->_data, 1, 3); - if ($this->_language == "XXX") - $this->_language = "und"; - $this->_data = substr($this->_data, 4); - - switch ($this->_encoding) { - case self::UTF16: - list ($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - $this->_text = Transform::fromString16($this->_text); - break; - case self::UTF16BE: - list ($this->_description, $this->_text) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - $this->_text = Transform::fromString16BE($this->_text); - break; - default: - list ($this->_description, $this->_text) = - $this->explodeString8($this->_data, 2); - $this->_description = Transform::fromString8($this->_description); - $this->_text = Transform::fromString8($this->_text); - } - } - - /** - * Returns the text encoding. - * - * @return integer - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Sets the text language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO-639-2} standard. - * - * @see ID3_Language - * @param string $language The language code. - */ - public function setLanguage($language) - { - if ($language == "XXX") - $language = "und"; - $this->_language = substr($language, 0, 3); - } - - /** - * Returns the short content description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. The description - * language and encoding must be that of the actual text. - * - * @param string $description The content description text. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $language = false, - $encoding = false) - { - $this->_description = $description; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the lyrics/text. - * - * @return string - */ - public function getText() { return $this->_text; } - - /** - * Sets the text using given encoding. The text language and encoding must be - * that of the description text. - * - * @param mixed $text The test string. - * @param string $language The language code. - * @param integer $encoding The text encoding. - */ - public function setText($text, $language = false, $encoding = false) - { - $this->_text = $text; - if ($language !== false) - $this->setLanguage($language); - if ($encoding !== false) - $this->setEncoding($encoding); - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding) . $this->_language; - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $order = $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER; - $data .= Transform::toString16($this->_description, $order) . "\0\0" . - Transform::toString16($this->_text, $order); - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_description) . "\0\0" . - Transform::toString16BE($this->_text); - break; - default: - $data .= $this->_description . "\0" . $this->_text; - } - $this->setData($data); - return parent::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOM.php deleted file mode 100644 index e3fd209..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOM.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WCOM.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Commercial information</i> frame is a URL pointing at a webpage with - * information such as where the album can be bought. There may be more than one - * WCOM frame in a tag, but not with the same content. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WCOM extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOP.php deleted file mode 100644 index 42f1d90..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WCOP.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WCOP.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Copyright/Legal information</i> frame is a URL pointing at a webpage - * where the terms of use and ownership of the file is described. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WCOP extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAF.php deleted file mode 100644 index 2eabc45..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAF.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WOAF.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Official audio file webpage</i> frame is a URL pointing at a file - * specific webpage. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WOAF extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAR.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAR.php deleted file mode 100644 index c4e736e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAR.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WOAR.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Official artist/performer webpage</i> frame is a URL pointing at the - * artists official webpage. There may be more than one WOAR frame in a tag if - * the audio contains more than one performer, but not with the same content. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WOAR extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAS.php deleted file mode 100644 index b867e26..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WOAS.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WOAS.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Official audio source webpage</i> frame is a URL pointing at the - * official webpage for the source of the audio file, e.g. a movie. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WOAS extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WORS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WORS.php deleted file mode 100644 index 5529ff9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WORS.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WORS.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Official Internet radio station homepage</i> contains a URL pointing - * at the homepage of the internet radio station. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WORS extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPAY.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPAY.php deleted file mode 100644 index 2215755..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPAY.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WPAY.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Payment</i> frame is a URL pointing at a webpage that will handle the - * process of paying for this file. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WPAY extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPUB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPUB.php deleted file mode 100644 index 832bdec..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WPUB.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WPUB.php 65 2008-04-02 15:22:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -/**#@-*/ - -/** - * The <i>Publishers official webpage</i> frame is a URL pointing at the - * official webpage for the publisher. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 65 $ - */ -final class ID3_Frame_WPUB extends ID3_Frame_AbstractLink {} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WXXX.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WXXX.php deleted file mode 100644 index 7d2dfad..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Frame/WXXX.php +++ /dev/null @@ -1,162 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: WXXX.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Frame/AbstractLink.php"); -require_once("ID3/Encoding.php"); -/**#@-*/ - -/** - * This frame is intended for URL links concerning the audio file in a similar - * way to the other "W"-frames. The frame body consists of a description of the - * string, represented as a terminated string, followed by the actual URL. The - * URL is always encoded with ISO-8859-1. There may be more than one "WXXX" - * frame in each tag, but only one with the same description. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - */ -final class ID3_Frame_WXXX extends ID3_Frame_AbstractLink - implements ID3_Encoding -{ - /** @var integer */ - private $_encoding = ID3_Encoding::UTF8; - - /** @var string */ - private $_description; - - /** - * Constructs the class with given parameters and parses object related data. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - ID3_Frame::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_encoding = Transform::fromUInt8($this->_data[0]); - $this->_data = substr($this->_data, 1); - - switch ($this->_encoding) { - case self::UTF16: - list($this->_description, $this->_link) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16($this->_description); - break; - case self::UTF16BE: - list($this->_description, $this->_link) = - $this->explodeString16($this->_data, 2); - $this->_description = Transform::fromString16BE($this->_description); - break; - default: - list($this->_description, $this->_link) = - $this->explodeString8($this->_data, 2); - break; - } - $this->_link = implode($this->explodeString8($this->_link, 1), ""); - } - - /** - * Returns the text encoding. - * - * @return integer The encoding. - */ - public function getEncoding() { return $this->_encoding; } - - /** - * Sets the text encoding. - * - * @see ID3_Encoding - * @param integer $encoding The text encoding. - */ - public function setEncoding($encoding) { $this->_encoding = $encoding; } - - /** - * Returns the link description. - * - * @return string - */ - public function getDescription() { return $this->_description; } - - /** - * Sets the content description text using given encoding. - * - * @param string $description The content description text. - * @param integer $encoding The text encoding. - */ - public function setDescription($description, $encoding = false) - { - $this->_description = $description; - if ($encoding !== false) - $this->_encoding = $encoding; - } - - /** - * Returns the frame raw data. - * - * @return string - */ - public function __toString() - { - $data = Transform::toUInt8($this->_encoding); - switch ($this->_encoding) { - case self::UTF16: - case self::UTF16LE: - $data .= Transform::toString16 - ($this->_description, $this->_encoding == self::UTF16 ? - Transform::MACHINE_ENDIAN_ORDER : Transform::LITTLE_ENDIAN_ORDER) . - "\0\0"; - break; - case self::UTF16BE: - $data .= Transform::toString16BE($this->_description) . "\0\0"; - break; - default: - $data .= $this->_description . "\0"; - } - $this->setData($data . $this->_link); - return ID3_Frame::__toString(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Header.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Header.php deleted file mode 100644 index 3190b00..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Header.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Header.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ID3/Object.php"); -/**#@-*/ - -/** - * The first part of the ID3v2 tag is the 10 byte tag header. The header - * contains information about the tag version and options. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -final class ID3_Header extends ID3_Object -{ - /** A flag to denote whether or not unsynchronisation is applied on all - frames */ - const UNSYNCHRONISATION = 128; - - /** A flag to denote whether or not the header is followed by an extended - header */ - const EXTENDEDHEADER = 64; - - /** A flag used as an experimental indicator. This flag shall always be set - when the tag is in an experimental stage. */ - const EXPERIMENTAL = 32; - - /** - * A flag to denote whether a footer is present at the very end of the tag. - * - * @since ID3v2.4.0 - */ - const FOOTER = 16; - - /** @var integer */ - private $_version = 4.0; - - /** @var integer */ - private $_flags = 0; - - /** @var integer */ - private $_size; - - /** - * Constructs the class with given parameters and reads object related data - * from the ID3v2 tag. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_version = $options["version"] = - $this->_reader->readInt8() + $this->_reader->readInt8() / 10; - $this->_flags = $this->_reader->readInt8(); - $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE()); - } - - /** - * Returns the tag version number. The version number is in the form of - * major.revision. - * - * @return integer - */ - public function getVersion() { return $this->_version; } - - /** - * Sets the tag version number. Supported version numbers are 3.0 and 4.0 - * for ID3v2.3.0 and ID3v2.4.0 standards, respectively. - * - * @param integer $version The tag version number in the form of - * major.revision. - */ - public function setVersion($version) - { - $this->setOption("version", $this->_version = $version); - } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the flags byte. - * - * @return integer - */ - public function getFlags() { return $this->_flags; } - - /** - * Sets the flags byte. - * - * @param string $flags The flags byte. - */ - public function setFlags($flags) { $this->_flags = $flags; } - - /** - * Returns the tag size, excluding the header and the footer. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Sets the tag size, excluding the header and the footer. Called - * automatically upon tag generation to adjust the tag size. - * - * @param integer $size The size of the tag, in bytes. - */ - public function setSize($size) { $this->_size = $size; } - - /** - * Returns the header/footer raw data without the identifier. - * - * @return string - */ - public function __toString() - { - return Transform::toInt8(floor($this->_version)) . - Transform::toInt8(($this->_version - floor($this->_version)) * 10) . - Transform::toInt8($this->_flags) . - Transform::toUInt32BE($this->encodeSynchsafe32($this->_size)); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Language.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Language.php deleted file mode 100644 index 6cdb0be..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Language.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Language.php 64 2008-04-01 10:38:12Z svollbehr $ - */ - -/** - * The <var>Language</var> interface implies that the ID3v2 frame supports - * its content to be given in multiple languages. - * - * The three byte language code is used to describe the language of the frame's - * content, according to {@link http://www.loc.gov/standards/iso639-2/ - * ISO-639-2}. The language should be represented in lower case. If the language - * is not known the string "xxx" should be used. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 64 $ - */ -interface ID3_Language -{ - /** - * Returns the text language code. - * - * @return string - */ - public function getLanguage(); - - /** - * Sets the text language code. - * - * @param string $language The text language code. - */ - public function setLanguage($language); -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Object.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Object.php deleted file mode 100644 index c6ab3bc..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Object.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Object.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/** - * The base class for all ID3v2 objects. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -abstract class ID3_Object -{ - /** - * The reader object. - * - * @var Reader - */ - protected $_reader; - - /** - * The options array. - * - * @var Array - */ - private $_options; - - /** - * Constructs the class with given parameters and reads object related data - * from the ID3v2 tag. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader = null, &$options = array()) - { - $this->_reader = $reader; - $this->_options = &$options; - } - - /** - * Returns the options array. - * - * @return Array - */ - public function getOptions() { return $this->_options; } - - /** - * Returns the given option value, or the default value if the option is not - * defined. - * - * @param string $option The name of the option. - * @param mixed $defaultValue The default value to be returned. - */ - public function getOption($option, $defaultValue = false) - { - if (isset($this->_options[$option])) - return $this->_options[$option]; - return $defaultValue; - } - - /** - * Sets the options array. See {@link ID3v2} class for available options. - * - * @param Array $options The options array. - */ - public function setOptions(&$options) { $this->_options = &$options; } - - /** - * Sets the given option the given value. - * - * @param string $option The name of the option. - * @param mixed $value The value to set for the option. - */ - public function setOption($option, $value) - { - $this->_options[$option] = $value; - } - - /** - * Magic function so that $obj->value will work. - * - * @param string $name The field name. - * @return mixed - */ - public function __get($name) - { - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - else throw new ID3_Exception("Unknown field: " . $name); - } - - /** - * Magic function so that assignments with $obj->value will work. - * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed - */ - public function __set($name, $value) - { - if (method_exists($this, "set" . ucfirst($name))) - call_user_func - (array($this, "set" . ucfirst($name)), $value); - else throw new ID3_Exception("Unknown field: " . $name); - } - - /** - * Encodes the given 32-bit integer to 28-bit synchsafe integer, where the - * most significant bit of each byte is zero, making seven bits out of eight - * available. - * - * @param integer $val The integer to encode. - * @return integer - */ - protected function encodeSynchsafe32($val) - { - return ($val & 0x7f) | ($val & 0x3f80) << 1 | - ($val & 0x1fc000) << 2 | ($val & 0xfe00000) << 3; - } - - /** - * Decodes the given 28-bit synchsafe integer to regular 32-bit integer. - * - * @param integer $val The integer to decode - * @return integer - */ - protected function decodeSynchsafe32($val) - { - return ($val & 0x7f) | ($val & 0x7f00) >> 1 | - ($val & 0x7f0000) >> 2 | ($val & 0x7f000000) >> 3; - } - - /** - * Applies the unsynchronisation scheme to the given data string. - * - * Whenever a false synchronisation is found within the data, one zeroed byte - * is inserted after the first false synchronisation byte. This has the side - * effect that all 0xff00 combinations have to be altered, so they will not - * be affected by the decoding process. Therefore all the 0xff00 combinations - * have to be replaced with the 0xff0000 combination during the - * unsynchronisation. - * - * @param string $data The input data. - * @return string - */ - protected function encodeUnsynchronisation(&$data) - { - $result = ""; - for ($i = 0, $j = 0; $i < strlen($data) - 1; $i++) - if (ord($data[$i]) == 0xff && - ((($tmp = ord($data[$i + 1])) & 0xe0) == 0xe0 || $tmp == 0x0)) { - $result .= substr($data, $j, $i + 1 - $j) . "\0"; - $j = $i + 1; - } - return $result . substr($data, $j); - } - - /** - * Reverses the unsynchronisation scheme from the given data string. - * - * @see encodeUnsyncronisation - * @param string $data The input data. - * @return string - */ - protected function decodeUnsynchronisation(&$data) - { - $result = ""; - for ($i = 0, $j = 0; $i < strlen($data) - 1; $i++) - if (ord($data[$i]) == 0xff && ord($data[$i + 1]) == 0x0) { - $result .= substr($data, $j, $i + 1 - $j); - $j = $i + 2; - } - return $result . substr($data, $j); - } - - /** - * Splits UTF-16 formatted binary data up according to null terminators - * residing in the string, up to a given limit. - * - * @param string $value The input string. - * @return Array - */ - protected function explodeString16($value, $limit = null) - { - $i = 0; - $array = array(); - while (count($array) < $limit - 1 || $limit === null) { - $start = $i; - do { - $i = strpos($value, "\x00\x00", $i); - if ($i === false) { - $array[] = substr($value, $start); - return $array; - } - } while ($i & 0x1 != 0 && $i++); // make sure its aligned - $array[] = substr($value, $start, $i - $start); - $i += 2; - } - $array[] = substr($value, $i); - return $array; - } - - /** - * Splits UTF-8 or ISO-8859-1 formatted binary data according to null - * terminators residing in the string, up to a given limit. - * - * @param string $value The input string. - * @return Array - */ - protected function explodeString8($value, $limit = null) - { - return preg_split("/\\x00/", $value, $limit); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Timing.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Timing.php deleted file mode 100644 index 0ab120c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3/Timing.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Timing.php 64 2008-04-01 10:38:12Z svollbehr $ - */ - -/** - * The <var>Timing</var> interface implies that the ID3v2 frame contains - * one or more 32-bit timestamps. - * - * The timestamps are absolute times, meaning that every stamp contains the time - * from the beginning of the file. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 64 $ - */ -interface ID3_Timing -{ - /** The timestamp is an absolute time, using MPEG frames as unit. */ - const MPEG_FRAMES = 1; - - /** The timestamp is an absolute time, using milliseconds as unit. */ - const MILLISECONDS = 2; - - /** - * Returns the timing format. - * - * @return integer - */ - public function getFormat(); - - /** - * Sets the timing format. - * - * @param integer $format The timing format. - */ - public function setFormat($format); -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v1.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v1.php deleted file mode 100644 index 583545f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v1.php +++ /dev/null @@ -1,350 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ID3v1.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader.php"); -require_once("ID3/Exception.php"); -/**#@-*/ - -/** - * This class represents a file containing ID3v1 headers as described in - * {@link http://www.id3.org/id3v2-00 The ID3-Tag Specification Appendix}. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -final class ID3v1 -{ - /** @var string */ - private $_title; - - /** @var string */ - private $_artist; - - /** @var string */ - private $_album; - - /** @var string */ - private $_year; - - /** @var string */ - private $_comment; - - /** @var integer */ - private $_track; - - /** @var integer */ - private $_genre = 255; - - /** - * The genre list. - * - * @var Array - */ - public static $genres = array - ("Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", - "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", - "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", - "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", - "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", - "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", - "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", - "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", - "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", - "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", - "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", - "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", - "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", - "Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion", - "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", - "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", - "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", - "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", - "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", - "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", - "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", - "Dance Hall", 255 => "Unknown"); - - /** @var Reader */ - private $_reader; - - /** @var string */ - private $_filename = false; - - /** - * Constructs the ID3v1 class with given file. The file is not mandatory - * argument and may be omitted. A new tag can be written to a file also by - * giving the filename to the {@link #write} method of this class. - * - * @param string|Reader $filename The path to the file, file descriptor of an - * opened file, or {@link Reader} instance. - */ - public function __construct($filename = false) - { - if ($filename instanceof Reader) - $this->_reader = &$filename; - else if ((is_string($filename) && ($this->_filename = $filename) !== false && - file_exists($filename) !== false) || - (is_resource($filename) && - in_array(get_resource_type($filename), array("file", "stream")))) - $this->_reader = new Reader($filename); - else - return; - - if ($this->_reader->getSize() < 128) - throw new ID3_Exception("File does not contain ID3v1 tag"); - $this->_reader->setOffset(-128); - if ($this->_reader->read(3) != "TAG") { - $this->_reader = false; // reset reader, see write - throw new ID3_Exception("File does not contain ID3v1 tag"); - } - - $this->_title = rtrim($this->_reader->readString8(30), " \0"); - $this->_artist = rtrim($this->_reader->readString8(30), " \0"); - $this->_album = rtrim($this->_reader->readString8(30), " \0"); - $this->_year = $this->_reader->readString8(4); - $this->_comment = rtrim($this->_reader->readString8(28), " \0"); - - /* ID3v1.1 support for tracks */ - $v11_null = $this->_reader->read(1); - $v11_track = $this->_reader->read(1); - if (ord($v11_null) == 0 && ord($v11_track) != 0) - $this->_track = ord($v11_track); - else - $this->_comment = rtrim($this->_comment . $v11_null . $v11_track, " \0"); - - $this->_genre = $this->_reader->readInt8(); - } - - /** - * Returns the title field. - * - * @return string - */ - public function getTitle() { return $this->_title; } - - /** - * Sets a new value for the title field. The field cannot exceed 30 - * characters in length. - * - * @param string $title The title. - */ - public function setTitle($title) { $this->_title = $title; } - - /** - * Returns the artist field. - * - * @return string - */ - public function getArtist() { return $this->_artist; } - - /** - * Sets a new value for the artist field. The field cannot exceed 30 - * characters in length. - * - * @param string $artist The artist. - */ - public function setArtist($artist) { $this->_artist = $artist; } - - /** - * Returns the album field. - * - * @return string - */ - public function getAlbum() { return $this->_album; } - - /** - * Sets a new value for the album field. The field cannot exceed 30 - * characters in length. - * - * @param string $album The album. - */ - public function setAlbum($album) { $this->_album = $album; } - - /** - * Returns the year field. - * - * @return string - */ - public function getYear() { return $this->_year; } - - /** - * Sets a new value for the year field. The field cannot exceed 4 - * characters in length. - * - * @param string $year The year. - */ - public function setYear($year) { $this->_year = $year; } - - /** - * Returns the comment field. - * - * @return string - */ - public function getComment() { return $this->_comment; } - - /** - * Sets a new value for the comment field. The field cannot exceed 30 - * characters in length. - * - * @param string $comment The comment. - */ - public function setComment($comment) { $this->_comment = $comment; } - - /** - * Returns the track field. - * - * @since ID3v1.1 - * @return integer - */ - public function getTrack() { return $this->_track; } - - /** - * Sets a new value for the track field. By setting this field you enforce the - * 1.1 version to be used. - * - * @since ID3v1.1 - * @param integer $track The track number. - */ - public function setTrack($track) { $this->_track = $track; } - - /** - * Returns the genre. - * - * @return string - */ - public function getGenre() - { - if (isset(self::$genres[$this->_genre])) - return self::$genres[$this->_genre]; - else - return self::$genres[255]; // unknown - } - - /** - * Sets a new value for the genre field. The value may either be a numerical - * code representing one of the genres, or its string variant. - * - * The genre is set to unknown (code 255) in case the string is not found from - * the static {@link $genres} array of this class. - * - * @param integer $genre The genre. - */ - public function setGenre($genre) - { - if ((is_numeric($genre) && $genre >= 0 && $genre <= 255) || - ($genre = array_search($genre, self::$genres)) !== false) - $this->_genre = $genre; - else - $this->_genre = 255; // unknown - } - - /** - * Writes the possibly altered ID3v1 tag back to the file where it was read. - * If the class was constructed without a file name, one can be provided here - * as an argument. Regardless, the write operation will override previous - * tag information, if found. - * - * @param string $filename The optional path to the file. - */ - public function write($filename = false) - { - if ($filename === false && ($filename = $this->_filename) === false) - throw new ID3_Exception("No file given to write the tag to"); - - if (($fd = fopen - ($filename, file_exists($filename) ? "r+b" : "wb")) === false) - throw new ID3_Exception("Unable to open file for writing: " . $filename); - - fseek($fd, $this->_reader !== false ? -128 : 0, SEEK_END); - fwrite($fd, $this, 128); - - $this->_filename = $filename; - } - - /** - * Magic function so that $obj->value will work. - * - * @param string $name The field name. - * @return mixed - */ - public function __get($name) - { - if (method_exists($this, "get" . ucfirst(strtolower($name)))) - return call_user_func(array($this, "get" . ucfirst(strtolower($name)))); - else throw new ID3_Exception("Unknown field: " . $name); - } - - /** - * Magic function so that assignments with $obj->value will work. - * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed - */ - public function __set($name, $value) - { - if (method_exists($this, "set" . ucfirst(strtolower($name)))) - call_user_func - (array($this, "set" . ucfirst(strtolower($name))), $value); - else throw new ID3_Exception("Unknown field: " . $name); - } - - /** - * Returns the tag raw data. - * - * @return string - */ - private function __toString() - { - return "TAG" . - Transform::toString8(substr($this->_title, 0, 30), 30) . - Transform::toString8(substr($this->_artist, 0, 30), 30) . - Transform::toString8(substr($this->_album, 0, 30), 30) . - Transform::toString8(substr($this->_year, 0, 4), 4) . - ($this->_track ? - Transform::toString8(substr($this->_comment, 0, 28), 28) . - "\0" . Transform::toInt8($this->_track) : - Transform::toString8(substr($this->_comment, 0, 30), 30)) . - Transform::toInt8($this->_genre); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v2.php deleted file mode 100644 index 7aeceb8..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ID3v2.php +++ /dev/null @@ -1,489 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ID3 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ID3v2.php 107 2008-08-03 19:09:16Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader.php"); -require_once("ID3/Exception.php"); -require_once("ID3/Header.php"); -require_once("ID3/ExtendedHeader.php"); -require_once("ID3/Frame.php"); -/**#@-*/ - -/** - * This class represents a file containing ID3v2 headers as described in - * {@link http://www.id3.org/id3v2.4.0-structure ID3v2 structure document}. - * - * ID3v2 is a general tagging format for audio, which makes it possible to store - * meta data about the audio inside the audio file itself. The ID3 tag is mainly - * targeted at files encoded with MPEG-1/2 layer I, MPEG-1/2 layer II, MPEG-1/2 - * layer III and MPEG-2.5, but may work with other types of encoded audio or as - * a stand alone format for audio meta data. - * - * ID3v2 is designed to be as flexible and expandable as possible to meet new - * meta information needs that might arise. To achieve that ID3v2 is constructed - * as a container for several information blocks, called frames, whose format - * need not be known to the software that encounters them. Each frame has an - * unique and predefined identifier which allows software to skip unknown - * frames. - * - * @package php-reader - * @subpackage ID3 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 107 $ - */ -final class ID3v2 -{ - /** @var Reader */ - private $_reader; - - /** @var ID3_Header */ - private $_header; - - /** @var ID3_ExtendedHeader */ - private $_extendedHeader; - - /** @var ID3_Header */ - private $_footer; - - /** @var Array */ - private $_frames = array(); - - /** @var string */ - private $_filename = false; - - /** @var Array */ - private $_options; - - /** - * Constructs the ID3v2 class with given file and options. The options array - * may also be given as the only parameter. - * - * The following options are currently recognized: - * o version -- The ID3v2 tag version to use in write operation. This option - * is automatically set when a tag is read from a file and defaults to - * version 4.0 for tag write. - * o readonly -- Indicates that the tag is read from a temporary file or - * another source it cannot be written back to. The tag can, however, - * still be written to another file. - * - * @todo Only limited subset of flags are processed. - * @todo Utilize the SEEK frame and search for a footer to find the tag - * @todo Utilize the LINK frame to fetch frames from other sources - * @param string|Reader $filename The path to the file, file descriptor of an - * opened file, or {@link Reader} instance. - * @param Array $options The options array. - */ - public function __construct($filename = false, $options = array()) - { - if (is_array($filename)) { - $options = $filename; - $filename = false; - } - - $this->_options = &$options; - if ($filename === false || - (is_string($filename) && file_exists($filename) === false) || - (is_resource($filename) && - in_array(get_resource_type($filename), array("file", "stream")))) { - $this->_header = new ID3_Header(null, $options); - } else { - if (is_string($filename) && !isset($options["readonly"])) - $this->_filename = $filename; - if ($filename instanceof Reader) - $this->_reader = &$filename; - else - $this->_reader = new Reader($filename); - if ($this->_reader->readString8(3) != "ID3") - throw new ID3_Exception("File does not contain ID3v2 tag"); - - $startOffset = $this->_reader->getOffset(); - - $this->_header = new ID3_Header($this->_reader, $options); - if ($this->_header->getVersion() < 3 || $this->_header->getVersion() > 4) - throw new ID3_Exception - ("File does not contain ID3v2 tag of supported version"); - if ($this->_header->getVersion() < 4 && - $this->_header->hasFlag(ID3_Header::UNSYNCHRONISATION)) - throw new ID3_Exception - ("Unsynchronisation not supported for this version of ID3v2 tag"); - unset($this->_options["unsyncronisation"]); - if ($this->_header->hasFlag(ID3_Header::UNSYNCHRONISATION)) - $this->_options["unsyncronisation"] = true; - if ($this->_header->hasFlag(ID3_Header::EXTENDEDHEADER)) - $this->_extendedHeader = - new ID3_ExtendedHeader($this->_reader, $options); - if ($this->_header->hasFlag(ID3_Header::FOOTER)) - $this->_footer = &$this->_header; // skip footer, and rather copy header - - while (true) { - $offset = $this->_reader->getOffset(); - - // Jump off the loop if we reached the end of the tag - if ($offset - $startOffset - 10 >= $this->_header->getSize() - - ($this->hasFooter() ? 10 : 0)) - break; - - // Jump off the loop if we reached the last frame - if ($this->_reader->available() < 4 || Transform::fromUInt32BE - ($identifier = $this->_reader->read(4)) == 0) - break; - $this->_reader->setOffset($offset); - - if (@fopen($filename = "ID3/Frame/" . - strtoupper($identifier) . ".php", "r", true) !== false) - require_once($filename); - if (class_exists($classname = "ID3_Frame_" . $identifier)) - $frame = new $classname($this->_reader, $options); - else - $frame = new ID3_Frame($this->_reader, $options); - - if (!isset($this->_frames[$frame->getIdentifier()])) - $this->_frames[$frame->getIdentifier()] = array(); - $this->_frames[$frame->getIdentifier()][] = $frame; - } - } - } - - /** - * Returns the header object. - * - * @return ID3_Header - */ - public function getHeader() { return $this->_header; } - - /** - * Checks whether there is an extended header present in the tag. Returns - * <var>true</var> if the header is present, <var>false</var> otherwise. - * - * @return boolean - */ - public function hasExtendedHeader() - { - if ($this->_header) - return $this->_header->hasFlag(ID3_Header::EXTENDEDHEADER); - } - - /** - * Returns the extended header object if present, or <var>false</var> - * otherwise. - * - * @return ID3_ExtendedHeader|false - */ - public function getExtendedHeader() - { - if ($this->hasExtendedHeader()) - return $this->_extendedHeader; - return false; - } - - /** - * Sets the extended header object. - * - * @param ID3_ExtendedHeader $extendedHeader The header object - */ - public function setExtendedHeader($extendedHeader) - { - if (is_subclass_of($extendedHeader, "ID3_ExtendedHeader")) { - $this->_header->flags = - $this->_header->flags | ID3_Header::EXTENDEDHEADER; - $this->_extendedHeader->setOptions($this->_options); - $this->_extendedHeader = $extendedHeader; - } else throw new ID3_Exception("Invalid argument"); - } - - /** - * Checks whether there is a frame given as an argument defined in the tag. - * Returns <var>true</var> if one ore more frames are present, - * <var>false</var> otherwise. - * - * @return boolean - */ - public function hasFrame($identifier) - { - return isset($this->_frames[$identifier]); - } - - /** - * Returns all the frames the tag contains as an associate array. The frame - * identifiers work as keys having an array of frames as associated value. - * - * @return Array - */ - public function getFrames() { return $this->_frames; } - - /** - * Returns an array of frames matching the given identifier or an empty array - * if no frames matched the identifier. - * - * The identifier may contain wildcard characters "*" and "?". The asterisk - * matches against zero or more characters, and the question mark matches any - * single character. - * - * Please note that one may also use the shorthand $obj->identifier to access - * the first frame with the identifier given. Wildcards cannot be used with - * the shorthand. - * - * @return Array - */ - public function getFramesByIdentifier($identifier) - { - $matches = array(); - $searchPattern = "/^" . - str_replace(array("*", "?"), array(".*", "."), $identifier) . "$/i"; - foreach ($this->_frames as $identifier => $frames) - if (preg_match($searchPattern, $identifier)) - foreach ($frames as $frame) - $matches[] = $frame; - return $matches; - } - - /** - * Adds a new frame to the tag and returns it. - * - * @param ID3_Frame $frame The frame to add. - * @return ID3_Frame - */ - public function addFrame($frame) - { - $frame->setOptions($this->_options); - if (!$this->hasFrame($frame->getIdentifier())) - $this->_frames[$frame->getIdentifier()] = array(); - return $this->_frames[$frame->getIdentifier()][] = $frame; - } - - /** - * Checks whether there is a footer present in the tag. Returns - * <var>true</var> if the footer is present, <var>false</var> otherwise. - * - * @return boolean - */ - public function hasFooter() - { - return $this->_header->hasFlag(ID3_Header::FOOTER); - } - - /** - * Returns the footer object if present, or <var>false</var> otherwise. - * - * @return ID3_Header|false - */ - public function getFooter() - { - if ($this->hasFooter()) - return $this->_footer; - return false; - } - - /** - * Sets whether the tag should have a footer defined. - * - * @param boolean $useFooter Whether the tag should have a footer - */ - public function setFooter($useFooter) - { - if ($useFooter) { - $this->_header->setFlags - ($this->_header->getFlags() | ID3_Header::FOOTER); - $this->_footer = &$this->_header; - } else { - /* Count footer bytes towards the tag size, so it gets removed or - overridden upon re-write */ - if ($this->hasFooter()) - $this->_header->setSize($this->_header->getSize() + 10); - - $this->_header->setFlags - ($this->_header->getFlags() & ~ID3_Header::FOOTER); - $this->_footer = null; - } - } - - /** - * Writes the possibly altered ID3v2 tag back to the file where it was read. - * If the class was constructed without a file name, one can be provided here - * as an argument. Regardless, the write operation will override previous - * tag information, if found. - * - * If write is called without setting any frames to the tag, the tag is - * removed from the file. - * - * @param string $filename The optional path to the file. - */ - public function write($filename = false) - { - if ($filename === false && ($filename = $this->_filename) === false) - throw new ID3_Exception("No file given to write the tag to"); - else if ($filename !== false && $this->_filename !== false && - realpath($filename) != realpath($this->_filename) && - !copy($this->_filename, $filename)) - throw new ID3_Exception("Unable to copy source to destination: " . - realpath($this->_filename) . "->" . realpath($filename)); - - if (($fd = fopen - ($filename, file_exists($filename) ? "r+b" : "wb")) === false) - throw new ID3_Exception("Unable to open file for writing: " . $filename); - - $oldTagSize = $this->_header->getSize(); - $tag = "" . $this; - $tagSize = empty($this->_frames) ? 0 : strlen($tag); - - if ($this->_reader === null || - $tagSize - 10 > $oldTagSize || $tagSize == 0) { - fseek($fd, 0, SEEK_END); - $oldFileSize = ftell($fd); - ftruncate($fd, $newFileSize = $tagSize - $oldTagSize + $oldFileSize); - for ($i = 1, $cur = $oldFileSize; $cur > 0; $cur -= 1024, $i++) { - fseek($fd, -(($i * 1024) + ($newFileSize - $oldFileSize)), SEEK_END); - $buffer = fread($fd, 1024); - fseek($fd, -($i * 1024), SEEK_END); - fwrite($fd, $buffer, 1024); - } - } - fseek($fd, 0); - fwrite($fd, $tag, $tagSize); - fclose($fd); - - $this->_filename = $filename; - } - - /** - * Magic function so that $obj->value will work. The method will attempt to - * return the first frame that matches the identifier. - * - * If there is no frame or field with given name, the method will attempt to - * create a frame with given identifier. - * - * If none of these work, an exception is thrown. - * - * @param string $name The frame or field name. - * @return mixed - */ - public function __get($name) { - if (isset($this->_frames[strtoupper($name)])) - return $this->_frames[strtoupper($name)][0]; - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - if (@fopen($filename = - "ID3/Frame/" . strtoupper($name) . ".php", "r", true) !== false) - require_once($filename); - if (class_exists($classname = "ID3_Frame_" . strtoupper($name))) - return $this->addFrame(new $classname()); - throw new ID3_Exception("Unknown frame/field: " . $name); - } - - /** - * Magic function so that isset($obj->value) will work. This method checks - * whether the frame matching the identifier exists. - * - * @param string $name The frame identifier. - * @return boolean - */ - public function __isset($name) - { - return isset($this->_frames[strtoupper($name)]); - } - - /** - * Magic function so that unset($obj->value) will work. This method removes - * all the frames matching the identifier. - * - * @param string $name The frame identifier. - */ - public function __unset($name) { unset($this->_frames[strtoupper($name)]); } - - /** - * Returns the tag raw data. - * - * @return string - */ - public function __toString() - { - unset($this->_options["unsyncronisation"]); - - $data = ""; - foreach ($this->_frames as $frames) - foreach ($frames as $frame) - $data .= $frame; - - $datalen = strlen($data); - $padlen = 0; - - if (isset($this->_options["unsyncronisation"]) && - $this->_options["unsyncronisation"] === true) - $this->_header->setFlags - ($this->_header->getFlags() | ID3_Header::UNSYNCHRONISATION); - - /* The tag padding is calculated as follows. If the tag can be written in - the space of the previous tag, the remaining space is used for padding. - If there is no previous tag or the new tag is bigger than the space taken - by the previous tag, the padding is calculated using the following - logaritmic equation: log(0.2(x + 10)), ranging from some 300 bytes to - almost 5000 bytes given the tag length of 0..256M. */ - if ($this->hasFooter() === false) { - if ($this->_reader !== null && $datalen < $this->_header->getSize()) - $padlen = $this->_header->getSize() - $datalen; - else - $padlen = ceil(log(0.2 * ($datalen / 1024 + 10), 10) * 1024); - } - - /* ID3v2.4.0 CRC calculated w/ padding */ - if (!isset($this->_options["version"]) || $this->_options["version"] >= 4) - $data = str_pad($data, $datalen + $padlen, "\0"); - - if ($this->hasExtendedHeader()) { - $this->_extendedHeader->setPadding($padlen); - if ($this->_extendedHeader->hasFlag(ID3_ExtendedHeader::CRC32)) { - $crc = crc32($data); - if ($crc & 0x80000000) - $crc = -(($crc ^ 0xffffffff) + 1); - $this->_extendedHeader->setCrc($crc); - } - $data = $this->getExtendedHeader() . $data; - } - - /* ID3v2.3.0 CRC calculated w/o padding */ - if (isset($this->_options["version"]) && $this->_options["version"] < 4) - $data = str_pad($data, $datalen + $padlen, "\0"); - - $this->_header->setSize(strlen($data)); - - return "ID3" . $this->_header . $data . - ($this->hasFooter() ? "3DI" . $this->getFooter() : ""); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496.php deleted file mode 100644 index 81c7fa5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496.php +++ /dev/null @@ -1,380 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * <li>Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * <li>Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * <li>Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ISO14496.php 101 2008-05-13 20:28:13Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader.php"); -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * This class represents a file in ISO base media file format as described in - * ISO/IEC 14496 Part 12 standard. - * - * The ISO Base Media File Format is designed to contain timed media information - * for a presentation in a flexible, extensible format that facilitates - * interchange, management, editing, and presentation of the media. This - * presentation may be local to the system containing the presentation, or may - * be via a network or other stream delivery mechanism. - * - * The file structure is object-oriented; a file can be decomposed into - * constituent objects very simply, and the structure of the objects inferred - * directly from their type. The file format is designed to be independent of - * any particular network protocol while enabling efficient support for them in - * general. - * - * The ISO Base Media File Format is a base format for media file formats. - * - * - * An overall view of the normal encapsulation structure is provided in the - * following table. - * - * The table shows those boxes that may occur at the top-level in the left-most - * column; indentation is used to show possible containment. Thus, for example, - * a {@link ISO14496_Box_TKHD Track Header Box} is found in a - * {@link ISO14496_Box_TRAK Track Box}, which is found in a - * {@link ISO14496_Box_MOOV Movie Box}. Not all boxes need be used in all files; - * the mandatory boxes are marked with bold typeface. See the description of the - * individual boxes for a discussion of what must be assumed if the optional - * boxes are not present. - * - * User data objects shall be placed only in {@link ISO14496_Box_MOOV Movie} or - * {@link ISO14496_Box_TRAK Track Boxes}, and objects using an extended type may - * be placed in a wide variety of containers, not just the top level. - * - * <ul> - * <li><b>ftyp</b> -- <i>{@link ISO14496_Box_FTYP File Type Box}</i>; file type - * and compatibility - * <li>pdin -- <i>{@link ISO14496_Box_PDIN Progressive Download Information - * Box}</i> - * <li><b>moov</b> -- <i>{@link ISO14496_Box_MOOV Movie Box}</i>; container for - * all the metadata - * <ul> - * <li><b>mvhd</b> -- <i>{@link ISO14496_Box_MVHD Movie Header Box}</i>; - * overall declarations - * <li><b>trak</b> -- <i>{@link ISO14496_Box_TRAK Track Box}</i>; container - * for an individual track or stream - * <ul> - * <li><b>tkhd</b> -- <i>{@link ISO14496_Box_TKHD Track Header Box}</i>; - * overall information about the track - * <li>tref -- <i>{@link ISO14496_Box_TREF Track Reference Box}</i> - * <li>edts -- <i>{@link ISO14496_Box_EDTS Edit Box}</i> - * <ul> - * <li>elst -- <i>{@link ISO14496_Box_ELST Edit List Box}</i> - * </ul> - * <li><b>mdia</b> -- <i>{@link ISO14496_Box_MDIA Media Box}</i> - * <ul> - * <li><b>mdhd</b> -- <i>{@link ISO14496_Box_MDHD Media Header Box}</i>; - * overall information about the media - * <li><b>hdlr</b> -- <i>{@link ISO14496_Box_HDLR Handler Reference - * Box}</i>; declares the media type - * <li><b>minf</b> -- <i>{@link ISO14496_Box_MINF Media Information - * Box}</i> - * <ul> - * <li>vmhd -- <i>{@link ISO14496_Box_VMHD Video Media Header Box}</i>; - * overall information (video track only) - * <li>smhd -- <i>{@link ISO14496_Box_SMHD Sound Media Header Box}</i>; - * overall information (sound track only) - * <li>hmhd -- <i>{@link ISO14496_Box_HMHD Hint Media Header Box}</i>; - * overall information (hint track only) - * <li>nmhd -- <i>{@link ISO14496_Box_NMHD Null Media Header Box}</i>; - * overall information (some tracks only) - * <li><b>dinf</b> -- <i>{@link ISO14496_Box_DINF Data Information - * Box}</i> - * <ul> - * <li><b>dref</b> -- <i>{@link ISO14496_Box_DREF Data Reference - * Box}</i> - * </ul> - * <li><b>stbl</b> -- <i>{@link ISO14496_Box_STBL Sample Table Box}</i> - * <ul> - * <li><b>stsd</b> -- <i>{@link ISO14496_Box_STSD Sample Descriptions - * Box}</i> - * <li><b>stts</b> -- <i>{@link ISO14496_Box_STTS Decoding Time To - * Sample Box}</i> - * <li>ctts -- <i>{@link ISO14496_Box_CTTS Composition Time To Sample - * Box}</i> - * <li><b>stsc</b> -- <i>{@link ISO14496_Box_STSC Sample To Chunk - * Box}</i> - * <li>stsz -- <i>{@link ISO14496_Box_STSZ Sample Size Box}</i> - * <li>stz2 -- <i>{@link ISO14496_Box_STZ2 Compact Sample Size - * Box}</i> - * <li><b>stco</b> -- <i>{@link ISO14496_Box_STCO Chunk Offset - * Box}</i>; 32-bit - * <li>co64 -- <i>{@link ISO14496_Box_CO64 Chunk Ooffset Box}</i>; - * 64-bit - * <li>stss -- <i>{@link ISO14496_Box_STSS Sync Sample Table Box}</i> - * <li>stsh -- <i>{@link ISO14496_Box_STSH Shadow Sync Sample Table - * Box}</i> - * <li>padb -- <i>{@link ISO14496_Box_PADB Padding Bits Box}</i> - * <li>stdp -- <i>{@link ISO14496_Box_STDP Sample Degradation Priority - * Box}</i> - * <li>sdtp -- <i>{@link ISO14496_Box_SDTP Independent and Disposable - * Samples Box}</i> - * <li>sbgp -- <i>{@link ISO14496_Box_SBGP Sample To Group Box}</i> - * <li>sgpd -- <i>{@link ISO14496_Box_SGPD Sample Group - * Description}</i> - * <li>subs -- <i>{@link ISO14496_Box_SUBS Sub-Sample Information - * Box}</i> - * </ul> - * </ul> - * </ul> - * </ul> - * <li>mvex -- <i>{@link ISO14496_Box_MVEX Movie Extends Box}</i> - * <ul> - * <li>mehd -- <i>{@link ISO14496_Box_MEHD Movie Extends Header Box}</i> - * <li><b>trex</b> -- <i>{@link ISO14496_Box_TREX Track Extends Box}</i> - * </ul> - * <li>ipmc -- <i>{@link ISO14496_Box_IPMC IPMP Control Box}</i> - * </ul> - * <li>moof -- <i>{@link ISO14496_Box_MOOF Movie Fragment Box}</i> - * <ul> - * <li><b>mfhd</b> -- <i>{@link ISO14496_Box_MFHD Movie Fragment Header - * Box}</i> - * <li>traf -- <i>{@link ISO14496_Box_TRAF Track Fragment Box}</i> - * <ul> - * <li><b>tfhd</b> -- <i>{@link ISO14496_Box_TFHD Track Fragment Header - * Box}</i> - * <li>trun -- <i>{@link ISO14496_Box_TRUN Track Fragment Run}</i> - * <li>sdtp -- <i>{@link ISO14496_Box_SDTP Independent and Disposable - * Samples}</i> - * <li>sbgp -- <i>{@link ISO14496_Box_SBGP !SampleToGroup Box}</i> - * <li>subs -- <i>{@link ISO14496_Box_SUBS Sub-Sample Information Box}</i> - * </ul> - * </ul> - * <li>mfra -- <i>{@link ISO14496_Box_MFRA Movie Fragment Random Access Box}</i> - * <ul> - * <li>tfra -- <i>{@link ISO14496_Box_TFRA Track Fragment Random Access - * Box}</i> - * <li><b>mfro</b> -- <i>{@link ISO14496_Box_MFRO Movie Fragment Random Access - * Offset Box}</i> - * </ul> - * <li>mdat -- <i>{@link ISO14496_Box_MDAT Media Data Box}</i> - * <li>free -- <i>{@link ISO14496_Box_FREE Free Space Box}</i> - * <li>skip -- <i>{@link ISO14496_Box_SKIP Free Space Box}</i> - * <ul> - * <li>udta -- <i>{@link ISO14496_Box_UDTA User Data Box}</i> - * <ul> - * <li>cprt -- <i>{@link ISO14496_Box_CPRT Copyright Box}</i> - * </ul> - * </ul> - * <li>meta -- <i>{@link ISO14496_Box_META The Meta Box}</i> - * <ul> - * <li><b>hdlr</b> -- <i>{@link ISO14496_Box_HDLR Handler Reference Box}</i>; - * declares the metadata type - * <li>dinf -- <i>{@link ISO14496_Box_DINF Data Information Box}</i> - * <ul> - * <li>dref -- <i>{@link ISO14496_Box_DREF Data Reference Box}</i>; declares - * source(s) of metadata items - * </ul> - * <li>ipmc -- <i>{@link ISO14496_Box_IPMC IPMP Control Box}</i> - * <li>iloc -- <i>{@link ISO14496_Box_ILOC Item Location Box}</i> - * <li>ipro -- <i>{@link ISO14496_Box_IPRO Item Protection Box}</i> - * <ul> - * <li>sinf -- <i>{@link ISO14496_Box_SINF Protection Scheme Information - * Box}</i> - * <ul> - * <li>frma -- <i>{@link ISO14496_Box_FRMA Original Format Box}</i> - * <li>imif -- <i>{@link ISO14496_Box_IMIF IPMP Information Box}</i> - * <li>schm -- <i>{@link ISO14496_Box_SCHM Scheme Type Box}</i> - * <li>schi -- <i>{@link ISO14496_Box_SCHI Scheme Information Box}</i> - * </ul> - * </ul> - * <li>iinf -- <i>{@link ISO14496_Box_IINF Item Information Box}</i> - * <ul> - * <li>infe -- <i>{@link ISO14496_Box_INFE Item Information Entry Box}</i> - * </ul> - * <li>xml -- <i>{@link ISO14496_Box_XML XML Box}</i> - * <li>bxml -- <i>{@link ISO14496_Box_BXML Binary XML Box}</i> - * <li>pitm -- <i>{@link ISO14496_Box_PITM Primary Item Reference Box}</i> - * </ul> - * </ul> - * - * There are two non-standard extensions to the ISO 14496 standard that add the - * ability to include file meta information. Both the boxes reside under - * moov.udta.meta. - * - * <ul> - * <li><i>moov</i> -- <i>{@link ISO14496_Box_MOOV Movie Box}</i>; container for - * all the metadata - * <li><i>udta</i> -- <i>{@link ISO14496_Box_UDTA User Data Box}</i> - * <li><i>meta</i> -- <i>{@link ISO14496_Box_META The Meta Box}</i> - * <ul> - * <li>ilst -- <i>{@link ISO14496_Box_ILST The iTunes/iPod Tag Container - * Box}</i> - * <li>id32 -- <i>{@link ISO14496_Box_ID32 The ID3v2 Box}</i> - * </ul> - * </ul> - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 101 $ - */ -class ISO14496 extends ISO14496_Box -{ - /** @var string */ - private $_filename; - - /** - * Constructs the ISO14496 class with given file and options. - * - * The following options are currently recognized: - * o base -- Indicates that only boxes with the given base path are parsed - * from the ISO base media file. Parsing all boxes can possibly have a - * significant impact on running time. Base path is a list of nested boxes - * separated by a dot. - * o readonly -- Indicates that the file is read from a temporary location - * or another source it cannot be written back to. The use of base option - * implies readonly option. - * - * @param string $filename The path to the file or file descriptor of an - * opened file. - * @param Array $options The options array. - */ - public function __construct($filename, $options = array()) - { - $this->_reader = new Reader($this->_filename = $filename); - if (isset($options["base"])) - $options["readonly"] = true; - $this->setOptions($options); - $this->setOffset(0); - $this->setSize($this->_reader->getSize()); - $this->setType("file"); - $this->setContainer(true); - $this->constructBoxes(); - } - - /** - * Writes the changes back to the original media file. - * - * Please note: currently the method writes only ID32 and ILST boxes to - * <i>moov.udta.meta</i>. Changes to any other box are discarded. Write - * operation will overwrite <i>moov.udta</i>, if found. - */ - public function write() - { - if (!isset($this->moov->udta->meta->ilst) && - !isset($this->moov->udta->meta->id32)) - throw new ISO14496_Exception("Nothing to write"); - - if ($this->getOption("readonly", false) !== false) - throw new ISO14496_Exception("File is read only"); - - if (($fd = fopen($this->_filename, file_exists - ($this->_filename) ? "r+b" : "wb")) === false) - throw new ISO14496_Exception - ("Unable to open file for writing: " . $filename); - - $this->moov->udta->meta->hdlr->setHandlerType("mdir"); - - /* Calculate start position */ - $mark = ($this->moov->udta->getOffset() > 0 ? - $this->moov->udta->getOffset() : - $this->moov->getOffset() + $this->moov->getSize()); - - /* Calculate file size */ - fseek($fd, 0, SEEK_END); - $oldFileSize = ftell($fd); - $newFileSize = $oldFileSize - - ($this->moov->udta->getOffset() > 0 ? $this->moov->udta->getSize() : 0) - - (isset($this->moov->udta->meta->free) ? - $this->moov->udta->meta->free->getSize() : 0) + - strlen($this->moov->udta); - - /* Calculate free space size */ - if ($oldFileSize < $newFileSize) { - // Add free space to the file calculated using the following logaritmic - // equation: log(0.2(x + 10)), ranging from 1k to 9k given the file size - // of 0..4G - $this->moov->udta->meta->free->setSize - (ceil(log(0.2 * ($newFileSize / 1024 + 10), 10) * 1024)); - ftruncate($fd, $newFileSize += $this->moov->udta->meta->free->getSize()); - - // Move data to the end of the file - for ($i = 1, $cur = $oldFileSize; $cur > $mark; $cur -= 1024, $i++) { - fseek($fd, -(($i * 1024) + - ($excess = $cur - 1024 > $mark ? 0 : $cur - $mark - 1024) + - ($newFileSize - $oldFileSize)), SEEK_END); - $buffer = fread($fd, 1024); - fseek($fd, -(($i * 1024) + $excess), SEEK_END); - fwrite($fd, $buffer, 1024); - } - - // Update stco/co64 to correspond the data move - foreach ($this->moov->getBoxesByIdentifier("trak") as $trak) { - $chunkOffsetBox = - (isset($trak->mdia->minf->stbl->stco) ? - $trak->mdia->minf->stbl->stco : $trak->mdia->minf->stbl->co64); - $chunkOffsetTable = $chunkOffsetBox->getChunkOffsetTable(); - $chunkOffsetTableCount = count($chunkOffsetTable); - $chunkOffsetDelta = $newFileSize - $oldFileSize; - for ($i = 1; $i <= $chunkOffsetTableCount; $i++) - $chunkOffsetTable[$i] += $chunkOffsetDelta; - $chunkOffsetBox->setChunkOffsetTable($chunkOffsetTable); - fseek($fd, $chunkOffsetBox->getOffset()); - fwrite($fd, $chunkOffsetBox, $chunkOffsetBox->getSize()); - } - } - else - $this->moov->udta->meta->free->setSize($oldFileSize - $newFileSize); - - /* Update the target box */ - fseek($fd, $mark); - $this->moov->udta->setSize(fwrite($fd, $this->moov->udta)); - - /* Update the parent box */ - fseek($fd, $this->moov->getOffset()); - fwrite($fd, Transform::toUInt32BE($this->moov->getSize())); - - fclose($fd); - } - - /** - * Returns the raw data of the ISO14496 file. - * - * @return string - */ - public function __toString($data = "") - { - if ($this->isContainer()) - foreach ($this->getBoxes() as $name => $boxes) - foreach ($boxes as $box) - $data .= $box; - return $data; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box.php deleted file mode 100644 index d1f4823..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box.php +++ /dev/null @@ -1,451 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Box.php 102 2008-06-23 20:41:20Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Exception.php"); -/**#@-*/ - -/** - * A base class for all ISO 14496-12 boxes. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 102 $ - */ -class ISO14496_Box -{ - /** - * The reader object. - * - * @var Reader - */ - protected $_reader; - - /** @var Array */ - private $_options; - - /** @var integer */ - private $_offset = -1; - - /** @var integer */ - private $_size = -1; - - /** @var string */ - private $_type; - - - /** @var ISO14496_Box */ - private $_parent = null; - - - /** @var boolean */ - private $_container = false; - - /** @var Array */ - private $_boxes = array(); - - /** @var Array */ - private static $_path = array(); - - /** - * Constructs the class with given parameters and options. - * - * @param Reader $reader The reader object. - * @param Array $options The options array. - */ - public function __construct($reader, &$options = array()) - { - if (($this->_reader = $reader) === null) { - $this->_type = strtolower(substr(get_class($this), -4)); - } else { - $this->_offset = $this->_reader->getOffset(); - $this->_size = $this->_reader->readUInt32BE(); - $this->_type = $this->_reader->read(4); - - if ($this->_size == 1) - $this->_size = $this->_reader->readInt64BE(); - if ($this->_size == 0) - $this->_size = $this->_reader->getSize() - $this->_offset; - - if ($this->_type == "uuid") - $this->_type = $this->_reader->readGUID(); - } - $this->_options = $options; - } - - /** - * Returns the options array. - * - * @return Array - */ - public function getOptions() { return $this->_options; } - - /** - * Returns the given option value, or the default value if the option is not - * defined. - * - * @param string $option The name of the option. - * @param mixed $defaultValue The default value to be returned. - */ - public function getOption($option, $defaultValue = false) - { - if (isset($this->_options[$option])) - return $this->_options[$option]; - return $defaultValue; - } - - /** - * Sets the options array. See {@link ISO14496} class for available options. - * - * @param Array $options The options array. - */ - public function setOptions(&$options) { $this->_options = $options; } - - /** - * Sets the given option the given value. - * - * @param string $option The name of the option. - * @param mixed $value The value to set for the option. - */ - public function setOption($option, $value) - { - $this->_options[$option] = $value; - } - - /** - * Returns the file offset to box start, or -1 if the box was created on heap. - * - * @return integer - */ - public function getOffset() { return $this->_offset; } - - /** - * Sets the file offset where the box starts. - * - * @param integer $offset The file offset to box start. - */ - public function setOffset($offset) { $this->_offset = $offset; } - - /** - * Returns the box size in bytes, including the size and type header, - * fields, and all contained boxes, or -1 if the box was created on heap. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Sets the box size. The size must include the size and type header, - * fields, and all contained boxes. - * - * The method will propagate size change to box parents. - * - * @param integer $size The box size. - */ - public function setSize($size) - { - if ($this->_parent !== null) - $this->_parent->setSize - (($this->_parent->getSize() > 0 ? $this->_parent->getSize() : 0) + - $size - ($this->_size > 0 ? $this->_size : 0)); - $this->_size = $size; - } - - /** - * Returns the box type. - * - * @return string - */ - public function getType() { return $this->_type; } - - /** - * Sets the box type. - * - * @param string $type The box type. - */ - public function setType($type) { $this->_type = $type; } - - /** - * Returns the parent box containing this box. - * - * @return ISO14496_Box - */ - public function getParent() { return $this->_parent; } - - /** - * Sets the parent containing box. - * - * @param ISO14496_Box $parent The parent box. - */ - public function setParent(&$parent) { $this->_parent = $parent; } - - /** - * Returns a boolean value corresponding to whether the box is a container. - * - * @return boolean - */ - public function isContainer() { return $this->_container; } - - /** - * Returns a boolean value corresponding to whether the box is a container. - * - * @return boolean - */ - public function getContainer() { return $this->_container; } - - /** - * Sets whether the box is a container. - * - * @param boolean $container Whether the box is a container. - */ - protected function setContainer($container) - { - $this->_container = $container; - } - - /** - * Reads and constructs the boxes found within this box. - * - * @todo Does not parse iTunes internal ---- boxes. - */ - protected function constructBoxes($defaultclassname = "ISO14496_Box") - { - $base = $this->getOption("base", ""); - if ($this->getType() != "file") - self::$_path[] = $this->getType(); - $path = implode(self::$_path, "."); - - while (true) { - $offset = $this->_reader->getOffset(); - if ($offset >= $this->_offset + $this->_size) - break; - $size = $this->_reader->readUInt32BE(); - $type = rtrim($this->_reader->read(4), " "); - if ($size == 1) - $size = $this->_reader->readInt64BE(); - if ($size == 0) - $size = $this->_reader->getSize() - $offset; - - if (preg_match("/^\xa9?[a-z0-9]{3,4}$/i", $type) && - substr($base, 0, min(strlen($base), strlen - ($tmp = $path . ($path ? "." : "") . $type))) == - substr($tmp, 0, min(strlen($base), strlen($tmp)))) - { - $this->_reader->setOffset($offset); - if (@fopen($filename = "ISO14496/Box/" . strtoupper($type) . ".php", - "r", true) !== false) - require_once($filename); - if (class_exists($classname = "ISO14496_Box_" . strtoupper($type))) - $box = new $classname($this->_reader, $this->_options); - else - $box = new $defaultclassname($this->_reader, $this->_options); - $box->setParent($this); - if (!isset($this->_boxes[$box->getType()])) - $this->_boxes[$box->getType()] = array(); - $this->_boxes[$box->getType()][] = $box; - } - $this->_reader->setOffset($offset + $size); - } - - array_pop(self::$_path); - } - - /** - * Checks whether the box given as an argument is present in the file. Returns - * <var>true</var> if one or more boxes are present, <var>false</var> - * otherwise. - * - * @return boolean - * @throws ISO14496_Exception if called on a non-container box - */ - public function hasBox($identifier) - { - if (!$this->isContainer()) - throw new ISO14496_Exception("Box not a container"); - return isset($this->_boxes[$identifier]); - } - - /** - * Returns all the boxes the file contains as an associate array. The box - * identifiers work as keys having an array of boxes as associated value. - * - * @return Array - * @throws ISO14496_Exception if called on a non-container box - */ - public function getBoxes() - { - if (!$this->isContainer()) - throw new ISO14496_Exception("Box not a container"); - return $this->_boxes; - } - - /** - * Returns an array of boxes matching the given identifier or an empty array - * if no boxes matched the identifier. - * - * The identifier may contain wildcard characters "*" and "?". The asterisk - * matches against zero or more characters, and the question mark matches any - * single character. - * - * Please note that one may also use the shorthand $obj->identifier to access - * the first box with the identifier given. Wildcards cannot be used with - * the shorthand and they will not work with user defined uuid types. - * - * @return Array - * @throws ISO14496_Exception if called on a non-container box - */ - public function getBoxesByIdentifier($identifier) - { - if (!$this->isContainer()) - throw new ISO14496_Exception("Box not a container"); - $matches = array(); - $searchPattern = "/^" . - str_replace(array("*", "?"), array(".*", "."), $identifier) . "$/i"; - foreach ($this->_boxes as $identifier => $boxes) - if (preg_match($searchPattern, $identifier)) - foreach ($boxes as $box) - $matches[] = $box; - return $matches; - } - - /** - * Adds a new box into the current box and returns it. - * - * @param ISO14496_Box The box to add - * @return ISO14496_Box - */ - public function addBox($box) - { - $box->setParent($this); - $box->setOptions($this->_options); - if (!$this->hasBox($box->getType())) - $this->_boxes[$box->getType()] = array(); - return $this->_boxes[$box->getType()][] = $box; - } - - /** - * Magic function so that $obj->value will work. If called on a container box, - * the method will first attempt to return the first contained box that - * matches the identifier, and if not found, invoke a getter method. - * - * If there are no boxes or getter methods with given name, the method - * attempts to create a frame with given identifier. - * - * If none of these work, an exception is thrown. - * - * @param string $name The box or field name. - * @return mixed - */ - public function __get($name) - { - if ($this->isContainer() && isset($this->_boxes[$name])) - return $this->_boxes[$name][0]; - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - if (@fopen($filename = "ISO14496/Box/" . - strtoupper($name) . ".php", "r", true) !== false) - require_once($filename); - if (class_exists($classname = "ISO14496_Box_" . strtoupper($name))) - return $this->addBox(new $classname()); - throw new ISO14496_Exception("Unknown box/field: " . $name); - } - - /** - * Magic function so that assignments with $obj->value will work. - * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed - */ - public function __set($name, $value) - { - if (method_exists($this, "set" . ucfirst($name))) - call_user_func(array($this, "set" . ucfirst($name)), $value); - else throw new ISO14496_Exception("Unknown field: " . $name); - } - - /** - * Magic function so that isset($obj->value) will work. This method checks - * whether the box is a container and contains a box that matches the - * identifier. - * - * @param string $name The box name. - * @return boolean - */ - public function __isset($name) - { - return ($this->isContainer() && isset($this->_boxes[$name])); - } - - /** - * Magic function so that unset($obj->value) will work. This method removes - * all the boxes from this container that match the identifier. - * - * @param string $name The box name. - */ - public function __unset($name) - { - if ($this->isContainer()) - unset($this->_boxes[$name]); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - if ($this->isContainer()) - foreach ($this->getBoxes() as $name => $boxes) - foreach ($boxes as $box) - $data .= $box; - $size = strlen($data) + 8; - if ($size > 0xffffffff) - $size += 8; - if (strlen($this->_type) > 4) - $size += 16; - return ($size > 0xffffffff ? - Transform::toUInt32BE(1) : Transform::toUInt32BE($size)) . - (strlen($this->_type) > 4 ? "uuid" : $this->_type) . - ($size > 0xffffffff ? Transform::toInt64BE($size) : "") . - (strlen($this->_type) > 4 ? Transform::toGUID($this->_type) : "") . $data; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/BXML.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/BXML.php deleted file mode 100644 index d7533dd..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/BXML.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: BXML.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * When the primary data is in XML format and it is desired that the XML be - * stored directly in the meta-box, one of the <i>XML Box</i> forms may be used. - * The Binary XML Box may only be used when there is a single well-defined - * binarization of the XML for that defined format as identified by the handler. - * - * Within an XML box the data is in UTF-8 format unless the data starts with a - * byte-order-mark (BOM), which indicates that the data is in UTF-16 format. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_BXML extends ISO14496_Box_Full -{ - /** @var string */ - private $_data; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - } - - /** - * Returns the binary data. - * - * @return string - */ - public function getData() - { - return $this->_data; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CDSC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CDSC.php deleted file mode 100644 index fe7d627..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CDSC.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: CDSC.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * This box provides a reference from the containing track to another track in - * the presentation. This track describes the referenced track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_CDSC extends ISO14496_Box -{ - /** @var Array */ - private $_trackId = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - while ($this->_reader->getOffset <= $this->getSize()) - $this->_trackId[] = $this->_reader->readUInt32BE(); - } - - /** - * Returns an array of integer references from the containing track to another - * track in the presentation. Track IDs are never re-used and cannot be equal - * to zero. - * - * @return integer - */ - public function getTrackId() { return $this->_trackId; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CO64.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CO64.php deleted file mode 100644 index b6a2f11..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CO64.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: CO64.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Chunk Offset Box</i> table gives the index of each chunk into the - * containing file. There are two variants, permitting the use of 32-bit or - * 64-bit offsets. The latter is useful when managing very large presentations. - * At most one of these variants will occur in any single instance of a sample - * table. - * - * Offsets are file offsets, not the offset into any box within the file (e.g. - * {@link ISO14496_Box_MDAT Media Data Box}). This permits referring to media - * data in files without any box structure. It does also mean that care must be - * taken when constructing a self-contained ISO file with its metadata - * ({@link ISO14496_Box_MOOV Movie Box}) at the front, as the size of the - * {@link ISO14496_Box_MOOV Movie Box} will affect the chunk offsets to the - * media data. - * - * This box variant contains 64-bit offsets. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_CO64 extends ISO14496_Box_Full -{ - /** @var Array */ - private $_chunkOffsetTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_chunkOffsetTable[$i] = - Transform::fromInt64BE(substr($data, ($i - 1) * 8, 8)); - } - - /** - * Returns an array of values. Each entry has the entry number as its index - * and a 64 bit integer that gives the offset of the start of a chunk into - * its containing media file as its value. - * - * @return Array - */ - public function getChunkOffsetTable() { return $this->_chunkOffsetTable; } - - /** - * Sets an array of chunk offsets. Each entry must have the entry number as - * its index and a 64 bit integer that gives the offset of the start of a - * chunk into its containing media file as its value. - * - * @param Array $chunkOffsetTable The chunk offset array. - */ - public function setChunkOffsetTable($chunkOffsetTable) - { - $this->_chunkOffsetTable = $chunkOffsetTable; - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - $data = Transform::toUInt32BE(count($this->_chunkOffsetTable)); - foreach ($this->_chunkOffsetTable as $chunkOffset) - $data .= Transform::toInt64BE($chunkOffset); - return parent::__toString($data); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CPRT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CPRT.php deleted file mode 100644 index 2fc10ed..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CPRT.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: CPRT.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Copyright Box</i> contains a copyright declaration which applies to - * the entire presentation, when contained within the {@link ISO14496_Box_MOOV - * Movie Box}, or, when contained in a track, to that entire track. There may be - * multiple copyright boxes using different language codes. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_CPRT extends ISO14496_Box_Full -{ - /** @var string */ - private $_language; - - /** @var string */ - private $_notice; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - * @todo Distinguish UTF-16? - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_language = - chr(((($tmp = $this->_reader->readUInt16BE()) >> 10) & 0x1f) + 0x60) . - chr((($tmp >> 5) & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60); - $this->_notice = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - } - - /** - * Returns the three byte language code to describe the language of the - * notice, according to {@link http://www.loc.gov/standards/iso639-2/ - * ISO 639-2/T}. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Returns the copyright notice. - * - * @return string - */ - public function getNotice() { return $this->_notice; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CTTS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CTTS.php deleted file mode 100644 index c3d3dba..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/CTTS.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: CTTS.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Composition Time to Sample Box</i> provides the offset between - * decoding time and composition time. Since decoding time must be less than the - * composition time, the offsets are expressed as unsigned numbers such that - * CT(n) = DT(n) + CTTS(n) where CTTS(n) is the (uncompressed) table entry for - * sample n. - * - * The composition time to sample table is optional and must only be present if - * DT and CT differ for any samples. Hint tracks do not use this box. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_CTTS extends ISO14496_Box_Full -{ - /** @var Array */ - private $_compositionOffsetTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_compositionOffsetTable[$i] = array - ("sampleCount" => - Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)), - "sampleOffset" => - Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4))); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o sampleCount -- an integer that counts the number of consecutive samples - * that have the given offset. - * o sampleOffset -- a non-negative integer that gives the offset between CT - * and DT, such that CT(n) = DT(n) + CTTS(n). - * - * @return Array - */ - public function getCompositionOffsetTable() - { - return $this->_compositionOffsetTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DINF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DINF.php deleted file mode 100644 index 362f6b7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DINF.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: DINF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Data Information Box</i> contains objects that declare the location - * of the media information in a track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_DINF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DREF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DREF.php deleted file mode 100644 index 1f56355..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/DREF.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: DREF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Data Reference Box</i> contains a table of data references (normally - * URLs) that declare the location(s) of the media data used within the - * presentation. The data reference index in the sample description ties entries - * in this table to the samples in the track. A track may be split over several - * sources in this way. - * - * This box may either contain {@link ISO14496_Box_URN urn} or - * {@link ISO14496_Box_URL url} boxes. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_DREF extends ISO14496_Box_Full -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->_reader->skip(4); - $this->constructBoxes(); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString(Transform::toUInt32BE(count($this->_boxes))); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/EDTS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/EDTS.php deleted file mode 100644 index fa9207b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/EDTS.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: EDTS.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Edit Box</i> maps the presentation time-line to the media time-line as - * it is stored in the file. The Edit Box is a container for the edit lists. - * - * The Edit Box is optional. In the absence of this box, there is an implicit - * one-to-one mapping of these time-lines, and the presentation of a track - * starts at the beginning of the presentation. An empty edit is used to offset - * the start time of a track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_EDTS extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ELST.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ELST.php deleted file mode 100644 index 56ae8da..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ELST.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ELST.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Edit List Box</i> contains an explicit timeline map. Each entry - * defines part of the track time-line: by mapping part of the media time-line, - * or by indicating empty time, or by defining a dwell, where a single - * time-point in the media is held for a period. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_ELST extends ISO14496_Box_Full -{ - /** @var Array */ - private $_entries = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - for ($i = 1; $i <= $entryCount; $i++) { - $entry = array(); - if ($this->getVersion() == 1) { - $entry["segmentDuration"] = $this->_reader->readInt64BE(); - $entry["mediaTime"] = $this->_reader->readInt64BE(); - } else { - $entry["segmentDuration"] = $this->_reader->readUInt32BE(); - $entry["mediaTime"] = $this->_reader->readInt32BE(); - } - $entry["mediaRate"] = $this->_reader->readInt16BE() + - $this->_reader->readInt16BE() / 10; - $this->_entries[] = $entry; - } - } - - /** - * Returns an array of entries. Each entry is an array containing the - * following keys. - * o segmentDuration: specifies the duration of this edit segment in units - * of the timescale in the {@link ISO14496_Box_MVHD Movie Header Box}. - * o mediaTime: the starting time within the media of this edit segment (in - * media time scale units, in composition time). If this field is set to - * –1, it is an empty edit. The last edit in a track shall never be an - * empty edit. Any difference between the duration in the - * {@link ISO14496_Box_MVHD Movie Header Box}, and the track's duration is - * expressed as an implicit empty edit at the end. - * o mediaRate: the relative rate at which to play the media corresponding - * to this edit segment. If this value is 0, then the edit is specifying - * a dwell: the media at media-time is presented for the segment-duration. - * Otherwise this field shall contain the value 1. - * - * @return Array - */ - public function getEntries() - { - return $this->_entries; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FREE.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FREE.php deleted file mode 100644 index 449935a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FREE.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: FREE.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The contents of a <i>Free Space Box</i> are irrelevant and may be ignored, or - * the object deleted, without affecting the presentation. (Care should be - * exercised when deleting the object, as this may invalidate the offsets used - * in the sample table, unless this object is after all the media data). - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_FREE extends ISO14496_Box -{ - /** - * Constructs the class with given parameters. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString(str_repeat("\0", $this->getSize() - 8)); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FRMA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FRMA.php deleted file mode 100644 index 909cfdb..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FRMA.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: FRMA.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Original Format Box</i> contains the four-character-code of the - * original un-transformed sample description. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_FRMA extends ISO14496_Box -{ - /** @var string */ - private $_dataFormat; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_dataFormat = $this->_reader->read(4); - } - - /** - * Returns the four-character-code of the original un-transformed sample entry - * (e.g. <i>mp4v</i> if the stream contains protected MPEG-4 visual material). - * - * @return string - */ - public function getDataFormat() { return $this->_dataFormat; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FTYP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FTYP.php deleted file mode 100644 index f060091..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/FTYP.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: FTYP.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>File Type Box</i> is placed as early as possible in the file (e.g. - * after any obligatory signature, but before any significant variable-size - * boxes such as a {@link ISO14496_Box_MOOV Movie Box}, {@link ISO14496_Box_MDAT - * Media Data Box}, or {@link ISO14496_Box_FREE Free Space}). It identifies - * which specification is the <i>best use</i> of the file, and a minor version - * of that specification; and also a set of others specifications to which the - * file complies. - * - * The minor version is informative only. It does not appear for - * compatible-brands, and must not be used to determine the conformance of a - * file to a standard. It may allow more precise identification of the major - * specification, for inspection, debugging, or improved decoding. - * - * The type <i>isom</i> (ISO Base Media file) is defined as identifying files - * that conform to the first version of the ISO Base Media File Format. More - * specific identifiers can be used to identify precise versions of - * specifications providing more detail. This brand is not be used as the major - * brand; this base file format should be derived into another specification to - * be used. There is therefore no defined normal file extension, or mime type - * assigned to this brand, nor definition of the minor version when <i>isom</i> - * is the major brand. - * - * Files would normally be externally identified (e.g. with a file extension or - * mime type) that identifies the <i>best use</i> (major brand), or the brand - * that the author believes will provide the greatest compatibility. - * - * The brand <i>iso2</i> shall be used to indicate compatibility with the - * amended version of the ISO Base Media File Format; it may be used in addition - * to or instead of the <i>isom</i> brand and the same usage rules apply. If - * used without the brand <i>isom</i> identifying the first version of the - * specification, it indicates that support for some or all of the technology - * introduced by the amended version of the ISO Base Media File Format is - * required. - * - * The brand <i>avc1</i> shall be used to indicate that the file is conformant - * with the <i>AVC Extensions</i>. If used without other brands, this implies - * that support for those extensions is required. The use of <i>avc1</i> as a - * major-brand may be permitted by specifications; in that case, that - * specification defines the file extension and required behavior. - * - * If a Meta-box with an MPEG-7 handler type is used at the file level, then the - * brand <i>mp71</i> is a member of the compatible-brands list in the file-type - * box. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_FTYP extends ISO14496_Box -{ - /** @var integer */ - private $_majorBrand; - - /** @var integer */ - private $_minorVersion; - - /** @var integer */ - private $_compatibleBrands = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_majorBrand = $this->_reader->readString8(4); - $this->_minorVersion = $this->_reader->readUInt32BE(); - while ($this->_reader->getOffset() < $this->getSize()) - if (($brand = $this->_reader->readString8(4)) != "") - $this->_compatibleBrands[] = $brand; - } - - /** - * Returns the major version brand. - * - * @return string - */ - public function getMajorBrand() { return $this->_majorBrand; } - - /** - * Returns the minor version number. - * - * @return integer - */ - public function getMinorVersion() { return $this->_minorVersion; } - - /** - * Returns the array of compatible version brands. - * - * @return Array - */ - public function getCompatibleBrands() { return $this->_compatibleBrands; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/Full.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/Full.php deleted file mode 100644 index d22e0d3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/Full.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Full.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * A base class for objects that also contain a version number and flags field. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -abstract class ISO14496_Box_Full extends ISO14496_Box -{ - /** @var integer */ - protected $_version = 0; - - /** @var integer */ - protected $_flags = 0; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_version = (($field = $this->_reader->readUInt32BE()) >> 24) & 0xff; - $this->_flags = $field & 0xffffff; - } - - /** - * Returns the version of this format of the box. - * - * @return integer - */ - public function getVersion() { return $this->_version; } - - /** - * Sets the version of this format of the box. - * - * @param integer $version The version. - */ - public function setVersion($version) { $this->_version = $version; } - - /** - * Checks whether or not the flag is set. Returns <var>true</var> if the flag - * is set, <var>false</var> otherwise. - * - * @param integer $flag The flag to query. - * @return boolean - */ - public function hasFlag($flag) { return ($this->_flags & $flag) == $flag; } - - /** - * Returns the map of flags. - * - * @return integer - */ - public function getFlags() { return $this->_flags; } - - /** - * Sets the map of flags. - * - * @param string $flags The map of flags. - */ - public function setFlags($flags) { $this->_flags = $flags; } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString - (Transform::toUInt32BE($this->_version << 24 | $this->_flags) . $data); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HDLR.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HDLR.php deleted file mode 100644 index 6de86c1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HDLR.php +++ /dev/null @@ -1,150 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: HDLR.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Handler Reference Box</i> is within a {@link ISO14496_Box_MDIA Media - * Box} declares the process by which the media-data in the track is presented, - * and thus, the nature of the media in a track. For example, a video track - * would be handled by a video handler. - * - * This box when present within a {@link ISO14496_Box_META Meta Box}, declares - * the structure or format of the <i>meta</i> box contents. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_HDLR extends ISO14496_Box_Full -{ - /** @var string */ - private $_handlerType; - - /** @var string */ - private $_name; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_reader->skip(4); - $this->_handlerType = $this->_reader->read(4); - $this->_reader->skip(12); - $this->_name = $this->_reader->readString8 - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - } - - /** - * Returns the handler type. - * - * When present in a media box, the returned value contains one of the - * following values, or a value from a derived specification: - * o <i>vide</i> Video track - * o <i>soun</i> Audio track - * o <i>hint</i> Hint track - * - * When present in a meta box, the returned value contains an appropriate - * value to indicate the format of the meta box contents. - * - * @return integer - */ - public function getHandlerType() { return $this->_handlerType; } - - /** - * Sets the handler type. - * - * When present in a media box, the value must be set to one of the following - * values, or a value from a derived specification: - * o <i>vide</i> Video track - * o <i>soun</i> Audio track - * o <i>hint</i> Hint track - * - * When present in a meta box, the value must be set to an appropriate value - * to indicate the format of the meta box contents. - * - * @param string $handlerType The handler type. - */ - public function setHandlerType($handlerType) - { - $this->_handlerType = $handlerType; - } - - /** - * Returns the name string. The name is in UTF-8 characters and gives a - * human-readable name for the track type (for debugging and inspection - * purposes). - * - * @return integer - */ - public function getName() { return $this->_name; } - - /** - * Sets the name string. The name must be in UTF-8 and give a human-readable - * name for the track type (for debugging and inspection purposes). - * - * @param string $name The human-readable description. - */ - public function setName($name) { $this->_name = $name; } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString - ("appl" . $this->_handlerType . Transform::toUInt32BE(0) . - Transform::toUInt32BE(0) . Transform::toUInt32BE(0) . $this->_name . - "\0"); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HINT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HINT.php deleted file mode 100644 index 02d73af..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HINT.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: HINT.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * This box provides a reference from the containing track to another track in - * the presentation. The referenced track(s) contain the original media for this - * hint track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_HINT extends ISO14496_Box -{ - /** @var Array */ - private $_trackId = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - while ($this->_reader->getOffset <= $this->getSize()) - $this->_trackId[] = $this->_reader->readUInt32BE(); - } - - /** - * Returns an array of integer references from the containing track to another - * track in the presentation. Track IDs are never re-used and cannot be equal - * to zero. - * - * @return integer - */ - public function getTrackId() { return $this->_trackId; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HMHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HMHD.php deleted file mode 100644 index c269099..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/HMHD.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: HMHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Hint Media Header Box</i> header contains general information, - * independent of the protocol, for hint tracks. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_HMHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_maxPDUSize; - - /** @var integer */ - private $_avgPDUSize; - - /** @var integer */ - private $_maxBitrate; - - /** @var integer */ - private $_avgBitrate; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_maxPDUSize = $this->_reader->readUInt16BE(); - $this->_avgPDUSize = $this->_reader->readUInt16BE(); - $this->_maxBitrate = $this->_reader->readUInt32BE(); - $this->_avgBitrate = $this->_reader->readUInt32BE(); - } - - /** - * Returns the size in bytes of the largest PDU in this (hint) stream. - * - * @return integer - */ - public function getMaxPDUSize() { return $this->_maxPDUSize; } - - /** - * Returns the average size of a PDU over the entire presentation. - * - * @return integer - */ - public function getAvgPDUSize() { return $this->_avgPDUSize; } - - /** - * Returns the maximum rate in bits/second over any window of one second. - * - * @return integer - */ - public function getMaxBitrate() { return $this->_maxbitrate; } - - /** - * Returns the average rate in bits/second over the entire presentation. - * - * @return integer - */ - public function getAvgBitrate() { return $this->_maxbitrate; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ID32.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ID32.php deleted file mode 100644 index 334289a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ID32.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ID32.php 93 2008-05-10 17:11:44Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>ID3v2 Box</i> resides under the {@link ISO14496_Box_META Meta Box} and - * stores ID3 version 2 meta-data. There may be more than one ID3v2 Box present - * each with a different language code. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 93 $ - */ -final class ISO14496_Box_ID32 extends ISO14496_Box_Full -{ - /** @var string */ - private $_language = "und"; - - /** @var ID3v2 */ - private $_tag; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_language = - chr(((($tmp = $this->_reader->readUInt16BE()) >> 10) & 0x1f) + 0x60) . - chr((($tmp >> 5) & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60); - $this->_tag = new ID3v2($this->_reader, array("readonly" => true)); - } - - /** - * Returns the three byte language code to describe the language of this - * media, according to {@link http://www.loc.gov/standards/iso639-2/ - * ISO 639-2/T}. - * - * @return string - */ - public function getLanguage() { return $this->_language; } - - /** - * Sets the three byte language code as specified in the - * {@link http://www.loc.gov/standards/iso639-2/ ISO 639-2} standard. - * - * @param string $language The language code. - */ - public function setLanguage($language) { $this->_language = $language; } - - /** - * Returns the {@link ID3v2} tag class instance. - * - * @return string - */ - public function getTag() { return $this->_tag; } - - /** - * Sets the {@link ID3v2} tag class instance using given language. - * - * @param ID3v2 $tag The tag instance. - * @param string $language The language code. - */ - public function setTag($tag, $language = false) - { - $this->_tag = $tag; - if ($language !== false) - $this->_language = $language; - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString - (Transform::toUInt16BE - (((ord($this->_language[0]) - 0x60) << 10) | - ((ord($this->_language[1]) - 0x60) << 5) | - ord($this->_language[2]) - 0x60) . $this->_tag); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IINF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IINF.php deleted file mode 100644 index 008e99d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IINF.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IINF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Item Information Box</i> provides extra information about selected - * items, including symbolic (<i>file</i>) names. It may optionally occur, but - * if it does, it must be interpreted, as item protection or content encoding - * may have changed the format of the data in the item. If both content encoding - * and protection are indicated for an item, a reader should first un-protect - * the item, and then decode the item's content encoding. If more control is - * needed, an IPMP sequence code may be used. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_IINF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->_reader->skip(2); - $this->constructBoxes(); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString(Transform::toUInt16BE(count($this->_boxes))); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILOC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILOC.php deleted file mode 100644 index 9244fda..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILOC.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ILOC.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>The Item Location Box</i> provides a directory of resources in this or - * other files, by locating their containing file, their offset within that - * file, and their length. Placing this in binary format enables common handling - * of this data, even by systems which do not understand the particular metadata - * system (handler) used. For example, a system might integrate all the - * externally referenced metadata resources into one file, re-adjusting file - * offsets and file references accordingly. - * - * Items may be stored fragmented into extents, e.g. to enable interleaving. An - * extent is a contiguous subset of the bytes of the resource; the resource is - * formed by concatenating the extents. If only one extent is used then either - * or both of the offset and length may be implied: - * - * o If the offset is not identified (the field has a length of zero), then - * the beginning of the file (offset 0) is implied. - * o If the length is not specified, or specified as zero, then the entire - * file length is implied. References into the same file as this metadata, - * or items divided into more than one extent, should have an explicit - * offset and length, or use a MIME type requiring a different - * interpretation of the file, to avoid infinite recursion. - * - * The size of the item is the sum of the extentLengths. Note: extents may be - * interleaved with the chunks defined by the sample tables of tracks. - * - * The dataReferenceIndex may take the value 0, indicating a reference into the - * same file as this metadata, or an index into the dataReference table. - * - * Some referenced data may itself use offset/length techniques to address - * resources within it (e.g. an MP4 file might be included in this way). - * Normally such offsets are relative to the beginning of the containing file. - * The field base offset provides an additional offset for offset calculations - * within that contained data. For example, if an MP4 file is included within a - * file formatted to this specification, then normally data-offsets within that - * MP4 section are relative to the beginning of file; baseOffset adds to those - * offsets. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_ILOC extends ISO14496_Box -{ - /** @var Array */ - private $_items = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $offsetSize = (($tmp = $this->_reader->readUInt32BE()) >> 28) & 0xf; - $lengthSize = ($tmp >> 24) & 0xf; - $baseOffsetSize = ($tmp >> 20) & 0xf; - $itemCount = $this->_reader->readUInt16BE(); - for ($i = 0; $i < $itemCount; $i++) { - $item = array(); - $item["itemId"] = $this->_reader->readUInt16BE(); - $item["dataReferenceIndex"] = $this->_reader->readUInt16BE(); - $item["baseOffset"] = - ($baseOffsetSize == 4 ? $this->_reader->readUInt32BE() : - ($baseOffsetSize == 8 ? $this->_reader->readInt64BE() : 0)); - $item["extents"] = array(); - for ($j = 0; $j < $extentCount; $j++) { - $extent = array(); - $extent["offset"] = - ($offsetSize == 4 ? $this->_reader->readUInt32BE() : - ($offsetSize == 8 ? $this->_reader->readInt64BE() : 0)); - $extent["length"] = - ($lengthSize == 4 ? $this->_reader->readUInt32BE() : - ($lengthSize == 8 ? $this->_reader->readInt64BE() : 0)); - $item["extents"][] = $extent; - } - $this->_items[] = $item; - } - } - - /** - * Returns the array of items. Each entry has the following keys set: itemId, - * dataReferenceIndex, baseOffset, and extents. - * - * @return Array - */ - public function getItems() { return $this->_items; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILST.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILST.php deleted file mode 100644 index 9b4a209..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/ILST.php +++ /dev/null @@ -1,280 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: ILST.php 101 2008-05-13 20:28:13Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * A container box for all the iTunes/iPod specific boxes. A list of well known - * boxes is provided in the following table. The value for each box is contained - * in a nested {@link ISO14496_Box_DATA Data Box}. - * - * <ul> - * <li><b>_nam</b> -- <i>Name of the track</i></li> - * <li><b>_ART</b> -- <i>Name of the artist</i></li> - * <li><b>aART</b> -- <i>Name of the album artist</i></li> - * <li><b>_alb</b> -- <i>Name of the album</i></li> - * <li><b>_grp</b> -- <i>Grouping</i></li> - * <li><b>_day</b> -- <i>Year of publication</i></li> - * <li><b>trkn</b> -- <i>Track number (number/total)</i></li> - * <li><b>disk</b> -- <i>Disk number (number/total)</i></li> - * <li><b>tmpo</b> -- <i>BPM tempo</i></li> - * <li><b>_wrt</b> -- <i>Name of the composer</i></li> - * <li><b>_cmt</b> -- <i>Comments</i></li> - * <li><b>_gen</b> -- <i>Genre as string</i></li> - * <li><b>gnre</b> -- <i>Genre as an ID3v1 code, added by one</i></li> - * <li><b>cpil</b> -- <i>Part of a compilation (0/1)</i></li> - * <li><b>tvsh</b> -- <i>Name of the (television) show</i></li> - * <li><b>sonm</b> -- <i>Sort name of the track</i></li> - * <li><b>soar</b> -- <i>Sort name of the artist</i></li> - * <li><b>soaa</b> -- <i>Sort name of the album artist</i></li> - * <li><b>soal</b> -- <i>Sort name of the album</i></li> - * <li><b>soco</b> -- <i>Sort name of the composer</i></li> - * <li><b>sosn</b> -- <i>Sort name of the show</i></li> - * <li><b>_lyr</b> -- <i>Lyrics</i></li> - * <li><b>covr</b> -- <i>Cover (or other) artwork binary data</i></li> - * <li><b>_too</b> -- <i>Information about the software</i></li> - * </ul> - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 101 $ - * @since iTunes/iPod specific - */ -final class ISO14496_Box_ILST extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes("ISO14496_Box_ILST_Container"); - } - - /** - * Override magic function so that $obj->value on a box will return the data - * box instead of the data container box. - * - * @param string $name The box or field name. - * @return mixed - */ - public function __get($name) - { - if (strlen($name) == 3) - $name = "\xa9" . $name; - if ($name[0] == "_") - $name = "\xa9" . substr($name, 1, 3); - if ($this->hasBox($name)) { - $boxes = $this->getBoxesByIdentifier($name); - return $boxes[0]->data; - } - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - return $this->addBox(new ISO14496_Box_ILST_Container($name))->data; - } -} - -/** - * Generic iTunes/iPod DATA Box container. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 101 $ - * @since iTunes/iPod specific - * @ignore - */ -final class ISO14496_Box_ILST_Container extends ISO14496_Box -{ - public function __construct($reader = null, &$options = array()) - { - parent::__construct(is_string($reader) ? null : $reader, $options); - $this->setContainer(true); - - if (is_string($reader)) { - $this->setType($reader); - $this->addBox(new ISO14496_Box_DATA()); - } else - $this->constructBoxes(); - } -} - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * A box that contains data for iTunes/iPod specific boxes. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 101 $ - * @since iTunes/iPod specific - */ -final class ISO14496_Box_DATA extends ISO14496_Box_Full -{ - /** @var mixed */ - private $_value; - - /** A flag to indicate that the data is an unsigned 8-bit integer. */ - const INTEGER = 0x0; - - /** - * A flag to indicate that the data is an unsigned 8-bit integer. Different - * value used in old versions of iTunes. - */ - const INTEGER_OLD_STYLE = 0x15; - - /** A flag to indicate that the data is a string. */ - const STRING = 0x1; - - /** A flag to indicate that the data is the contents of an JPEG image. */ - const JPEG = 0xd; - - /** A flag to indicate that the data is the contents of a PNG image. */ - const PNG = 0xe; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - - if ($reader === null) - return; - - $this->_reader->skip(4); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - switch ($this->getFlags()) { - case self::INTEGER: - case self::INTEGER_OLD_STYLE: - for ($i = 0; $i < strlen($data); $i++) - $this->_value .= Transform::fromInt8($data[$i]); - break; - case self::STRING: - default: - $this->_value = $data; - } - } - - /** - * Returns the value this box contains. - * - * @return mixed - */ - public function getValue() { return $this->_value; } - - /** - * Sets the value this box contains. - * - * @return mixed - */ - public function setValue($value, $type = false) - { - $this->_value = (string)$value; - if ($type === false && is_string($value)) - $this->_flags = self::STRING; - if ($type === false && is_int($value)) - $this->_flags = self::INTEGER; - if ($type !== false) - $this->_flags = $type; - } - - /** - * Override magic function so that $obj->data will return the current box - * instead of an error. For other values the method will attempt to call a - * getter method. - * - * If there are no getter methods with given name, the method will yield an - * exception. - * - * @param string $name The box or field name. - * @return mixed - */ - public function __get($name) - { - if ($name == "data") - return $this; - if (method_exists($this, "get" . ucfirst($name))) - return call_user_func(array($this, "get" . ucfirst($name))); - throw new ISO14496_Exception("Unknown box/field: " . $name); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - switch ($this->getFlags()) { - case self::INTEGER: - case self::INTEGER_OLD_STYLE: - $data = ""; - for ($i = 0; $i < strlen($this->_value); $i++) - $data .= Transform::toInt8($this->_value[$i]); - break; - case self::STRING: - default: - $data = $this->_value; - } - return parent::__toString("\0\0\0\0" . $data); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IMIF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IMIF.php deleted file mode 100644 index c4e389a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IMIF.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IMIF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>IPMP Information Box</i> contains IPMP Descriptors which document the - * protection applied to the stream. - * - * IPMP_Descriptor is defined in 14496-1. This is a part of the MPEG-4 object - * descriptors (OD) that describe how an object can be accessed and decoded. - * Here, in the ISO Base Media File Format, IPMP Descriptor can be carried - * directly in IPMP Information Box without the need for OD stream. - * - * The presence of IPMP Descriptor in this box indicates the associated media - * stream is protected by the IPMP Tool described in the IPMP Descriptor. - * - * Each IPMP_Descriptor has an IPMP_ToolID, which identifies the required IPMP - * tool for protection. An independent registration authority (RA) is used so - * any party can register its own IPMP Tool and identify this without - * collisions. - * - * The IPMP_Descriptor carries IPMP information for one or more IPMP Tool - * instances, it includes but not limited to IPMP Rights Data, IPMP Key Data, - * Tool Configuration Data, etc. - * - * More than one IPMP Descriptors can be carried in this box if this media - * stream is protected by more than one IPMP Tools. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_IMIF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/INFE.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/INFE.php deleted file mode 100644 index 6b7f113..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/INFE.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: INFE.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Item Information Entry Box</i> contains the entry information. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_INFE extends ISO14496_Box_Full -{ - /** @var integer */ - private $_itemId; - - /** @var integer */ - private $_itemProtectionIndex; - - /** @var string */ - private $_itemName; - - /** @var string */ - private $_contentType; - - /** @var string */ - private $_contentEncoding; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_itemId = $this->_reader->readUInt16BE(); - $this->_itemProtectionIndex = $this->_reader->readUInt16BE(); - list($this->_itemName, $this->_contentType, $this->_contentEncoding) = - preg_split - ("/\\x00/", $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset())); - } - - /** - * Returns the item identifier. The value is either 0 for the primary resource - * (e.g. the XML contained in an {@link ISO14496_Box_XML XML Box}) or the ID - * of the item for which the following information is defined. - * - * @return integer - */ - public function getItemId() { return $this->_itemId; } - - /** - * Returns the item protection index. The value is either 0 for an unprotected - * item, or the one-based index into the {@link ISO14496_Box_IPRO Item - * Protection Box} defining the protection applied to this item (the first box - * in the item protection box has the index 1). - * - * @return integer - */ - public function getItemProtectionIndex() - { - return $this->_itemProtectionIndex; - } - - /** - * Returns the symbolic name of the item. - * - * @return string - */ - public function getItemName() { return $this->_itemName; } - - /** - * Returns the MIME type for the item. - * - * @return string - */ - public function getContentType() { return $this->_contentType; } - - /** - * Returns the optional content encoding type as defined for Content-Encoding - * for HTTP /1.1. Some possible values are <i>gzip</i>, <i>compress</i> and - * <i>deflate</i>. An empty string indicates no content encoding. - * - * @return string - */ - public function getContentEncoding() { return $this->_contentEncoding; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPMC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPMC.php deleted file mode 100644 index cce9469..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPMC.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IPMC.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>IPMP Control Box</i> may contain IPMP descriptors which may be - * referenced by any stream in the file. - * - * @todo Data parsing - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -final class ISO14496_Box_IPMC extends ISO14496_Box_Full -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPRO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPRO.php deleted file mode 100644 index edee325..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/IPRO.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: IPRO.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Item Protection Box</i> provides an array of item protection - * information, for use by the {@link ISO14496_Box_IINF Item Information Box}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_IPRO extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->_reader->skip(2); - $this->constructBoxes(); - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - return parent::__toString(Transform::toUInt16BE(count($this->_boxes))); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDAT.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDAT.php deleted file mode 100644 index 439d3cc..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDAT.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MDAT.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Media Data Box</i> contains the media data. In video tracks, this box - * would contain video frames. There may be any number of these boxes in the - * file (including zero, if all the media data is in other files). - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MDAT extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDHD.php deleted file mode 100644 index c52cca3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDHD.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MDHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Media Header Box</i> declares overall information that is - * media-independent, and relevant to characteristics of the media in a track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MDHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_creationTime; - - /** @var integer */ - private $_modificationTime; - - /** @var integer */ - private $_timescale; - - /** @var integer */ - private $_duration; - - /** @var string */ - private $_language; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - if ($this->getVersion() == 1) { - $this->_creationTime = $this->_reader->readInt64BE(); - $this->_modificationTime = $this->_reader->readInt64BE(); - $this->_timescale = $this->_reader->readUInt32BE(); - $this->_duration = $this->_reader->readInt64BE(); - } else { - $this->_creationTime = $this->_reader->readUInt32BE(); - $this->_modificationTime = $this->_reader->readUInt32BE(); - $this->_timescale = $this->_reader->readUInt32BE(); - $this->_duration = $this->_reader->readUInt32BE(); - } - $this->_language = - chr(((($tmp = $this->_reader->readUInt16BE()) >> 10) & 0x1f) + 0x60) . - chr((($tmp >> 5) & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60); - } - - /** - * Returns the creation time of the media in this track, in seconds since - * midnight, Jan. 1, 1904, in UTC time. - * - * @return integer - */ - public function getCreationTime() { return $this->_creationTime; } - - /** - * Returns the most recent time the media in this track was modified in - * seconds since midnight, Jan. 1, 1904, in UTC time. - * - * @return integer - */ - public function getModificationTime() { return $this->_modificationTime; } - - /** - * Returns the time-scale for this media. This is the number of time units - * that pass in one second. For example, a time coordinate system that - * measures time in sixtieths of a second has a time scale of 60. - * - * @return integer - */ - public function getTimescale() { return $this->_timescale; } - - /** - * Returns the duration of this media (in the scale of the timescale). - * - * @return integer - */ - public function getDuration() { return $this->_duration; } - - /** - * Returns the three byte language code to describe the language of this - * media, according to {@link http://www.loc.gov/standards/iso639-2/ - * ISO 639-2/T}. - * - * @return string - */ - public function getLanguage() { return $this->_language; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDIA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDIA.php deleted file mode 100644 index 4949c4f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MDIA.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MDIA.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Media Box</i> contains all the objects that declare information about - * the media data within a track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MDIA extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MEHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MEHD.php deleted file mode 100644 index 2967a1b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MEHD.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MEHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Movie Extends Header Box</i> is optional, and provides the overall - * duration, including fragments, of a fragmented movie. If this box is not - * present, the overall duration must be computed by examining each fragment. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MEHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_fragmentDuration; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - if ($this->getVersion() == 1) - $this->_fragmentDuration = $this->_reader->readInt64BE(); - else - $this->_fragmentDuration = $this->_reader->readUInt32BE(); - } - - /** - * Returns the length of the presentation of the whole movie including - * fragments (in the timescale indicated in the {@link ISO14496_Box_MVHD - * Movie Header Box}). The value of this field corresponds to the duration of - * the longest track, including movie fragments. - * - * @return integer - */ - public function getFragmentDuration() { return $this->_fragmentDuration; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/META.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/META.php deleted file mode 100644 index a7d13a7..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/META.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: META.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Meta Box</i> contains descriptive or annotative metadata. The - * <i>meta</i> box is required to contain a {@link ISO14496_Box_HDLR hdlr} box - * indicating the structure or format of the <i>meta</i> box contents. That - * metadata is located either within a box within this box (e.g. an XML box), or - * is located by the item identified by a primary item box. - * - * All other contained boxes are specific to the format specified by the handler - * box. - * - * The other boxes defined here may be defined as optional or mandatory for a - * given format. If they are used, then they must take the form specified here. - * These optional boxes include a data-information box, which documents other - * files in which metadata values (e.g. pictures) are placed, and a item - * location box, which documents where in those files each item is located (e.g. - * in the common case of multiple pictures stored in the same file). At most one - * meta box may occur at each of the file level, movie level, or track level. - * - * If an {@link ISO14496_Box_IPRO Item Protection Box} occurs, then some or all - * of the meta-data, including possibly the primary resource, may have been - * protected and be un-readable unless the protection system is taken into - * account. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_META extends ISO14496_Box_Full -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFHD.php deleted file mode 100644 index d282ed5..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFHD.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MFHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Movie Fragment Header Box</i> contains a sequence number, as a safety - * check. The sequence number usually starts at 1 and must increase for each - * movie fragment in the file, in the order in which they occur. This allows - * readers to verify integrity of the sequence; it is an error to construct a - * file where the fragments are out of sequence. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MFHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_sequenceNumber; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_sequenceNumber = $this->_reader->readUInt32BE(); - } - - /** - * Returns the ordinal number of this fragment, in increasing order. - * - * @return integer - */ - public function getSequenceNumber() { return $this->_sequenceNumber; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRA.php deleted file mode 100644 index c29f76f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRA.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MFRA.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Movie Fragment Random Access Box</i> provides a table which may assist - * readers in finding random access points in a file using movie fragments. It - * contains a track fragment random access box for each track for which - * information is provided (which may not be all tracks). It is usually placed - * at or near the end of the file; the last box within the Movie Fragment Random - * Access Box provides a copy of the length field from the Movie Fragment Random - * Access Box. Readers may attempt to find this box by examining the last 32 - * bits of the file, or scanning backwards from the end of the file for a Movie - * Fragment Random Access Offset Box and using the size information in it, to - * see if that locates the beginning of a Movie Fragment Random Access Box. - * - * This box provides only a hint as to where random access points are; the movie - * fragments themselves are definitive. It is recommended that readers take care - * in both locating and using this box as modifications to the file after it was - * created may render either the pointers, or the declaration of random access - * points, incorrect. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MFRA extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRO.php deleted file mode 100644 index 24bd696..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MFRO.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MFRO.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Movie Fragment Random Access Offset Box</i> provides a copy of the - * length field from the enclosing {@link ISO14496_Box_MFRA Movie Fragment - * Random Access Box}. It is placed last within that box, so that the size field - * is also last in the enclosing Movie Fragment Random Access Box. When the - * Movie Fragment Random Access Box is also last in the file this permits its - * easy location. The size field here must be correct. However, neither the - * presence of the Movie Fragment Random Access Box, nor its placement last in - * the file, are assured. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MFRO extends ISO14496_Box_Full -{ - /** @var integer */ - private $_parentSize; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_parentSize = $this->_reader->readUInt32BE(); - } - - /** - * Returns the number of bytes of the enclosing {@link ISO14496_Box_MFRA} box. - * This field is placed at the last of the enclosing box to assist readers - * scanning from the end of the file in finding the <i>mfra</i> box. - * - * @return integer - */ - public function getParentSize() { return $this->_parentSize; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MINF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MINF.php deleted file mode 100644 index 9865605..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MINF.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MINF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Media Information Box</i> contains all the objects that declare - * characteristic information of the media in the track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MINF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOF.php deleted file mode 100644 index e4b9f55..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOF.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MOOF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Movie Fragment Box</i> extend the presentation in time. They provide - * the information that would previously have been in the - * {@link ISO14496_Box_MOOV Movie Box}. The actual samples are in - * {@link ISO14496_Box_MDAT Media Data Boxes}, as usual, if they are in the same - * file. The data reference index is in the sample description, so it is - * possible to build incremental presentations where the media data is in files - * other than the file containing the Movie Box. - * - * The Movie Fragment Box is a top-level box, (i.e. a peer to the Movie Box and - * Media Data boxes). It contains a {@link ISO14496_Box_MFHD Movie Fragment - * Header Box}, and then one or more {@link ISO14496_Box_TRAF Track Fragment - * Boxes}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MOOF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOV.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOV.php deleted file mode 100644 index cd139e0..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MOOV.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MOOV.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The metadata for a presentation is stored in the single <i>Movie Box</i> - * which occurs at the top-level of a file. Normally this box is close to the - * beginning or end of the file, though this is not required. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MOOV extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVEX.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVEX.php deleted file mode 100644 index 78f8b3d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVEX.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MVEX.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Movie Extends Box</i> warns readers that there might be - * {@link ISO14496_Box_MFRA Movie Fragment Boxes} in this file. To know of all - * samples in the tracks, these Movie Fragment Boxes must be found and scanned - * in order, and their information logically added to that found in the - * {@link ISO14496_Box_MOOV Movie Box}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MVEX extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVHD.php deleted file mode 100644 index 5436c34..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/MVHD.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: MVHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Movie Header Box</i> defines overall information which is - * media-independent, and relevant to the entire presentation considered as a - * whole. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_MVHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_creationTime; - - /** @var integer */ - private $_modificationTime; - - /** @var integer */ - private $_timescale; - - /** @var integer */ - private $_duration; - - /** @var integer */ - private $_rate; - - /** @var integer */ - private $_volume; - - /** @var integer */ - private $_nextTrackId; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - if ($this->getVersion() == 1) { - $this->_creationTime = $this->_reader->readInt64BE(); - $this->_modificationTime = $this->_reader->readInt64BE(); - $this->_timescale = $this->_reader->readUInt32BE(); - $this->_duration = $this->_reader->readInt64BE(); - } else { - $this->_creationTime = $this->_reader->readUInt32BE(); - $this->_modificationTime = $this->_reader->readUInt32BE(); - $this->_timescale = $this->_reader->readUInt32BE(); - $this->_duration = $this->_reader->readUInt32BE(); - } - $this->_rate = - ((($tmp = $this->_reader->readUInt32BE()) >> 16) & 0xffff) + - ($tmp & 0xffff) / 10; - $this->_volume = ((($tmp = $this->_reader->readUInt16BE()) >> 8) & 0xff) + - ($tmp & 0xff) / 10; - $this->_reader->skip(70); - $this->_nextTrackId = $this->_reader->readUInt32BE(); - } - - /** - * Returns the creation time of the presentation. The value is in seconds - * since midnight, Jan. 1, 1904, in UTC time. - * - * @return integer - */ - public function getCreationTime() { return $this->_creationTime; } - - /** - * Returns the most recent time the presentation was modified. The value is in - * seconds since midnight, Jan. 1, 1904, in UTC time. - * - * @return integer - */ - public function getModificationTime() { return $this->_modificationTime; } - - /** - * Returns the time-scale for the entire presentation. This is the number of - * time units that pass in one second. For example, a time coordinate system - * that measures time in sixtieths of a second has a time scale of 60. - * - * @return integer - */ - public function getTimescale() { return $this->_timescale; } - - /** - * Returns the length of the presentation in the indicated timescale. This - * property is derived from the presentation's tracks: the value of this field - * corresponds to the duration of the longest track in the presentation. - * - * @return integer - */ - public function getDuration() { return $this->_duration; } - - /** - * Returns the preferred rate to play the presentation. 1.0 is normal forward - * playback. - * - * @return integer - */ - public function getRate() { return $this->_rate; } - - /** - * Returns the preferred playback volume. 1.0 is full volume. - * - * @return integer - */ - public function getVolume() { return $this->_volume; } - - /** - * Returns a value to use for the track ID of the next track to be added to - * this presentation. Zero is not a valid track ID value. The value is larger - * than the largest track-ID in use. If this value is equal to or larger than - * 32-bit maxint, and a new media track is to be added, then a search must be - * made in the file for a unused track identifier. - * - * @return integer - */ - public function getNextTrackId() { return $this->_nextTrackId; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/NMHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/NMHD.php deleted file mode 100644 index e57831a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/NMHD.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: NMHD.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * Streams other than visual and audio may use a <i>Null Media Header Box</i>, - * as defined here. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -final class ISO14496_Box_NMHD extends ISO14496_Box_Full -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PADB.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PADB.php deleted file mode 100644 index 6fe231a..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PADB.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: PADB.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Padding Bits Box</i>In some streams the media samples do not occupy - * all bits of the bytes given by the sample size, and are padded at the end to - * a byte boundary. In some cases, it is necessary to record externally the - * number of padding bits used. This table supplies that information. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -final class ISO14496_Box_PADB extends ISO14496_Box_Full -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PDIN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PDIN.php deleted file mode 100644 index 57ed193..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PDIN.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: PDIN.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Progressive Download Information Box</i> aids the progressive download - * of an ISO file. The box contains pairs of numbers (to the end of the box) - * specifying combinations of effective file download bitrate in units of - * bytes/sec and a suggested initial playback delay in units of milliseconds. - * - * A receiving party can estimate the download rate it is experiencing, and from - * that obtain an upper estimate for a suitable initial delay by linear - * interpolation between pairs, or by extrapolation from the first or last - * entry. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_PDIN extends ISO14496_Box_Full -{ - /** @var Array */ - private $_progressiveDownloadInfo = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - while ($this->_reader->getOffset() < $this->getOffset() + $this->getSize()) - $this->_progressiveDownloadInfo[] = array - ("rate" => $this->_reader->readUInt32BE(), - "initialDelay" => $this->_reader->readUInt32BE()); - } - - /** - * Returns the progressive download information array. The array consists of - * items having two keys. - * - * o rate -- the download rate expressed in bytes/second - * o initialDelay -- the suggested delay to use when playing the file, - * such that if download continues at the given rate, all data within the - * file will arrive in time for its use and playback should not need to - * stall. - * - * @return Array - */ - public function getProgressiveDownloadInfo() - { - return $this->_progressiveDownloadInfo; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PITM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PITM.php deleted file mode 100644 index ecbc5c9..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/PITM.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: PITM.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * For a given handler, the primary data may be one of the referenced items when - * it is desired that it be stored elsewhere, or divided into extents; or the - * primary metadata may be contained in the meta-box (e.g. in an - * {@link ISO14496_Box_XML XML Box}). Either the <i>Primary Item Box</i> must - * occur, or there must be a box within the meta-box (e.g. an - * {@link ISO14496_Box_XML XML Box}) containing the primary information in the - * format required by the identified handler. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_PITM extends ISO14496_Box_Full -{ - /** @var string */ - private $_itemId; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_itemId = $this->_reader->readUInt16BE(); - } - - /** - * Returns the identifier of the primary item. - * - * @return integer - */ - public function getItemId() - { - return $this->_itemId; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SBGP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SBGP.php deleted file mode 100644 index a7b21eb..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SBGP.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SBGP.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sample To Group Box</i> table can be used to find the group that a - * sample belongs to and the associated description of that sample group. The - * table is compactly coded with each entry giving the index of the first sample - * of a run of samples with the same sample group descriptor. The sample group - * description ID is an index that refers to a {@link ISO14496_Box_SGPD Sample - * Group Description Box}, which contains entries describing the characteristics - * of each sample group. - * - * There may be multiple instances of this box if there is more than one sample - * grouping for the samples in a track. Each instance of the Sample To Group Box - * has a type code that distinguishes different sample groupings. Within a - * track, there shall be at most one instance of this box with a particular - * grouping type. The associated Sample Group Description shall indicate the - * same value for the grouping type. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SBGP extends ISO14496_Box_Full -{ - /** @var integer */ - private $_groupingType; - - /** @var Array */ - private $_sampleToGroupTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $groupingType = $this->_reader->readUInt32BE(); - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_sampleToGroupTable[$i] = array - ("sampleCount" => - Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)), - "groupDescriptionIndex" => - Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4))); - } - - /** - * Returns the grouping type that identifies the type (i.e. criterion used to - * form the sample groups) of the sample grouping and links it to its sample - * group description table with the same value for grouping type. At most one - * occurrence of this box with the same value for groupingType shall exist for - * a track. - * - * @return integer - */ - public function getGroupingType() - { - return $this->_groupingType; - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o sampleCount -- an integer that gives the number of consecutive samples - * with the same sample group descriptor. If the sum of the sample count - * in this box is less than the total sample count, then the reader should - * effectively extend it with an entry that associates the remaining - * samples with no group. It is an error for the total in this box to be - * greater than the sample_count documented elsewhere, and the reader - * behavior would then be undefined. - * o groupDescriptionIndex -- an integer that gives the index of the sample - * group entry which describes the samples in this group. The index ranges - * from 1 to the number of sample group entries in the - * {@link ISO14496_Box_SGPD Sample Group Description Box}, or takes the - * value 0 to indicate that this sample is a member of no group of this - * type. - * - * @return Array - */ - public function getSampleToGroupTable() - { - return $this->_sampleToGroupTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHI.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHI.php deleted file mode 100644 index d63d3f0..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHI.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SCHI.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Scheme Information Box</i> is a container Box that is only interpreted - * by the scheme being used. Any information the encryption system needs is - * stored here. The content of this box is a series of boxes whose type and - * format are defined by the scheme declared in the - * {@link ISO14496_Box_SCHM Scheme Type Box}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SCHI extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHM.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHM.php deleted file mode 100644 index 2f361f2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SCHM.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SCHM.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Scheme Type Box</i> identifies the protection scheme. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SCHM extends ISO14496_Box_Full -{ - /** @var string */ - private $_schemeType; - - /** @var integer */ - private $_schemeVersion; - - /** @var string */ - private $_schemeUri; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_schemeType = $this->_reader->read(4); - $this->_schemeVersion = $this->_reader->readUInt32BE(); - if ($this->hasFlag(1)) - $this->_schemeUri = preg_split - ("/\\x00/", $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset())); - } - - /** - * Returns the code defining the protection scheme. - * - * @return string - */ - public function getSchemeType() { return $this->_schemeType; } - - /** - * Returns the version of the scheme used to create the content. - * - * @return integer - */ - public function getSchemeVersion() { return $this->_schemeVersion; } - - /** - * Returns the optional scheme address to allow for the option of directing - * the user to a web-page if they do not have the scheme installed on their - * system. It is an absolute URI. - * - * @return string - */ - public function getSchemeUri() { return $this->_schemeUri; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SDTP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SDTP.php deleted file mode 100644 index b8f3dc3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SDTP.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SDTP.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Independent and Disposable Samples Box</i> optional table answers - * three questions about sample dependency: - * 1) does this sample depend on others (is it an I-picture)? - * 2) do no other samples depend on this one? - * 3) does this sample contain multiple (redundant) encodings of the data at - * this time-instant (possibly with different dependencies)? - * - * In the absence of this table: - * 1) the sync sample table answers the first question; in most video codecs, - * I-pictures are also sync points, - * 2) the dependency of other samples on this one is unknown. - * 3) the existence of redundant coding is unknown. - * - * When performing trick modes, such as fast-forward, it is possible to use the - * first piece of information to locate independently decodable samples. - * Similarly, when performing random access, it may be necessary to locate the - * previous sync point or random access recovery point, and roll-forward from - * the sync point or the pre-roll starting point of the random access recovery - * point to the desired point. While rolling forward, samples on which no others - * depend need not be retrieved or decoded. - * - * The value of sampleIsDependedOn is independent of the existence of redundant - * codings. However, a redundant coding may have different dependencies from the - * primary coding; if redundant codings are available, the value of - * sampleDependsOn documents only the primary coding. - * - * A sample dependency Box may also occur in the {@link ISO14496_Box_TRAF Track - * Fragment Box}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SDTP extends ISO14496_Box_Full -{ - /** @var Array */ - private $_sampleDependencyTypeTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - $dataSize = strlen($data); - for ($i = 1; $i <= $dataSize; $i++) - $this->_sampleDependencyTypeTable[$i] = array - ("sampleDependsOn" => (($tmp = Transform::fromInt8 - ($data[$i - 1])) >> 4) & 0x3, - "sampleIsDependedOn" => ($tmp >> 2) & 0x3, - "sampleHasRedundancy" => $tmp & 0x3); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o sampleDependsOn -- takes one of the following four values: - * 0: the dependency of this sample is unknown; - * 1: this sample does depend on others (not an I picture); - * 2: this sample does not depend on others (I picture); - * 3: reserved - * o sampleIsDependedOn -- takes one of the following four values: - * 0: the dependency of other samples on this sample is unknown; - * 1: other samples depend on this one (not disposable); - * 2: no other sample depends on this one (disposable); - * 3: reserved - * o sampleHasRedundancy -- takes one of the following four values: - * 0: it is unknown whether there is redundant coding in this sample; - * 1: there is redundant coding in this sample; - * 2: there is no redundant coding in this sample; - * 3: reserved - * - * @return Array - */ - public function getSampleDependencyTypeTable() - { - return $this->_sampleDependencyTypeTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SGPD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SGPD.php deleted file mode 100644 index ca46806..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SGPD.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SGPD.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sample Group Description Box</i> table gives information about the - * characteristics of sample groups. The descriptive information is any other - * information needed to define or characterize the sample group. - * - * There may be multiple instances of this box if there is more than one sample - * grouping for the samples in a track. Each instance of the Sample Group - * Description box has a type code that distinguishes different sample - * groupings. Within a track, there shall be at most one instance of this box - * with a particular grouping type. The associated Sample To Group shall - * indicate the same value for the grouping type. - * - * @todo Data parsing - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -final class ISO14496_Box_SGPD extends ISO14496_Box_Full -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SINF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SINF.php deleted file mode 100644 index 605781f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SINF.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SINF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Protection Scheme Information Box</i> contains all the information - * required both to understand the encryption transform applied and its - * parameters, and also to find other information such as the kind and location - * of the key management system. It also documents the original (unencrypted) - * format of the media. The Protection Scheme Info Box is a container Box. It is - * mandatory in a sample entry that uses a code indicating a protected stream. - * - * When used in a protected sample entry, this box must contain the original - * format box to document the original format. At least one of the following - * signaling methods must be used to identify the protection applied: - * - * a) MPEG-4 systems with IPMP: no other boxes, when IPMP descriptors in MPEG-4 - * systems streams are used; - * b) Standalone IPMP: an {@link ISO14496_Box_IMIF IPMP Info Box}, when IPMP - * descriptors outside MPEG-4 systems are used; - * c) Scheme signaling: a {@link ISO14496_Box_SCHM Scheme Type Box} and - * {@link ISO14496_Box_SCHI Scheme Information Box}, when these are used - * (either both must occur, or neither). - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SINF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SKIP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SKIP.php deleted file mode 100644 index 5bc259e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SKIP.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SKIP.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The contents of a <i>Free Space Box</i> are irrelevant and may be ignored, or - * the object deleted, without affecting the presentation. (Care should be - * exercised when deleting the object, as this may invalidate the offsets used - * in the sample table, unless this object is after all the media data). - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SKIP extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SMHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SMHD.php deleted file mode 100644 index d52ab79..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SMHD.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SMHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sound Media Header Box</i> contains general presentation information, - * independent of the coding, for audio media. This header is used for all - * tracks containing audio. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SMHD extends ISO14496_Box_Full -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STBL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STBL.php deleted file mode 100644 index 06dfee6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STBL.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STBL.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Sample Table Box</i> contains all the time and data indexing of the - * media samples in a track. Using the tables here, it is possible to locate - * samples in time, determine their type (e.g. I-frame or not), and determine - * their size, container, and offset into that container. - * - * If the track that contains the Sample Table Box references no data, then the - * Sample Table Box does not need to contain any sub-boxes (this is not a very - * useful media track). - * - * If the track that the Sample Table Box is contained in does reference data, - * then the following sub-boxes are required: {@link ISO14496_Box_STSD Sample - * Description}, {@link ISO14496_Box_STSZ Sample Size}, - * {@link ISO14496_Box_STSC Sample To Chunk}, and {@link ISO14496_Box_STCO Chunk - * Offset}. Further, the {@link ISO14496_Box_STSD Sample Description Box} shall - * contain at least one entry. A Sample Description Box is required because it - * contains the data reference index field which indicates which - * {@link ISO14496_Box_DREF Data Reference Box} to use to retrieve the media - * samples. Without the Sample Description, it is not possible to determine - * where the media samples are stored. The {@link ISO14496_Box_STSS Sync Sample - * Box} is optional. If the Sync Sample Box is not present, all samples are sync - * samples. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STBL extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STCO.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STCO.php deleted file mode 100644 index 1b8e5cc..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STCO.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STCO.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Chunk Offset Box</i> table gives the index of each chunk into the - * containing file. There are two variants, permitting the use of 32-bit or - * 64-bit offsets. The latter is useful when managing very large presentations. - * At most one of these variants will occur in any single instance of a sample - * table. - * - * Offsets are file offsets, not the offset into any box within the file (e.g. - * {@link ISO14496_Box_MDAT Media Data Box}). This permits referring to media - * data in files without any box structure. It does also mean that care must be - * taken when constructing a self-contained ISO file with its metadata - * ({@link ISO14496_Box_MOOV Movie Box}) at the front, as the size of the - * {@link ISO14496_Box_MOOV Movie Box} will affect the chunk offsets to the - * media data. - * - * This box variant contains 32-bit offsets. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STCO extends ISO14496_Box_Full -{ - /** @var Array */ - private $_chunkOffsetTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_chunkOffsetTable[$i] = - Transform::fromUInt32BE(substr($data, ($i - 1) * 4, 4)); - } - - /** - * Returns an array of values. Each entry has the entry number as its index - * and a 32 bit integer that gives the offset of the start of a chunk into - * its containing media file as its value. - * - * @return Array - */ - public function getChunkOffsetTable() { return $this->_chunkOffsetTable; } - - /** - * Sets an array of chunk offsets. Each entry must have the entry number as - * its index and a 32 bit integer that gives the offset of the start of a - * chunk into its containing media file as its value. - * - * @param Array $chunkOffsetTable The chunk offset array. - */ - public function setChunkOffsetTable($chunkOffsetTable) - { - $this->_chunkOffsetTable = $chunkOffsetTable; - } - - /** - * Returns the box raw data. - * - * @return string - */ - public function __toString($data = "") - { - $data = Transform::toUInt32BE(count($this->_chunkOffsetTable)); - foreach ($this->_chunkOffsetTable as $chunkOffset) - $data .= Transform::toUInt32BE($chunkOffset); - return parent::__toString($data); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STDP.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STDP.php deleted file mode 100644 index a6eb4d6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STDP.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STDP.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Degradation Priority Box</i> contains the degradation priority of each - * sample. Specifications derived from this define the exact meaning and - * acceptable range of the priority field. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STDP extends ISO14496_Box_Full -{ - /** @var Array */ - private $_values = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - while ($this->_reader->getOffset() < $this->getOffset() + $this->getSize()) - $this->_values[] = array("priority" => $this->_reader->readUInt16BE()); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o priority: specifies the degradation priority for each sample segment. - * - * @return Array - */ - public function getValues() - { - return $this->_values; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSC.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSC.php deleted file mode 100644 index 22c751d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSC.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STSC.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * Samples within the media data are grouped into chunks. Chunks can be of - * different sizes, and the samples within a chunk can have different sizes. - * The <i>Sample To Chunk Box</i> table can be used to find the chunk that - * contains a sample, its position, and the associated sample description. - * - * The table is compactly coded. Each entry gives the index of the first chunk - * of a run of chunks with the same characteristics. By subtracting one entry - * here from the previous one, you can compute how many chunks are in this run. - * You can convert this to a sample count by multiplying by the appropriate - * samplesPerChunk. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STSC extends ISO14496_Box_Full -{ - /** @var Array */ - private $_sampleToChunkTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_sampleToChunkTable[$i] = array - ("firstChunk" => - Transform::fromUInt32BE(substr($data, ($i - 1) * 12, 4)), - "samplesPerChunk" => - Transform::fromUInt32BE(substr($data, $i * 12 - 8, 4)), - "sampleDescriptionIndex" => - Transform::fromUInt32BE(substr($data, $i * 12 - 4, 4))); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o firstChunk -- an integer that gives the index of the first chunk in - * this run of chunks that share the same samplesPerChunk and - * sampleDescriptionIndex; the index of the first chunk in a track has the - * value 1 (the firstChunk field in the first record of this box has the - * value 1, identifying that the first sample maps to the first chunk). - * o samplesPerChunk is an integer that gives the number of samples in each - * of these chunks. - * o sampleDescriptionIndex is an integer that gives the index of the sample - * entry that describes the samples in this chunk. The index ranges from 1 - * to the number of sample entries in the {@link ISO14496_Box_STSD Sample - * Description Box}. - * - * @return Array - */ - public function getSampleToChunkTable() - { - return $this->_sampleToChunkTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSD.php deleted file mode 100644 index cb13973..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSD.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STSD.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sample Description Box</i> table gives detailed information about the - * coding type used, and any initialization information needed for that coding. - * - * @todo Data parsing - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -final class ISO14496_Box_STSD extends ISO14496_Box_Full -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSH.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSH.php deleted file mode 100644 index 8dd6a6d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSH.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STSH.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Shadow Sync Sample Box</i> table provides an optional set of sync - * samples that can be used when seeking or for similar purposes. In normal - * forward play they are ignored. - * - * Each entry in the Shadow Sync Table consists of a pair of sample numbers. The - * first entry (shadowedSampleNumber) indicates the number of the sample that a - * shadow sync will be defined for. This should always be a non-sync sample - * (e.g. a frame difference). The second sample number (syncSampleNumber) - * indicates the sample number of the sync sample (i.e. key frame) that can be - * used when there is a random access at, or before, the shadowedSampleNumber. - * - * The shadow sync samples are normally placed in an area of the track that is - * not presented during normal play (edited out by means of an edit list), - * though this is not a requirement. The shadow sync table can be ignored and - * the track will play (and seek) correctly if it is ignored (though perhaps not - * optimally). - * - * The Shadow Sync Sample replaces, not augments, the sample that it shadows - * (i.e. the next sample sent is shadowedSampleNumber+1). The shadow sync sample - * is treated as if it occurred at the time of the sample it shadows, having the - * duration of the sample it shadows. - * - * Hinting and transmission might become more complex if a shadow sample is used - * also as part of normal playback, or is used more than once as a shadow. In - * this case the hint track might need separate shadow syncs, all of which can - * get their media data from the one shadow sync in the media track, to allow - * for the different time-stamps etc. needed in their headers. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STSH extends ISO14496_Box_Full -{ - /** @var Array */ - private $_shadowSyncSampleTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 0; $i < $entryCount; $i++) - $this->_shadowSyncSampleTable[$i] = array - ("shadowedSampleNumber" => - Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)), - "syncSampleNumber" => - Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4))); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o shadowedSampleNumber - gives the number of a sample for which there is - * an alternative sync sample. - * o syncSampleNumber - gives the number of the alternative sync sample. - * - * @return Array - */ - public function getShadowSyncSampleTable() - { - return $this->_shadowSyncSampleTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSS.php deleted file mode 100644 index ca0d03f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSS.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STSS.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sync Sample Box</i> provides a compact marking of the random access - * points within the stream. The table is arranged in strictly increasing order - * of sample number. If the sync sample box is not present, every sample is a - * random access point. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STSS extends ISO14496_Box_Full -{ - /** @var Array */ - private $_syncSampleTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_syncSampleTable[$i] = - Transform::fromUInt32BE(substr($data, ($i - 1) * 4, 4)); - } - - /** - * Returns an array of values. Each entry has the entry number as its index - * and an integer that gives the numbers of the samples that are random access - * points in the stream as its value. - * - * @return Array - */ - public function getSyncSampleTable() - { - return $this->_syncSampleTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSZ.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSZ.php deleted file mode 100644 index 21ba170..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STSZ.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STSZ.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sample Size Box</i> contains the sample count and a table giving the - * size in bytes of each sample. This allows the media data itself to be - * unframed. The total number of samples in the media is always indicated in the - * sample count. - * - * There are two variants of the sample size box. The first variant has a fixed - * size 32-bit field for representing the sample sizes; it permits defining a - * constant size for all samples in a track. The second variant permits smaller - * size fields, to save space when the sizes are varying but small. One of these - * boxes must be present; the first version is preferred for maximum - * compatibility. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STSZ extends ISO14496_Box_Full -{ - /** @var integer */ - private $_sampleSize; - - /** @var Array */ - private $_sampleSizeTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_sampleSize = $this->_reader->readUInt32BE(); - $sampleCount = $this->_reader->readUInt32BE(); - if ($this->_sampleSize == 0) { - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $sampleCount; $i++) - $this->_sampleSizeTable[$i] = - Transform::fromUInt32BE(substr($data, ($i - 1) * 4, 4)); - } - } - - /** - * Returns the default sample size. If all the samples are the same size, this - * field contains that size value. If this field is set to 0, then the samples - * have different sizes, and those sizes are stored in the sample size table. - * - * @return integer - */ - public function getSampleSize() { return $this->_sampleSize; } - - /** - * Returns an array of sample sizes specifying the size of a sample, indexed - * by its number. - * - * @return Array - */ - public function getSampleSizeTable() - { - return $this->_sampleSizeTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STTS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STTS.php deleted file mode 100644 index ae0e39c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STTS.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STTS.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Decoding Time to Sample Box</i> contains a compact version of a table - * that allows indexing from decoding time to sample number. Other tables give - * sample sizes and pointers, from the sample number. Each entry in the table - * gives the number of consecutive samples with the same time delta, and the - * delta of those samples. By adding the deltas a complete time-to-sample map - * may be built. - * - * The Decoding Time to Sample Box contains decode time delta's: DT(n+1) = DT(n) - * + STTS(n) where STTS(n) is the (uncompressed) table entry for sample n. - * - * The sample entries are ordered by decoding time stamps; therefore the deltas - * are all non-negative. - * - * The DT axis has a zero origin; DT(i) = SUM(for j=0 to i-1 of delta(j)), and - * the sum of all deltas gives the length of the media in the track (not mapped - * to the overall timescale, and not considering any edit list). - * - * The {@link ISO14496_Box_ELST Edit List Box} provides the initial CT value if - * it is non-empty (non-zero). - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STTS extends ISO14496_Box_Full -{ - /** @var Array */ - private $_timeToSampleTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $entryCount; $i++) - $this->_timeToSampleTable[$i] = array - ("sampleCount" => - Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)), - "sampleDelta" => - Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4))); - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o sampleCount -- an integer that counts the number of consecutive samples - * that have the given duration. - * o sampleDelta -- an integer that gives the delta of these samples in the - * time-scale of the media. - * - * @return Array - */ - public function getTimeToSampleTable() - { - return $this->_timeToSampleTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STZ2.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STZ2.php deleted file mode 100644 index 44ab096..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/STZ2.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: STZ2.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sample Size Box</i> contains the sample count and a table giving the - * size in bytes of each sample. This allows the media data itself to be - * unframed. The total number of samples in the media is always indicated in the - * sample count. - * - * There are two variants of the sample size box. This variant permits smaller - * than 32-bit size fields, to save space when the sizes are varying but small. - * One of the boxes must be present; the {@link ISO14496_Box_STSZ another - * variant} is preferred for maximum compatibility. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_STZ2 extends ISO14496_Box_Full -{ - /** @var Array */ - private $_sampleSizeTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_reader->skip(3); - $fieldSize = $this->_reader->readInt8(); - $sampleCount = $this->_reader->readUInt32BE(); - $data = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - for ($i = 1; $i <= $sampleCount; $i++) { - switch ($fieldSize) { - case 4: - $this->_sampleSizeTable[$i] = - (($tmp = Transform::fromInt8($data[$i - 1])) >> 4) & 0xf; - if ($i + 1 < $sampleCount) - $this->_sampleSizeTable[$i++] = $tmp & 0xf; - break; - case 8: - $this->_sampleSizeTable[$i] = Transform::fromInt8($data[$i - 1]); - break; - case 16: - $this->_sampleSizeTable[$i] = - Transform::fromUInt16BE(substr($data, ($i - 1) * 2, 2)); - break; - } - } - } - - /** - * Returns an array of sample sizes specifying the size of a sample, indexed - * by its number. - * - * @return Array - */ - public function getSampleSizeTable() - { - return $this->_sampleSizeTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SUBS.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SUBS.php deleted file mode 100644 index 83ae8ac..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/SUBS.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: SUBS.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Sub-Sample Information Box</i> is designed to contain sub-sample - * information. - * - * A sub-sample is a contiguous range of bytes of a sample. The specific - * definition of a sub-sample shall be supplied for a given coding system (e.g. - * for ISO/IEC 14496-10, Advanced Video Coding). In the absence of such a - * specific definition, this box shall not be applied to samples using that - * coding system. - * - * If subsample_count is 0 for any entry, then those samples have no subsample - * information and no array follows. The table is sparsely coded; the table - * identifies which samples have sub-sample structure by recording the - * difference in sample-number between each entry. The first entry in the table - * records the sample number of the first sample having sub-sample information. - * - * Note: It is possible to combine subsamplePriority and discardable such that - * when subsamplePriority is smaller than a certain value, discardable is set to - * 1. However, since different systems may use different scales of priority - * values, to separate them is safe to have a clean solution for discardable - * sub-samples. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_SUBS extends ISO14496_Box_Full -{ - /** @var Array */ - private $_subSampleTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $entryCount = $this->_reader->readUInt32BE(); - for ($i = 0; $i < $entryCount; $i++) { - $entry = array(); - $entry["sampleDelta"] = $this->_reader->readUInt32BE(); - $entry["subsamples"] = array(); - if (($subsampleCount = $this->_reader->readUInt16BE()) > 0) { - for ($j = 0; $j < $subsampleCount; $j++) { - $subsample = array(); - if ($this->getVersion() == 1) - $subsample["subsampleSize"] = $this->_reader->readUInt32BE(); - else - $subsample["subsampleSize"] = $this->_reader->readUInt16BE(); - $subsample["subsamplePriority"] = $this->_reader->readInt8(); - $subsample["discardable"] = $this->_reader->readInt8(); - $this->_reader->skip(4); - $entry["subsamples"][] = $subsample; - } - $this->_subSampleTable[] = $entry; - } - } - } - - /** - * Returns an array of values. Each entry is an array containing the following - * keys. - * o sampleDelta -- an integer that specifies the sample number of the - * sample having sub-sample structure. It is coded as the difference - * between the desired sample number, and the sample number indicated in - * the previous entry. If the current entry is the first entry, the value - * indicates the sample number of the first sample having sub-sample - * information, that is, the value is the difference between the sample - * number and zero (0). - * o subsamples -- an array of subsample arrays, each containing the - * following keys. - * o subsampleSize -- an integer that specifies the size, in bytes, of - * the current sub-sample. - * o subsamplePriority -- an integer specifying the degradation priority - * for each sub-sample. Higher values of subsamplePriority, indicate - * sub-samples which are important to, and have a greater impact on, - * the decoded quality. - * o discardable -- equal to 0 means that the sub-sample is required to - * decode the current sample, while equal to 1 means the sub-sample is - * not required to decode the current sample but may be used for - * enhancements, e.g., the sub-sample consists of supplemental - * enhancement information (SEI) messages. - * - * @return Array - */ - public function getSubSampleTable() - { - return $this->_subSampleTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFHD.php deleted file mode 100644 index 53faac1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFHD.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TFHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * Each movie fragment can add zero or more <i>Track Fragment Header Box</i> to - * each track; and a track fragment can add zero or more contiguous runs of - * samples. The track fragment header sets up information and defaults used for - * those runs of samples. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TFHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_trackId; - - /** @var integer */ - private $_defaultSampleDescriptionIndex; - - /** @var integer */ - private $_defaultSampleDuration; - - /** @var integer */ - private $_defaultSampleSize; - - /** @var integer */ - private $_defaultSampleFlags; - - /** - * Indicates indicates the presence of the baseDataOffset field. This provides - * an explicit anchor for the data offsets in each track run (see below). If - * not provided, the base-dataoffset for the first track in the movie fragment - * is the position of the first byte of the enclosing Movie Fragment Box, and - * for second and subsequent track fragments, the default is the end of the - * data defined by the preceding fragment. Fragments inheriting their offset - * in this way must all use the same data-reference (i.e., the data for these - * tracks must be in the same file). - */ - const BASE_DATA_OFFSET = 0x1; - - /** - * Indicates the presence of the sampleDescriptionIndex field, which - * over-rides, in this fragment, the default set up in the - * {@link ISO14496_Box_TREX Track Extends Box}. - */ - const SAMPLE_DESCRIPTION_INDEX = 0x2; - - /** Indicates the precense of the defaultSampleDuration field. */ - const DEFAULT_SAMPLE_DURATION = 0x8; - - /** Indicates the precense of the defaultSampleSize field. */ - const DEFAULT_SAMPLE_SIZE = 0x10; - - /** Indicates the precense of the defaultSampleFlags field. */ - const DEFAULT_SAMPLE_DURATION = 0x20; - - /** - * Indicates that the duration provided in either defaultSampleDuration, or by - * the defaultDuration in the {@link ISO14496_Box_TREX Track Extends Box}, is - * empty, i.e. that there are no samples for this time interval. - */ - const DURATION_IS_EMPTY = 0x10000; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - * @todo The sample flags could be parsed further - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_trackId = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::BASE_DATA_OFFSET)) - $this->_baseDataOffset = $this->_reader->readInt64BE(); - if ($this->hasFlag(self::SAMPLE_DESCRIPTION_INDEX)) - $this->_sampleDescriptionIndex = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::DEFAULT_SAMPLE_DURATION)) - $this->_defaultSampleDuration = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::DEFAULT_SAMPLE_SIZE)) - $this->_defaultSampleSize = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::DEFAULT_SAMPLE_FLAGS)) - $this->_defaultSampleFlags = $this->_reader->readUInt32BE(); - } - - /** - * Returns the track identifier. - * - * @return integer - */ - public function getTrackId() - { - return $this->_trackId; - } - - /** - * Returns the base offset to use when calculating data offsets. - * - * @return integer - */ - public function getBaseDataOffset() - { - return $this->_baseDataOffset; - } - - /** - * Returns the sample description index. - * - * @return integer - */ - public function getSampleDescriptionIndex() - { - return $this->_defaultSampleDescriptionIndex; - } - - /** - * Returns the default sample duration. - * - * @return integer - */ - public function getDefaultSampleDuration() - { - return $this->_defaultSampleDuration; - } - - /** - * Returns the default sample size. - * - * @return integer - */ - public function getDefaultSampleSize() - { - return $this->_defaultSampleSize; - } - - /** - * Returns the default sample flags. - * - * @return integer - */ - public function getDefaultSampleFlags() - { - return $this->_defaultSampleFlags; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFRA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFRA.php deleted file mode 100644 index 5e73844..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TFRA.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TFRA.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * Each entry contains the location and the presentation time of the random - * accessible sample. It indicates that the sample in the entry can be random - * accessed. Note that not every random accessible sample in the track needs to - * be listed in the table. - * - * The absence of the <i>Track Fragment Random Access Box</i> does not mean that - * all the samples are sync samples. Random access information in the - * {@link ISO14496_Box_TRUN Track Fragment Run Box}, - * {@link ISO14496_Box_TRAF Track Fragment Box} and - * {@link ISO14496_Box_TREX Track Fragment Box} shall be set appropriately - * regardless of the presence of this box. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TFRA extends ISO14496_Box_Full -{ - /** @var integer */ - private $_trackId; - - /** @var Array */ - private $_degradationPriorityTable = array(); - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_trackId = $this->_reader->readUInt32BE(); - - $trafNumberSize = (($tmp = $this->_reader->readUInt32BE()) >> 4) & 0x3; - $trunNumberSize = ($tmp >> 2) & 0x3; - $sampleNumberSize = $tmp & 0x3; - $entryCount = $this->_reader->readUInt32BE(); - for ($i = 1; $i <= $entryCount; $i++) { - $entry = array(); - if ($this->getVersion() == 1) { - $entry["time"] = $this->_reader->readInt64BE(); - $entry["moofOffset"] = $this->_reader->readInt64BE(); - } else { - $entry["time"] = $this->_reader->readUInt32BE(); - $entry["moofOffset"] = $this->_reader->readUInt32BE(); - } - $entry["trafNumber"] = - ($trafNumberSize == 4 ? $this->_reader->readUInt32BE() : - ($trafNumberSize == 8 ? $this->_reader->readInt64BE() : 0)); - $entry["trunNumber"] = - ($trunNumberSize == 4 ? $this->_reader->readUInt32BE() : - ($trunNumberSize == 8 ? $this->_reader->readInt64BE() : 0)); - $entry["sampleNumber"] = - ($sampleNumberSize == 4 ? $this->_reader->readUInt32BE() : - ($sampleNumberSize == 8 ? $this->_reader->readInt64BE() : 0)); - $this->_degradationPriorityTable[$i] = $entry; - } - } - - /** - * Returns the track identifier. - * - * @return integer - */ - public function getTrackId() { return $this->_trackId; } - - /** - * Returns an array of entries. Each entry is an array containing the - * following keys. - * o time -- a 32 or 64 bits integer that indicates the presentation time of - * the random access sample in units defined in the - * {@link ISO14496_Box_MDHD Media Header Box} of the associated track. - * o moofOffset -- a 32 or 64 bits integer that gives the offset of the - * {@link ISO14496_Box_MOOF Movie Fragment Box} used in this entry. Offset - * is the byte-offset between the beginning of the file and the beginning - * of the Movie Fragment Box. - * o trafNumber -- indicates the {@link ISO14496_Box_TRAF Track Fragment - * Box} number that contains the random accessible sample. The number - * ranges from 1 (the first traf is numbered 1) in each Track Fragment - * Box. - * o trunNumber -- indicates the {@link ISO14496_Box_TRUN Track Fragment Run - * Box} number that contains the random accessible sample. The number - * ranges from 1 in each Track Fragment Run Box. - * o sampleNumber -- indicates the sample number that contains the random - * accessible sample. The number ranges from 1 in each Track Fragment Run - * Box. - * - * @return Array - */ - public function getDegradationPriorityTable() - { - return $this->_degradationPriorityTable; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TKHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TKHD.php deleted file mode 100644 index e01013c..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TKHD.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TKHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Track Header Box</i> specifies the characteristics of a single track. - * Exactly one Track Header Box is contained in a track. - * - * In the absence of an edit list, the presentation of a track starts at the - * beginning of the overall presentation. An empty edit is used to offset the - * start time of a track. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TKHD extends ISO14496_Box_Full -{ - /** @var integer */ - private $_creationTime; - - /** @var integer */ - private $_modificationTime; - - /** @var integer */ - private $_trackId; - - /** @var integer */ - private $_duration; - - /** @var integer */ - private $_width; - - /** @var integer */ - private $_height; - - /** - * Indicates that the track is enabled. A disabled track is treated as if it - * were not present. - */ - const TRACK_ENABLED = 1; - - /** Indicates that the track is used in the presentation. */ - const TRACK_IN_MOVIE = 2; - - /** Indicates that the track is used when previewing the presentation. */ - const TRACK_IN_PREVIEW = 4; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - if ($this->getVersion() == 1) { - $this->_creationTime = $this->_reader->readInt64BE(); - $this->_modificationTime = $this->_reader->readInt64BE(); - $this->_trackId = $this->_reader->readUInt32BE(); - $this->_reader->skip(4); - $this->_duration = $this->_reader->readInt64BE(); - } else { - $this->_creationTime = $this->_reader->readUInt32BE(); - $this->_modificationTime = $this->_reader->readUInt32BE(); - $this->_trackId = $this->_reader->readUInt32BE(); - $this->_reader->skip(4); - $this->_duration = $this->_reader->readUInt32BE(); - } - $this->_reader->skip(52); - $this->_width = - ((($tmp = $this->_reader->readUInt32BE()) >> 16) & 0xffff) + - ($tmp & 0xffff) / 10; - $this->_height = - ((($tmp = $this->_reader->readUInt32BE()) >> 16) & 0xffff) + - ($tmp & 0xffff) / 10; - } - - /** - * Returns the creation time of this track in seconds since midnight, Jan. 1, - * 1904, in UTC time. - * - * @return integer - */ - public function getCreationTime() { return $this->_creationTime; } - - /** - * Returns the most recent time the track was modified in seconds since - * midnight, Jan. 1, 1904, in UTC time. - * - * @return integer - */ - public function getModificationTime() { return $this->_modificationTime; } - - /** - * Returns a number that uniquely identifies this track over the entire - * life-time of this presentation. Track IDs are never re-used and cannot be - * zero. - * - * @return integer - */ - public function getTrackId() { return $this->_trackId; } - - /** - * Returns the duration of this track (in the timescale indicated in the - * {@link MVHD Movie Header Box}). The value of this field is equal to the sum - * of the durations of all of the track's edits. If there is no edit list, - * then the duration is the sum of the sample durations, converted into the - * timescale in the {@link MVHD Movie Header Box}. If the duration of this - * track cannot be determined then duration is set to all 32-bit maxint. - * - * @return integer - */ - public function getDuration() { return $this->_duration; } - - /** - * Returns the track's visual presentation width. This needs not be the same - * as the pixel width of the images; all images in the sequence are scaled to - * this width, before any overall transformation of the track represented by - * the matrix. The pixel width of the images is the default value. - * - * @return integer - */ - public function getWidth() { return $this->_rate; } - - /** - * Returns the track's visual presentation height. This needs not be the same - * as the pixel height of the images; all images in the sequence are scaled to - * this height, before any overall transformation of the track represented by - * the matrix. The pixel height of the images is the default value. - * - * @return integer - */ - public function getHeight() { return $this->_volume; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAF.php deleted file mode 100644 index 9ce8601..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAF.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRAF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * Within the <i>Track Fragment Box</i> there is a set of track fragments, zero - * or more per track. The track fragments in turn contain zero or more track - * runs, each of which document a contiguous run of samples for that track. - * - * Within these structures, many fields are optional and can be defaulted. It is - * possible to add empty time to a track using these structures, as well as - * adding samples. Empty inserts can be used in audio tracks doing silence - * suppression, for example. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TRAF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAK.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAK.php deleted file mode 100644 index 152ab02..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRAK.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRAK.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Track Box</i> is a container box for a single track of a presentation. - * A presentation consists of one or more tracks. Each track is independent of - * the other tracks in the presentation and carries its own temporal and spatial - * information. Each track will contain its associated {@link ISO14496_Box_MDIA - * Media Box}. - * - * Tracks are used for two purposes: - * (a) to contain media data (media tracks) and - * (b) to contain packetization information for streaming protocols - * (hint tracks). - * There shall be at least one media track within an ISO file, and all the media - * tracks that contributed to the hint tracks shall remain in the file, even if - * the media data within them is not referenced by the hint tracks; after - * deleting all hint tracks, the entire un-hinted presentation shall remain. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TRAK extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREF.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREF.php deleted file mode 100644 index f5f3815..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREF.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TREF.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>Track Reference Box</i> provides a reference from the containing track - * to another track in the presentation. These references are typed. A {@link - * ISO14496_Box_HINT hint} reference links from the containing hint track to the - * media data that it hints. A content description reference {@link - * ISO14496_Box_CDSC cdsc} links a descriptive or metadata track to the content - * which it describes. - * - * Exactly one Track Reference Box can be contained within the {@link - * ISO14496_Box_TRAK Track Box}. - * - * If this box is not present, the track is not referencing any other track in - * any way. The reference array is sized to fill the reference type box. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TREF extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREX.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREX.php deleted file mode 100644 index 854c14e..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TREX.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TREX.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Track Extends Box</i> sets up default values used by the movie - * fragments. By setting defaults in this way, space and complexity can be saved - * in each {@link ISO14496_Box_TRAF Track Fragment Box}. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TREX extends ISO14496_Box_Full -{ - /** @var integer */ - private $_trackId; - - /** @var integer */ - private $_defaultSampleDescriptionIndex; - - /** @var integer */ - private $_defaultSampleDuration; - - /** @var integer */ - private $_defaultSampleSize; - - /** @var integer */ - private $_defaultSampleFlags; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - * @todo The sample flags could be parsed further - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_trackId = $this->_reader->readUInt32BE(); - $this->_defaultSampleDescriptionIndex = $this->_reader->readUInt32BE(); - $this->_defaultSampleDuration = $this->_reader->readUInt32BE(); - $this->_defaultSampleSize = $this->_reader->readUInt32BE(); - $this->_defaultSampleFlags = $this->_reader->readUInt32BE(); - } - - /** - * Returns the default track identifier. - * - * @return integer - */ - public function getTrackId() - { - return $this->_trackId; - } - - /** - * Returns the default sample description index. - * - * @return integer - */ - public function getDefaultSampleDescriptionIndex() - { - return $this->_defaultSampleDescriptionIndex; - } - - /** - * Returns the default sample duration. - * - * @return integer - */ - public function getDefaultSampleDuration() - { - return $this->_defaultSampleDuration; - } - - /** - * Returns the default sample size. - * - * @return integer - */ - public function getDefaultSampleSize() - { - return $this->_defaultSampleSize; - } - - /** - * Returns the default sample flags. - * - * @return integer - */ - public function getDefaultSampleFlags() - { - return $this->_defaultSampleFlags; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRUN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRUN.php deleted file mode 100644 index d6a51d2..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/TRUN.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: TRUN.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * Within the {@link ISO14496_Box_TRAF Track Fragment Box}, there are zero or - * more <i>Track Fragment Run Boxes</i>. If the durationIsEmpty flag is set, - * there are no track runs. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_TRUN extends ISO14496_Box_Full -{ - /** @var integer */ - private $_dataOffset; - - /** @var Array */ - private $_samples = array(); - - /** Indicates the precense of the dataOffset field. */ - const DATA_OFFSET = 0x1; - - /** - * Indicates the precense of the firstSampleFlags field; this over-rides the - * default flags for the first sample only. This makes it possible to record - * a group of frames where the first is a key and the rest are difference - * frames, without supplying explicit flags for every sample. If this flag and - * field are used, sampleFlags field shall not be present. - */ - const FIRST_SAMPLE_FLAGS = 0x4; - - /** - * Indicates that each sample has its own duration, otherwise the default is - * used. - */ - const SAMPLE_DURATION = 0x100; - - /** - * Indicates that each sample has its own size, otherwise the default is used. - */ - const SAMPLE_SIZE = 0x200; - - /** - * Indicates that each sample has its own flags, otherwise the default is - * used. - */ - const SAMPLE_FLAGS = 0x400; - - /** - * Indicates that each sample has a composition time offset (e.g. as used for - * I/P/B video in MPEG). - */ - const SAMPLE_COMPOSITION_TIME_OFFSETS = 0x800; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $flags = $this->_flags; - $sampleCount = $this->_reader->readUInt32BE(); - - if ($this->hasFlag(self::DATA_OFFSET)) - $this->_dataOffset = $this->_reader->readInt32BE(); - if ($this->hasFlag(self::FIRST_SAMPLE_FLAGS)) - $this->_flags = $this->_reader->readUInt32BE(); - - for ($i = 0; $i < $sampleCount; $i++) { - $sample = array(); - if ($this->hasFlag(self::SAMPLE_DURATION)) - $sample["duration"] = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::SAMPLE_SIZE)) - $sample["size"] = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::SAMPLE_FLAGS)) - $sample["flags"] = $this->_reader->readUInt32BE(); - if ($this->hasFlag(self::SAMPLE_COMPOSITION_TIME_OFFSET)) - $sample["compositionTimeOffset"] = $this->_reader->readUInt32BE(); - $this->_samples[] = $sample; - $this->_flags = $flags; - } - } - - /** - * Returns the data offset. - * - * @return integer - */ - public function getDataOffset() - { - return $this->_trackId; - } - - /** - * Returns the array of samples. - * - * @return Array - */ - public function getSamples() - { - return $this->_samples; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/UDTA.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/UDTA.php deleted file mode 100644 index e55d63f..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/UDTA.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: UDTA.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box.php"); -/**#@-*/ - -/** - * The <i>User Data Box</i> contains objects that declare user information about - * the containing box and its data (presentation or track). - * - * The User Data Box is a container box for informative user-data. This user - * data is formatted as a set of boxes with more specific box types, which - * declare more precisely their content. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_UDTA extends ISO14496_Box -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader = null, &$options = array()) - { - parent::__construct($reader, $options); - $this->setContainer(true); - - if ($reader === null) - return; - - $this->constructBoxes(); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URL.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URL.php deleted file mode 100644 index 593765b..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URL.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: URL.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * This box is a URL data reference. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_URL extends ISO14496_Box_Full -{ - /** @var string */ - private $_location; - - /** - * Indicates that the media data is in the same file as the Movie Box - * containing this data reference. - */ - const SELFCONTAINED = 1; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_location = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - } - - /** - * Returns the location. - * - * @return string - */ - public function getLocation() { return $this->_location; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URN.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URN.php deleted file mode 100644 index dc5ae1d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/URN.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: URN.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * This box is a URN data reference. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_URN extends ISO14496_Box_Full -{ - /** @var string */ - private $_name; - - /** @var string */ - private $_location; - - /** - * Indicates that the media data is in the same file as the Movie Box - * containing this data reference. - */ - const SELFCONTAINED = 1; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - list ($this->_name, $this->_location) = preg_split - ("/\\x00/", $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset())); - } - - /** - * Returns the name. - * - * @return string - */ - public function getName() { return $this->_name; } - - /** - * Returns the location. - * - * @return string - */ - public function getLocation() { return $this->_location; } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/VMHD.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/VMHD.php deleted file mode 100644 index b661946..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/VMHD.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: VMHD.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * The <i>Video Media Header Box</i> contains general presentation information, - * independent of the coding, for video media. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_VMHD extends ISO14496_Box_Full -{ - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/XML.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/XML.php deleted file mode 100644 index c2efbc3..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Box/XML.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: XML.php 92 2008-05-10 13:43:14Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("ISO14496/Box/Full.php"); -/**#@-*/ - -/** - * When the primary data is in XML format and it is desired that the XML be - * stored directly in the meta-box, one of the <i>XML Box</i> forms may be used. - * The {@link ISO14496_Box_BXML Binary XML Box} may only be used when there is a - * single well-defined binarization of the XML for that defined format as - * identified by the handler. - * - * Within an XML box the data is in UTF-8 format unless the data starts with a - * byte-order-mark (BOM), which indicates that the data is in UTF-16 format. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 92 $ - */ -final class ISO14496_Box_XML extends ISO14496_Box_Full -{ - /** @var string */ - private $_xml; - - /** - * Constructs the class with given parameters and reads box related data from - * the ISO Base Media file. - * - * @param Reader $reader The reader object. - */ - public function __construct($reader, &$options = array()) - { - parent::__construct($reader, $options); - - $this->_xml = $this->_reader->read - ($this->getOffset() + $this->getSize() - $this->_reader->getOffset()); - } - - /** - * Returns the XML data. - * - * @return string - */ - public function getXml() - { - return $this->_xml; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Exception.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Exception.php deleted file mode 100644 index c34f8f1..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ISO14496/Exception.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @subpackage ISO 14496 - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Exception.php 85 2008-04-23 20:21:36Z svollbehr $ - */ - -/** - * The ISO14496_Exception is thrown whenever an error occurs within the - * {@link ISO14496} class. - * - * @package php-reader - * @subpackage ISO 14496 - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 85 $ - */ -class ISO14496_Exception extends Exception -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Magic.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Magic.php deleted file mode 100644 index ab5b81d..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Magic.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @copyright Copyright (c) 2006-2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Magic.php 73 2008-04-12 19:07:31Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader.php"); -/**#@-*/ - -/** - * This class is used to classify the given file using some magic bytes - * characteristic to a particular file type. The classification information can - * be a MIME type or just text describing the file. - * - * This method is slower than determining the type by file suffix but on the - * other hand reduces the risk of fail positives during the test. - * - * The magic file consists of ASCII characters defining the magic numbers for - * different file types. Each row has 4 to 5 columns, empty and commented lines - * (those starting with a hash character) are ignored. Columns are described - * below. - * - * o <b>1</b> -- byte number to begin checking from. ">" indicates a dependency - * upon the previous non-">" line - * o <b>2</b> -- type of data to match. Can be one of following - * - <i>byte</i> (single character) - * - <i>short</i> (machine-order 16-bit integer) - * - <i>long</i> (machine-order 32-bit integer) - * - <i>string</i> (arbitrary-length string) - * - <i>date</i> (long integer date (seconds since Unix epoch/1970)) - * - <i>beshort</i> (big-endian 16-bit integer) - * - <i>belong</i> (big-endian 32-bit integer) - * - <i>bedate</i> (big-endian 32-bit integer date) - * - <i>leshort</i> (little-endian 16-bit integer) - * - <i>lelong</i> (little-endian 32-bit integer) - * - <i>ledate</i> (little-endian 32-bit integer date) - * o <b>3</b> -- contents of data to match - * o <b>4</b> -- file description/MIME type if matched - * o <b>5</b> -- optional MIME encoding if matched and if above was a MIME type - * - * @package php-reader - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2006-2008 PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 73 $ - */ -final class Magic -{ - /** @var string */ - private $_magic; - - /** - * Reads the magic information from given magic file. - * - * @param string $filename The path to the magic file. - */ - public function __construct($filename) - { - $reader = new Reader($filename); - $this->_magic = $reader->read($reader->getSize()); - } - - /** - * Returns the recognized MIME type/description of the given file. The type - * is determined by the content using magic bytes characteristic for the - * particular file type. - * - * If the type could not be found, the function returns the default value, or - * <var>false</var>. - * - * @param string $filename The file path whose type to determine. - * @param string $default The default value. - * @return string|false - */ - public function getType($filename, $default = false) - { - $reader = new Reader($filename); - - $parentOffset = 0; - foreach (preg_split("/^/m", $this->_magic) as $line) { - $chunks = array(); - if (!preg_match("/^(?P<Dependant>>?)(?P<Byte>\d+)\s+(?P<MatchType>\S+)" . - "\s+(?P<MatchData>\S+)(?:\s+(?P<MIMEType>[a-z]+\/[a-z-" . - "0-9]+)?(?:\s+(?P<Description>.+))?)?$/", $line, $chunks)) - continue; - - if ($chunks["Dependant"]) { - $reader->setOffset($parentOffset); - $reader->skip($chunks["Byte"]); - } else - $reader->setOffset($parentOffset = $chunks["Byte"]); - - $matchType = strtolower($chunks["MatchType"]); - $matchData = preg_replace - (array("/\\\\ /", "/\\\\\\\\/", "/\\\\([0-7]{1,3})/e", - "/\\\\x([0-9A-Fa-f]{1,2})/e", "/0x([0-9A-Fa-f]+)/e"), - array(" ", "\\\\", "pack(\"H*\", base_convert(\"$1\", 8, 16));", - "pack(\"H*\", \"$1\");", "hexdec(\"$1\");"), - $chunks["MatchData"]); - - switch ($matchType) { - case "byte": // single character - $data = $reader->readInt8(); - break; - case "short": // machine-order 16-bit integer - $data = $reader->readInt16(); - break; - case "long": // machine-order 32-bit integer - $data = $reader->readInt32(); - break; - case "string": // arbitrary-length string - $data = $reader->readString8(strlen($matchData)); - break; - case "date": // long integer date (seconds since Unix epoch/1970) - $data = $reader->readInt64BE(); - break; - case "beshort": // big-endian 16-bit integer - $data = $reader->readUInt16BE(); - break; - case "belong": // big-endian 32-bit integer - case "bedate": // big-endian 32-bit integer date - $data = $reader->readUInt32BE(); - break; - case "leshort": // little-endian 16-bit integer - $data = $reader->readUInt16LE(); - break; - case "lelong": // little-endian 32-bit integer - case "ledate": // little-endian 32-bit integer date - $data = $reader->readUInt32LE(); - break; - default: - $data = null; - break; - } - - if (strcmp($data, $matchData) == 0) { - if (!empty($chunks["MIMEType"])) - return $chunks["MIMEType"]; - if (!empty($chunks["Description"])) - return $chunks["Description"]; - } - } - return $default; - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader.php deleted file mode 100644 index 98678b6..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader.php +++ /dev/null @@ -1,216 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Reader.php 104 2008-07-29 21:11:46Z svollbehr $ - */ - -/**#@+ @ignore */ -require_once("Reader/Exception.php"); -require_once("Transform.php"); -/**#@-*/ - -/** - * The Reader class encapsulates a file. It is hence responsible of upkeeping - * the connection to the file, keeping track of the cursor position and reading - * data from it. - * - * @package php-reader - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 104 $ - */ -class Reader -{ - /** @var resource */ - private $_fd; - - /** @var integer */ - private $_size; - - /** - * Constructs the Reader class with given file. - * - * @param string $filename The path to the file. - * @param string $mode The type of access. - * @throws Reader_Exception if the file cannot be read. - */ - public function __construct($filename, $mode = "rb") - { - if (is_resource($filename) && - in_array(get_resource_type($filename), array("file", "stream"))) - $this->_fd = $filename; - else if (($this->_fd = fopen($filename, $mode)) === false) - throw new Reader_Exception("Unable to open file:" . $filename); - - fseek($this->_fd, 0, SEEK_END); - $this->_size = ftell($this->_fd); - fseek($this->_fd, 0); - } - - /** - * Closes the file. - */ - public function __destruct() - { - @fclose($this->_fd); - } - - /** - * Checks whether there is more to be read in the file. Returns - * <var>true</var> if the end of the file has not yet been reached; - * <var>false</var> otherwise. - * - * @return boolean - */ - public function available() - { - return $this->getOffset() < $this->_size; - } - - /** - * Jumps <var>size</var> amount of bytes in the file stream. - * - * @param integer $size The amount of bytes. - * @return void - * @throws Reader_Exception if <var>size</var> attribute is negative. - */ - public function skip($size) - { - if ($size < 0) - throw new Reader_Exception("Invalid argument"); - if ($size == 0) - return; - fseek($this->_fd, $size, SEEK_CUR); - } - - /** - * Reads <var>length</var> amount of bytes from the file stream. - * - * @param integer $length The amount of bytes. - * @return string - * @throws Reader_Exception if <var>length</var> attribute is negative. - */ - public function read($length) - { - if ($length < 0) - throw new Reader_Exception("Invalid argument"); - if ($length == 0) - return ""; - return fread($this->_fd, $length); - } - - /** - * Returns the current point of operation. - * - * @return integer - */ - public function getOffset() - { - return ftell($this->_fd); - } - - /** - * Sets the point of operation, ie the cursor offset value. The offset can - * also be set to a negative value when it is interpreted as an offset from - * the end of the file instead of the beginning. - * - * @param integer $offset The new point of operation. - * @return void - */ - public function setOffset($offset) - { - fseek($this->_fd, $offset < 0 ? $this->_size + $offset : $offset); - } - - /** - * Returns the file size in bytes. - * - * @return integer - */ - public function getSize() { return $this->_size; } - - /** - * Magic function so that $obj->value will work. - * - * @param string $name The field name. - * @return mixed - */ - public function __get($name) { - if (method_exists($this, "get" . ucfirst(strtolower($name)))) - return call_user_func(array($this, "get" . ucfirst(strtolower($name)))); - else throw new Reader_Exception("Unknown field: " . $name); - } - - /** - * Magic function so that assignments with $obj->value will work. - * - * @param string $name The field name. - * @param string $value The field value. - * @return mixed - */ - public function __set($name, $value) { - if (method_exists($this, "set" . ucfirst(strtolower($name)))) - call_user_func - (array($this, "set" . ucfirst(strtolower($name))), $value); - else throw new Reader_Exception("Unknown field: " . $name); - } - - /** - * Magic function to delegate the call to helper methods of - * <var>Transform</var> class to transform read data in another format. - * - * The read data length is determined from the helper method name. For methods - * where arbitrary data lengths are accepted a parameter can be used to - * specify the length. - * - * @param string $method The method to be called. - * @param string $params The parameters should the function accept them. - * @return mixed - * @throws Reader_Exception if no such transformer is implemented - */ - public function __call($method, $params) { - $chunks = array(); - if (preg_match - ("/read([a-z]{3,6})?(\d{1,2})?(?:LE|BE)?/i", $method, $chunks) && - method_exists("Transform", preg_replace("/^read/", "from", $method))) { - return call_user_func - (array("Transform", preg_replace("/^read/", "from", $method)), - $this->read(preg_match("/String|(?:H|L)Hex/", $chunks[1]) ? - (isset($params[0]) ? $params[0] : 1) : - ($chunks[1] == "GUID" ? 16 : $chunks[2] / 8))); - } else throw new Reader_Exception("Unknown method: " . $method); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader/Exception.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader/Exception.php deleted file mode 100644 index 41d7018..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Reader/Exception.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Exception.php 39 2008-03-26 17:27:22Z svollbehr $ - */ - -/** - * The Reader_Exception is thrown whenever an error occurs within the Reader - * class during a file operation. - * - * @package php-reader - * @author Sven Vollbehr <svollbehr@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 39 $ - */ -class Reader_Exception extends Exception -{ -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Transform.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Transform.php deleted file mode 100644 index b39cd06..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Transform.php +++ /dev/null @@ -1,745 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2006-2008 The PHP Reader Project Workgroup. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Transform.php 105 2008-07-30 14:56:47Z svollbehr $ - */ - -/** - * An utility class to perform simple byte transformations on data. - * - * @package php-reader - * @author Sven Vollbehr <svollbehr@gmail.com> - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2006-2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 105 $ - * @static - */ -final class Transform -{ - const MACHINE_ENDIAN_ORDER = 0; - const LITTLE_ENDIAN_ORDER = 1; - const BIG_ENDIAN_ORDER = 2; - - /** - * Default private constructor for a static class. - */ - private function __construct() {} - - /** - * Returns whether the current machine endian order is little endian. - * - * @return boolean - */ - public static function isLittleEndian() - { - return self::fromInt32("\x01\x00\x00\x00") == 1; - } - - /** - * Returns whether the current machine endian order is big endian. - * - * @return boolean - */ - public static function isBigEndian() - { - return self::fromInt32("\x00\x00\x00\x01") == 1; - } - - /** - * Returns 64-bit float as little-endian ordered binary data string. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt64LE($value) - { - return pack("V*", $value & 0xffffffff, $value / (0xffffffff+1)); - } - - /** - * Returns little-endian ordered binary data as 64-bit float. PHP does not - * support 64-bit integers as the long integer is of 32-bits but using - * aritmetic operations it is implicitly converted into floating point which - * is of 64-bits long. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt64LE($value) - { - list(, $lolo, $lohi, $hilo, $hihi) = unpack("v*", $value); - return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + - ($lohi * (0xffff+1) + $lolo); - } - - /** - * Returns 64-bit float as big-endian ordered binary data string. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt64BE($value) - { - return pack("N*", $value / (0xffffffff+1), $value & 0xffffffff); - } - - /** - * Returns big-endian ordered binary data as 64-bit float. PHP does not - * support 64-bit integers as the long integer is of 32-bits but using - * aritmetic operations it is implicitly converted into floating point which - * is of 64-bits long. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt64BE($value) - { - list(, $hihi, $hilo, $lohi, $lolo) = unpack("n*", $value); - return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + - ($lohi * (0xffff+1) + $lolo); - } - - /** - * Returns signed 32-bit integer as machine-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt32($value) - { - return pack("l*", $value); - } - - /** - * Returns machine-endian ordered binary data as signed 32-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt32($value) - { - list(, $int) = unpack("l*", $value); - return $int; - } - - /** - * Returns signed 32-bit integer as little-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt32LE($value) - { - if (self::isBigEndian()) - return strrev(self::toInt32($value)); - else - return self::toInt32($value); - } - - /** - * Returns little-endian ordered binary data as signed 32-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt32LE($value) - { - if (self::isBigEndian()) - return self::fromInt32(strrev($value)); - else - return self::fromInt32($value); - } - - /** - * Returns signed 32-bit integer as big-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt32BE($value) - { - if (self::isBigEndian()) - return self::toInt32($value); - else - return strrev(self::toInt32($value)); - } - - /** - * Returns big-endian ordered binary data as signed 32-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt32BE($value) - { - if (self::isBigEndian()) - return self::fromInt32($value); - else - return self::fromInt32(strrev($value)); - } - - /** - * Returns unsigned 32-bit integer as little-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toUInt32LE($value) - { - return pack("V*", $value); - } - - /** - * Returns little-endian ordered binary data as unsigned 32-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromUInt32LE($value) - { - if (PHP_INT_SIZE < 8) { - list(, $lo, $hi) = unpack("v*", $value); - return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo - } else { - list(, $int) = unpack("V*", $value); - return $int; - } - } - - /** - * Returns unsigned 32-bit integer as big-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toUInt32BE($value) - { - return pack("N*", $value); - } - - /** - * Returns big-endian ordered binary data as unsigned 32-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromUInt32BE($value) - { - if (PHP_INT_SIZE < 8) { - list(, $hi, $lo) = unpack("n*", $value); - return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo - } else { - list(, $int) = unpack("N*", $value); - return $int; - } - } - - /** - * Returns signed 16-bit integer as machine endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt16($value) - { - return pack("s*", $value); - } - - /** - * Returns machine endian ordered binary data as signed 16-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt16($value) - { - list(, $int) = unpack("s*", $value); - return $int; - } - - /** - * Returns signed 16-bit integer as little-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt16LE($value) - { - if (self::isBigEndian()) - return strrev(self::toInt16($value)); - else - return self::toInt16($value); - } - - /** - * Returns little-endian ordered binary data as signed 16-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt16LE($value) - { - if (self::isBigEndian()) - return self::fromInt16(strrev($value)); - else - return self::fromInt16($value); - } - - /** - * Returns signed 16-bit integer as big-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toInt16BE($value) - { - if (self::isBigEndian()) - return self::toInt16($value); - else - return strrev(self::toInt16($value)); - } - - /** - * Returns big-endian ordered binary data as signed 16-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt16BE($value) - { - if (self::isBigEndian()) - return self::fromInt16($value); - else - return self::fromInt16(strrev($value)); - } - - /** - * Returns machine endian ordered binary data as unsigned 16-bit integer. - * - * @param string $value The binary data string. - * @param integer $order The byte order of the binary data string. - * @return integer - */ - private static function fromUInt16($value, $order = self::MACHINE_ENDIAN_ORDER) - { - list(, $int) = unpack - (($order == self::BIG_ENDIAN_ORDER ? "n" : - ($order == self::LITTLE_ENDIAN_ORDER ? "v" : "S")) . "*", $value); - return $int; - } - - /** - * Returns unsigned 16-bit integer as little-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toUInt16LE($value) - { - return pack("v*", $value); - } - - /** - * Returns little-endian ordered binary data as unsigned 16-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromUInt16LE($value) - { - return self::fromUInt16($value, self::LITTLE_ENDIAN_ORDER); - } - - /** - * Returns unsigned 16-bit integer as big-endian ordered binary data. - * - * @param integer $value The input value. - * @return string - */ - public static function toUInt16BE($value) - { - return pack("n*", $value); - } - - /** - * Returns big-endian ordered binary data as unsigned 16-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromUInt16BE($value) - { - return self::fromUInt16($value, self::BIG_ENDIAN_ORDER); - } - - /** - * Returns an 8-bit integer as binary data. - * - * @param integer $value The input value. - * @return integer - */ - public static function toInt8($value) - { - return pack("c*", $value); - } - - /** - * Returns binary data as 8-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromInt8($value) - { - list(, $int) = unpack("c*", $value); - return $int; - } - - /** - * Returns an unsigned 8-bit integer as binary data. - * - * @param integer $value The input value. - * @return integer - */ - public static function toUInt8($value) - { - return pack("C*", $value); - } - - /** - * Returns binary data as an unsigned 8-bit integer. - * - * @param string $value The binary data string. - * @return integer - */ - public static function fromUInt8($value) - { - list(, $int) = unpack("C*", $value); - return $int; - } - - /** - * Returns a floating point number as machine endian ordered binary data. - * - * @param float $value The input value. - * @return string - */ - public static function toFloat($value) - { - return pack("f*", $value); - } - - /** - * Returns machine endian ordered binary data as a floating point number. - * - * @param string $value The binary data string. - * @return float - */ - public static function fromFloat($value) - { - list(, $float) = unpack("f*", $value); - return $float; - } - - /** - * Returns a floating point number as little-endian ordered binary data. - * - * @param float $value The input value. - * @return string - */ - public static function toFloatLE($value) - { - if (self::isBigEndian()) - return strrev(self::toFloat($value)); - else - return self::toFloat($value); - } - - /** - * Returns little-endian ordered binary data as a floating point number. - * - * @param string $value The binary data string. - * @return float - */ - public static function fromFloatLE($value) - { - if (self::isBigEndian()) - return self::fromFloat(strrev($value)); - else - return self::fromFloat($value); - } - - /** - * Returns a floating point number as big-endian ordered binary data. - * - * @param float $value The input value. - * @return string - */ - public static function toFloatBE($value) - { - if (self::isBigEndian()) - return self::toFloat($value); - else - return strrev(self::toFloat($value)); - } - - /** - * Returns big-endian ordered binary data as a float point number. - * - * @param string $value The binary data string. - * @return float - */ - public static function fromFloatBE($value) - { - if (self::isBigEndian()) - return self::fromFloat($value); - else - return self::fromFloat(strrev($value)); - } - - /** - * Returns string as binary data padded to given length with zeros. - * - * @param string $value The input value. - * @return string - */ - public static function toString8($value, $length, $padding = "\0") - { - return str_pad($value, $length, $padding); - } - - /** - * Returns binary data as string. Removes terminating zero. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromString8($value) - { - return rtrim($value, "\0"); - } - - /** - * Returns machine-ordered multibyte string as UTF-16 defined-order binary - * data. The byte order is stored using a byte order mask (BOM) in the binary - * data string. - * - * @param string $value The input value. - * @param integer $order The byte order of the binary data string. - * @return string - */ - public static function toString16($value, $order = self::MACHINE_ENDIAN_ORDER) - { - $format = $order == self::BIG_ENDIAN_ORDER ? "n" : - ($order == self::LITTLE_ENDIAN_ORDER ? "v" : "S"); - $string = pack($format, 0xfeff); - foreach (unpack("S*", $value) as $char) - $string .= pack($format, $char); - return $string; - } - - /** - * Returns UTF-16 formatted binary data as machine-ordered multibyte string. - * The byte order is determined from the byte order mark included in the - * binary data string. The order parameter is updated if a BOM is found. - * - * @param string $value The binary data string. - * @param integer $order The endian to decode using if no BOM was found. - * @return string - */ - public static function fromString16 - ($value, &$order = self::MACHINE_ENDIAN_ORDER) - { - if (strlen($value) < 2) - return ""; - - if (ord($value[0]) == 0xfe && ord($value[1]) == 0xff) { - $order = self::BIG_ENDIAN_ORDER; - return self::fromString16BE(substr($value, 2)); - } - else if (ord($value[0]) == 0xff && ord($value[1]) == 0xfe) { - $order = self::LITTLE_ENDIAN_ORDER; - return self::fromString16LE(substr($value, 2)); - } - else if ($order == self::BIG_ENDIAN_ORDER || - ($order == self::MACHINE_ENDIAN_ORDER && self::isBigEndian())) - return self::fromString16BE($value); - else - return self::fromString16LE($value); - } - - /** - * Returns machine-ordered multibyte string as little-endian ordered binary - * data. - * - * @param string $value The input value. - * @return string - */ - public static function toString16LE($value) - { - $string = ""; - foreach (unpack("S*", $value) as $char) - $string .= pack("v", $char); - return $string; - } - - /** - * Returns little-endian ordered binary data as machine ordered multibyte - * string. Removes terminating zero. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromString16LE($value) - { - $string = ""; - foreach (unpack("v*", substr($value, -2) == "\0\0" ? - substr($value, 0, -2) : $value) as $char) - $string .= pack("S", $char); - return $string; - } - - /** - * Returns machine ordered multibyte string as big-endian ordered binary data. - * - * @param string $value The input value. - * @return string - */ - public static function toString16BE($value) - { - $string = ""; - foreach (unpack("S*", $value) as $char) - $string .= pack("n", $char); - return $string; - } - - /** - * Returns big-endian ordered binary data as machine ordered multibyte string. - * Removes terminating zero. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromString16BE($value) - { - $string = ""; - foreach (unpack("n*", substr($value, -2) == "\0\0" ? - substr($value, 0, -2) : $value) as $char) - $string .= pack("S", $char); - return $string; - } - - /** - * Returns hexadecimal string having high nibble first as binary data. - * - * @param string $value The input value. - * @return string - */ - public static function toHHex($value) - { - return pack("H*", $value); - } - - /** - * Returns binary data as hexadecimal string having high nibble first. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromHHex($value) - { - list($hex) = unpack("H*0", $value); - return $hex; - } - - /** - * Returns hexadecimal string having low nibble first as binary data. - * - * @param string $value The input value. - * @return string - */ - public static function toLHex($value) - { - return pack("h*", $value); - } - - /** - * Returns binary data as hexadecimal string having low nibble first. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromLHex($value) - { - list($hex) = unpack("h*0", $value); - return $hex; - } - - /** - * Returns big-endian ordered hexadecimal GUID string as little-endian ordered - * binary data string. - * - * @param string $value The input value. - * @return string - */ - public static function toGUID($value) - { - $string = ""; $C = preg_split("/-/", $value); - return pack - ("V1v2N2", hexdec($C[0]), hexdec($C[1]), hexdec($C[2]), - hexdec($C[3] . substr($C[4], 0, 4)), hexdec(substr($C[4], 4))); - } - - /** - * Returns the little-endian ordered binary data as big-endian ordered - * hexadecimal GUID string. - * - * @param string $value The binary data string. - * @return string - */ - public static function fromGUID($value) - { - $C = @unpack("V1V/v2v/N2N", $value); - list($hex) = @unpack("H*0", pack - ("NnnNN", $C["V"], $C["v1"], $C["v2"], $C["N1"], $C["N2"])); - - /* Fixes a bug in PHP versions earlier than Jan 25 2006 */ - if (implode("", unpack("H*", pack("H*", "a"))) == "a00") - $hex = substr($hex, 0, -1); - - return preg_replace - ("/^(.{8})(.{4})(.{4})(.{4})/", "\\1-\\2-\\3-\\4-", $hex); - } -} diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Twiddling.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Twiddling.php deleted file mode 100644 index 8ad1285..0000000 --- a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/Twiddling.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php -/** - * PHP Reader Library - * - * Copyright (c) 2008 The PHP Reader Project Workgroup. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the project workgroup nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * @package php-reader - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Id: Twiddling.php 110 2008-09-05 17:10:51Z svollbehr $ - */ - -/** - * A utility class to perform bit twiddling on integers. - * - * @package php-reader - * @author Ryan Butterfield <buttza@gmail.com> - * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup - * @license http://code.google.com/p/php-reader/wiki/License New BSD License - * @version $Rev: 110 $ - * @static - */ -final class Twiddling -{ - /** - * Default private constructor for a static class. - */ - private function __construct() {} - - /** - * Sets a bit at a given position in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $position The position of the bit to set. - * @param boolean $on Whether to enable or clear the bit. - * @return integer - */ - public static function setBit($integer, $position, $on) - { - return $on ? self::enableBit($integer, $position) : - self::clearBit($integer, $position); - } - - /** - * Enables a bit at a given position in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $position The position of the bit to enable. - * @return integer - */ - public static function enableBit($integer, $position) - { - return $integer | (1 << $position); - } - - /** - * Clears a bit at a given position in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $position The position of the bit to clear. - * @return integer - */ - public static function clearBit($integer, $position) - { - return $integer & ~(1 << $position); - } - - /** - * Toggles a bit at a given position in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $position The position of the bit to toggle. - * @return integer - */ - public static function toggleBit($integer, $position) - { - return $integer ^ (1 << $position); - } - - /** - * Tests a bit at a given position in an integer. - * - * @param integer $integer The value to test. - * @param integer $position The position of the bit to test. - * @return boolean - */ - public static function testBit($integer, $position) - { - return ($integer & (1 << $position)) != 0; - } - - /** - * Sets a given set of bits in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $bits The bits to set. - * @param boolean $on Whether to enable or clear the bits. - * @return integer - */ - public static function setBits($integer, $bits, $on) - { - return $on ? self::enableBits($integer, $bits) : - self::clearBits($integer, $bits); - } - - /** - * Enables a given set of bits in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $bits The bits to enable. - * @return integer - */ - public static function enableBits($integer, $bits) - { - return $integer | $bits; - } - - /** - * Clears a given set of bits in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $bits The bits to clear. - * @return integer - */ - public static function clearBits($integer, $bits) - { - return $integer & ~$bits; - } - - /** - * Toggles a given set of bits in an integer. - * - * @param integer $integer The value to manipulate. - * @param integer $bits The bits to toggle. - * @return integer - */ - public static function toggleBits($integer, $bits) - { - return $integer ^ $bits; - } - - /** - * Tests a given set of bits in an integer - * returning whether all bits are set. - * - * @param integer $integer The value to test. - * @param integer $bits The bits to test. - * @return boolean - */ - public static function testAllBits($integer, $bits) - { - return ($integer & $bits) == $bits; - } - - /** - * Tests a given set of bits in an integer - * returning whether any bits are set. - * - * @param integer $integer The value to test. - * @param integer $bits The bits to test. - * @return boolean - */ - public static function testAnyBits($integer, $bits) - { - return ($integer & $bits) != 0; - } - - /** - * Stores a value in a given range in an integer. - * - * @param integer $integer The value to store into. - * @param integer $start The position to store from. Must be <= $end. - * @param integer $end The position to store to. Must be >= $start. - * @param integer $value The value to store. - * @return integer - */ - public static function setValue($integer, $start, $end, $value) - { - return self::clearBits($integer, self::getMask($start, $end) << $start) | - ($value << $start); - } - - /** - * Retrieves a value from a given range in an integer, inclusive. - * - * @param integer $integer The value to read from. - * @param integer $start The position to read from. Must be <= $end. - * @param integer $end The position to read to. Must be >= $start. - * @return integer - */ - public static function getValue($integer, $start, $end) - { - return ($integer & self::getMask($start, $end)) >> $start; - } - - /** - * Returns an integer with all bits set from start to end. - * - * @param integer $start The position to start setting bits from. Must - * be <= $end. - * @param integer $end The position to stop setting bits. Must be >= $start. - * @return integer - */ - public static function getMask($start, $end) - { - $mask = 0; - for (; $start <= $end; $start++) - $mask |= 1 << $start; - return $mask; - } -} diff --git a/libraries/phpvideotoolkit/adapters/toolkit/audio.php b/libraries/phpvideotoolkit/adapters/toolkit/audio.php deleted file mode 100644 index 415adae..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/audio.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - class PHPVideoToolkit_Audio - { - function __construct() - { - } - function __destruct() - { - } - public function save() - { - } - } -
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/adapters/toolkit/capture.php b/libraries/phpvideotoolkit/adapters/toolkit/capture.php deleted file mode 100644 index 827c5f9..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/capture.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - class PHPVideoToolkit_Capture - { - function __construct() - { - } - function __destruct() - { - } - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/conversion.php b/libraries/phpvideotoolkit/adapters/toolkit/conversion.php deleted file mode 100644 index 0ada11c..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/conversion.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - class PHPVideoToolkit_Conversion - { - function __construct() - { - } - function __destruct() - { - } - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/frame.php b/libraries/phpvideotoolkit/adapters/toolkit/frame.php deleted file mode 100644 index ecbed92..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/frame.php +++ /dev/null @@ -1,325 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /** - * This is similar in terms to FFmpeg-PHP's ffmpeg_frame, however the constructor can accept any number of items such as - * a GD image, an image file, or an instance of PHPVideoToolkit, note if using an instance of PHPVideoToolkit you must - * have already specified the frame you wish to extract with PHPVideoToolkit::extractFrame() or set - */ - class PHPVideoToolkit_Frame - { - - private $_resource = null; - private $_gd_resource = null; - private $_resource_type = null; - private $_width = null; - private $_height = null; - private $_timecode = null; - - /** - * Class Constructor - * @param resource $gd_resource A GD image resource. - * @param integer $timecode The time in seconds of the frame. If false and the $resource is a PHPVideoToolkit instance then the timecode will be retrieved from - * the instance. However if $timecode is set and the $resource is a PHPVideoToolkit the $timecode will override the time retrieved from the instance. - */ - function __construct($resource, $timecode=false) - { -// is this a gd resource - if(is_resource($resource) && get_resource_type($resource) == 'gd') - { - $this->_gd_resource = $resource; - $this->_resource_type = 'gd'; - $this->_width = imagesx($resource); - $this->_height = imagesy($resource); - $this->_timecode = $timecode; - } -// is this a gd resource - else if(is_string($resource) && is_file($resource)) - { - $this->_resource_type = 'file'; - $dimensions = getimagesize($resource); - $this->_width = $dimensions[0]; - $this->_height = $dimensions[1]; - $this->_timecode = $timecode; - } -// check for PHPVideoToolkit class instance - else if(get_class($resource) == 'PHPVideoToolkit') - { - $info = $resource->getFileInfo(); - if(!$info) - { -// throw error - } - if(!isset($info['video'])) - { -// throw error - } - $this->_resource = $resource; - $this->_resource_type = 'toolkit'; - $this->_width = $info['video']['dimensions']['width']; - $this->_height = $info['video']['dimensions']['height']; -// set the timecode, the $timecode value will override - $set_timecode = $resource->hasCommand('-ss'); - $this->_timecode = $timecode === false && $set_timecode !== false ? $set_timecode : $timecode; - } -// isn't a valid resource type so throw error - else - { -// throw error - } - } - - /** - * Destroys any gd resource if made - */ - function __destruct() - { - if($this->_resource_type == 'gd' && is_resource($this->_resource)) - { - imagedestroy($this->_resource); - } - } - - /** - * Determines if the resource supplied to the frame is valid. - * @access public - * @return integer - */ - public function hasValidResource() - { - return $this->_resource_type !== null; - } - - /** - * Return the width of the frame. - * @access public - * @return integer - */ - public function getWidth() - { - return $this->_width; - } - - /** - * Return the height of the frame. - * @access public - * @return integer - */ - public function getHeight() - { - return $this->_height; - } - - /** - * Return the presentation time stamp of the frame. - * @access public - * @uses ffmpeg_frame::getPTS() - * @return integer - */ - public function getPresentationTimestamp() - { - return $this->getPTS(); - } - - /** - * Return the presentation time stamp of the frame. - * @access public - * @return integer - */ - public function getPTS() - { - return $this->_timecode; - } - - /** - * Determines if the current frame is a keyframe. - * @access public - * @return integer - */ - public function isKeyFrame() - { - return false; - } - - /** - * Resize and optionally crop the frame. - * NOTE 1: Cropping is always applied to the frame before it is resized. - * NOTE 2: Crop values must be even numbers. - * @access public - * @param integer $width New width of the frame (must be an even number). - * @param integer $height New height of the frame (must be an even number). - * @param integer $crop_top Remove [croptop] rows of pixels from the top of the frame. - * @param integer $crop_bottom Remove [cropbottom] rows of pixels from the bottom of the frame. - * @param integer $crop_left Remove [cropleft] rows of pixels from the left of the frame. - * @param integer $crop_right Remove [cropright] rows of pixels from the right of the frame. - * @return boolean - */ - public function resize($width, $height, $crop_top=false, $crop_bottom=false, $crop_left=false, $crop_right=false) - { -// generate a GD resource - $this->_generateGDImageFromResource(); -// are we cropping? - if($crop_top !== false || $crop_bottom !== false || $crop_left !== false || $crop_right !== false) - { -// crop and check it went ok - if(!$this->crop($crop_top, $crop_bottom, $crop_left, $crop_right)) - { - return false; - } - } -// check the width and height - if($width <= 0 || $height <= 0) - { - return false; - } -// now resize what we have - $resize_resource = imagecreatetruecolor($width, $height); -// copy the portion we want - imagecopyresampled($resize_resource, $this->_gd_resource, 0, 0, 0, 0, $width, $height, $this->_width, $this->_height); -// destroy the old crop resource to free up memory - imagedestroy($this->_gd_resource); -// save the new resource - $this->_gd_resource = $resize_resource; -// update the saved width and height - $this->_width = $width; - $this->_height = $height; - return true; - } - - /** - * Crop the frame. - * @access public - * @param integer $crop_top Remove [croptop] rows of pixels from the top of the frame. - * @param integer $crop_bottom Remove [cropbottom] rows of pixels from the bottom of the frame. - * @param integer $crop_left Remove [cropleft] rows of pixels from the left of the frame. - * @param integer $crop_right Remove [cropright] rows of pixels from the right of the frame. - * @return boolean - */ - public function crop($crop_top=false, $crop_bottom=false, $crop_left=false, $crop_right=false) - { -// generate a GD resource - $this->_generateGDImageFromResource(); -// work out the newwidth and height and positions - $w = $this->_width; - $h = $this->_height; - $x = 0; - $y = 0; - $x_bottom_chord = 0; - if($crop_top !== false) - { - $x = $crop_top; - $h -= $crop_top; - } - if($crop_bottom !== false) - { - $h -= $crop_bottom; - } - if($crop_left !== false) - { - $y = $crop_left; - $w -= $crop_left; - } - if($crop_right !== false) - { - $w -= $crop_left; - } -// is the width and height greater than 0 - if($w < 0 || $h < 0) - { - return false; - } -// create the new image resource - $crop_resource = imagecreatetruecolor($w, $h); -// copy the portion we want - imagecopyresampled($crop_resource, $this->_gd_resource, 0, 0, $x, $y, $w, $h, $w, $h); -// destroy the old resource to free up memory - imagedestroy($this->_gd_resource); -// save the new resource - $this->_gd_resource = $crop_resource; -// update the saved width and height - $this->_width = $w; - $this->_height = $h; - return true; - } - - /** - * Returns a truecolor GD image of the frame. - * @access public - * @return resource Returns a GD resource. - */ - public function toGDImage() - { - $this->_generateGDImageFromResource() - return $this->_gd_resource; - } - - /** - * Returns a GD resource from the current resource type. - * @access private - */ - private function _generateGDImageFromResource() - { -// don't do this if the gd resource is already defined - if($this->_gd_resource === null) - { - switch($this->_resource_type) - { - case 'toolkit' : - $result = $this->_resource->execute(false, false); -// check the return value in-case of error - if($result !== PHPVideoToolkit::RESULT_OK) - { -// throw error - } - $img = array_shift($this->_resource->getLastOutput()); - if(!is_file($img)) - { -// throw error - } - $this->_gd_resource = imagecreatefromjpeg($img); - break; - - case 'file' : - $path_info = pathinfo($this->_resource); - switch(strtolower($path_info['extension'])) - { - case 'jpeg' : - case 'jpg' : - $this->_gd_resource = imagecreatefromjpeg($this->_resource); - break; - case 'gif' : - $this->_gd_resource = imagecreatefromgif($this->_resource); - break; - case 'png' : - $this->_gd_resource = imagecreatefrompng($this->_resource); - break; - default : -// throw error - } - break; - - case 'gd' : -// resource is already gd - break; - } - } - } - - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/join.php b/libraries/phpvideotoolkit/adapters/toolkit/join.php deleted file mode 100644 index 9d038c0..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/join.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - class PHPVideoToolkit_Join - { - function __construct() - { - } - function __destruct() - { - } - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/queue.php b/libraries/phpvideotoolkit/adapters/toolkit/queue.php deleted file mode 100644 index 5248b1c..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/queue.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /** - * This class creates a queue object that will sequentially process a conversion queue. - */ - class PHPVideoToolkit_Queue - { - function __construct() - { - } - function __destruct() - { - } - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/stream.php b/libraries/phpvideotoolkit/adapters/toolkit/stream.php deleted file mode 100644 index cfd3825..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/stream.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - /** - * This class - */ - class PHPVideoToolkit_Stream - { - function __construct() - { - } - function __destruct() - { - } - } diff --git a/libraries/phpvideotoolkit/adapters/toolkit/video.php b/libraries/phpvideotoolkit/adapters/toolkit/video.php deleted file mode 100644 index 759d884..0000000 --- a/libraries/phpvideotoolkit/adapters/toolkit/video.php +++ /dev/null @@ -1,387 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - if(!defined('DS')) - { - define('DS', DIRECTORY_SEPARATOR); - } - - /** - * This is similar in terms to FFmpeg-PHP's ffmpeg_movie, however it is just for video's and not just audio. - */ - class PHPVideoToolkit_Video - { - private $_frame_index = 1; - private $_toolkit = null; - private $_media_data = null; - private $_path_to_media = null; - private $_tmp_directory = null; - - /** - * Class Constructor - * @param string $path_to_media The path to the media file you want to use. - * @param string $tmp_directory The temp directory to which to work from. (remember the trailing slash), default set by PHPVIDEOTOOLKIT_TEMP_DIRECTORY - */ - function __construct($path_to_media, $tmp_directory=PHPVIDEOTOOLKIT_TEMP_DIRECTORY) - { -// init PHPVideoToolkit class - require_once dirname(dirname(dirname(__FILE__))).DS.'phpvideotoolkit.php5.php'; -// store the media path - $this->_path_to_media = $path_to_media; - $this->_tmp_directory = $tmp_directory; -// if the path is infact a class of PHPVideoToolkit then just copy the class - if(get_class($path_to_media) === false) - { - $this->_toolkit = $path_to_media; - } - else - { -// create the toolkit item - $this->_toolkit = new PHPVideoToolkit($tmp_directory); - $this->_toolkit->on_error_die = false; -// set the input - $this->_toolkit->setInputFile($path_to_media); - } - } - - /** - * Destructs any internal processes. - * @access private - */ - function __destruct() - { -// loop through the temp files to remove first as they have to be removed before the dir can be removed - if(!empty($this->_unlink_files)) - { - foreach ($this->_unlink_files as $key=>$file) - { - if(is_file($file)) - { - @unlink($file); - } - } - $this->_unlink_files = array(); - } -// loop through the dirs to remove - if(!empty($this->_unlink_dirs)) - { - foreach ($this->_unlink_dirs as $key=>$dir) - { - if(is_dir($dir)) - { - @rmdir($dir); - } - } - $this->_unlink_dirs = array(); - } - } - - /** - * Loads the meta data for the media file - * @access private - */ - private function _getMediaData() - { - if($this->_media_data === null) - { - $this->_media_data = $this->_toolkit->getFileInfo(); - } - } - - /** - * Return the duration of a movie or audio file in seconds. - * @access public - * @return integer - */ - public function getDuration() - { - $this->_getMediaData(); - return $this->_media_data['duration']['seconds']; - } - - /** - * Return the number of frames in a movie or audio file. - * @access public - * @return integer - */ - public function getFrameCount() - { - return $this->hasVideo() ? $this->_media_data['video']['frame_count'] : -1; - } - - /** - * Return the frame rate of a movie in fps. - * @access public - * @return integer - */ - public function getFrameRate() - { - return $this->hasVideo() ? $this->_media_data['video']['frame_rate'] : -1; - } - - /** - * Return the path and name of the movie file or audio file. - * @access public - * @return string - */ - public function getFilename() - { - return basename($this->_path_to_media); - } - - /** - * Return the height of the movie in pixels. - * @access public - * @return integer - */ - public function getFrameHeight() - { - return $this->hasVideo() && isset($this->_media_data['video']['dimensions']) ? $this->_media_data['video']['dimensions']['height'] : -1; - } - - /** - * Return the width of the movie in pixels. - * @access public - * @return integer - */ - public function getFrameWidth() - { - return $this->hasVideo() && isset($this->_media_data['video']['dimensions']) ? $this->_media_data['video']['dimensions']['width'] : -1; - } - - /** - * Return the pixel format of the movie. - * @access public - * @return mixed string | -1 - */ - public function getPixelFormat() - { - return $this->hasVideo() ? $this->_media_data['video']['pixel_format'] : -1; - } - - /** - * Return the pixel aspect ratio of the movie - * @access public - * @return integer - */ - public function getPixelAspectRatio() - { - return -1; - } - - /** - * Return the bit rate of the movie or audio file in bits per second. - * @access public - * @return integer - */ - public function getBitRate() - { - $this->_getMediaData(); - return isset($this->_media_data['bitrate']) ? $this->_media_data['bitrate'] : -1; - } - - /** - * Return the bit rate of the video in bits per second. - * NOTE: This only works for files with constant bit rate. - * @access public - * @return integer - */ - public function getVideoBitRate() - { - return $this->hasVideo() && isset($this->_media_data['video']['bitrate']) ? $this->_media_data['video']['bitrate'] : -1; - } - - /** - * Return the audio bit rate of the media file in bits per second. - * @access public - * @return integer - */ - public function getAudioBitRate() - { - return $this->hasAudio() && isset($this->_media_data['audio']['bitrate']) ? $this->_media_data['audio']['bitrate'] : -1; - } - - /** - * Return the audio sample rate of the media file in bits per second. - * @access public - * @return integer - */ - public function getAudioSampleRate() - { - return $this->hasAudio() && isset($this->_media_data['audio']['sample_rate']) ? $this->_media_data['audio']['sample_rate'] : -1; - } - - /** - * Return the name of the video codec used to encode this movie as a string. - * @access public - * @param boolean $return_all If true it will return all audio codecs found. - * @return mixed string | array - */ - public function getVideoCodec($return_all=false) - { - return $this->hasVideo() ? $this->_media_data['video']['codec'] : -1; - } - - /** - * Return the name of the audio codec used to encode this movie as a string. - * @access public - * @param boolean $return_all If true it will return all audio codecs found. - * @return mixed string | array - */ - public function getAudioCodec() - { - return $this->hasAudio() ? $this->_media_data['audio']['codec'] : -1; - } - - /** - * Return the number of audio channels in this movie as an integer. - * @access public - * @return integer - */ - public function getAudioChannels() - { - return $this->hasAudio(); - } - - /** - * Return boolean value indicating whether the movie has an audio stream. - * @access public - * @return boolean - */ - public function hasAudio() - { - $this->_getMediaData(); - return isset($this->_media_data['audio']); - } - - /** - * Return boolean value indicating whether the movie has a video stream. - * @access public - * @return boolean - */ - public function hasVideo() - { - $this->_getMediaData(); - return isset($this->_media_data['video']); - } - - public function convert() - { - } - - /** - * This will resize and return an new instance of PHPVideoToolkit_Video. - * @access public - * @return PHPVideoToolkit_Video - */ - public function resize($width, $height=null, $multi_pass_encode=false) - { -// set the instance dimensions - $this->_toolkit->setVideoDimensions($width, $height); -// create a new video toolkit object to return - return new PHPVideoToolkit_Video($this->_toolkit, $this->_tmp_directory); - } - - public function watermark() - { - } - - public function getAudio() - { - } - - public function save($filename, $multi_pass_encode=false, $overwrite_mode=PHPVideoToolkit::OVERWRITE_FAIL) - { - $output_directory, $output_name, - $path_info = pathinfo($filename); -// set the output - $this->_toolkit->setOutput($path_info['dirname'], $path_parts['basename'], $overwrite_mode); - return $this->_toolkit->execute($multi_pass_encode, false); - } - - /** - * Returns a frame from the movie as an PHPVideoToolkit_Frame object. - * Returns false if the frame was not found. - * @access public - * @return mixed boolean | PHPVideoToolkit_Frame - */ - public function getFrame($frame_number=false) - { - if(!$this->hasVideo()) - { - return false; - } - $this->_toolkit->reset(true); - require_once dirname(__FILE__).DS.'frame.php'; - if(!$frame_number) - { - $frame_number = $this->_frame_index; - $this->_frame_index += 1; - } - else - { - $this->_frame_index = $frame_number; - } -// check the frame required exists in the video - if($frame_number > $this->getFrameCount()) - { - return false; - } -// work out the exact frame to take - $frame_rate = $this->getFrameRate(); -// generate a unique name - $this->_toolkit->setOutput($this->_tmp_directory, $this->_toolkit->unique().'-%timecode.jpg', PHPVideoToolkit::OVERWRITE_EXISTING); -// extract the frame and check the extract is ok - if(!($result = $this->_toolkit->extractFrame($frame_number, $frame_rate, '%ft')) - { - return $result; - } -// return the PHPVideoToolkit_Frame instance - return new PHPVideoToolkit_Frame($this->_toolkit); - } - - /** - * Returns the next key frame from the movie as an PHPVideoToolkit_Frame object. - * Returns false if the frame was not found. - * @uses PHPVideoToolkit_Video::getFrame(); - * @access public - * @return mixed boolean | PHPVideoToolkit_Frame - */ - public function getNextKeyFrame() - { - $frame_rate = $this->getFrameRate(); -// work out the next frame - $current_second = floor($frame_number/$frame_rate); - $excess = $frame_number-($seconds * $frame_rate); - $frames_to_next = $frame_rate-$excess; - $this->_frame_index += $frames_to_next; -// get the frame - return $this->getFrame(); - } - - /** - * Return the current frame index. - * @access public - * @return integer - */ - public function getFrameNumber() - { - return $this->_frame_index; - } - } diff --git a/libraries/phpvideotoolkit/adapters/videoto.php b/libraries/phpvideotoolkit/adapters/videoto.php deleted file mode 100644 index 28dee45..0000000 --- a/libraries/phpvideotoolkit/adapters/videoto.php +++ /dev/null @@ -1,473 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @package PHPVideoToolkit - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - if(!defined('DS')) - { - define('DS', DIRECTORY_SEPARATOR); - } - - class VideoTo - { - - private static $_log_files = array(); - private static $_error_messages = array(); - private static $_commands = array(); - private static $_outputs = array(); - - public static function FLV($file, $options=array(), $target_extension='flv') - { -// merge the options with the defaults - $options = array_merge(array( - 'temp_dir' => '/tmp', - 'width' => 320, - 'height' => 240, - 'frequency' => 44100, - 'audio_bitrate' => 64, - 'video_bitrate' => 1200, - 'ratio' => false, // PHPVideoToolkit::RATIO_STANDARD, - 'frame_rate' => 29.7, - 'output_dir' => null, // this doesn't have to be set it can be automatically retreived from 'output_file' - 'output_file' => '#filename.#ext', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'use_multipass' => false, - 'generate_log' => true, - 'log_directory' => null, - 'die_on_error' => false, - 'overwrite_mode' => PHPVideoToolkit::OVERWRITE_FAIL - ), $options); - -// start PHPVideoToolkit class - require_once dirname(dirname(__FILE__)).DS.'phpvideotoolkit.php5.php'; - $toolkit = new PHPVideoToolkit($options['temp_dir']); - $toolkit->on_error_die = $options['die_on_error']; -// get the output directory - if($options['output_dir']) - { - $output_dir = $options['output_dir']; - } - else - { - $output_dir = dirname($options['output_file']); - $output_dir = $output_dir == '.' ? dirname($file) : $output_dir; - } -// get the filename parts - $filename = basename($file); - $filename_minus_ext = substr($filename, 0, strrpos($filename, '.')); -// get the output filename - $output_filename = str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_file'])); - -// set the input file - $ok = $toolkit->setInputFile($file); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - -// set the output dimensions - if($options['ratio'] !== false) - { - $toolkit->setVideoAspectRatio($options['ratio']); - } - $toolkit->setVideoOutputDimensions($options['width'], $options['height']); - $toolkit->setVideoBitRate($options['video_bitrate']); - $toolkit->setVideoFrameRate($options['frame_rate']); - -// set the video to be converted to flv - $toolkit->setFormatToFLV($options['frequency'], $options['audio_bitrate']); - -// set the output details and overwrite if nessecary - $ok = $toolkit->setOutput($output_dir, $output_filename, $options['overwrite_mode']); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - -// execute the ffmpeg command using multiple passes and log the calls and PHPVideoToolkit results - $result = $toolkit->execute($options['use_multipass'], $options['generate_log']); - array_push(self::$_commands, $toolkit->getLastCommand()); - -// check the return value in-case of error - if($result !== PHPVideoToolkit::RESULT_OK) - { -// move the log file to the log directory as something has gone wrong - if($options['generate_log']) - { - $log_dir = $options['log_directory'] ? $options['log_directory'] : $output_dir; - $toolkit->moveLog($log_dir.$filename_minus_ext.'.log'); - array_push(self::$_log_files, $log_dir.$filename_minus_ext.'.log'); - } - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return $result; - } - - array_push(self::$_outputs, $toolkit->getLastOutput()); - -// reset - $toolkit->reset(); - - return $result; - } - - public static function PSP($file, $options=array(), $target_extension='mp4') - { -// merge the options with the defaults - $options = array_merge(array( - 'temp_dir' => '/tmp', - 'width' => 368, - 'height' => 192, - 'frequency' => 44100, - 'audio_bitrate' => 128, - 'video_bitrate' => 1200, - 'ratio' => false, //PHPVideoToolkit::RATIO_STANDARD, - 'frame_rate' => 29.7, - 'output_dir' => null, // this doesn't have to be set it can be automatically retreived from 'output_file' - 'output_file' => '#filename.#ext', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'output_title' => '#filename', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'use_multipass' => false, - 'generate_log' => true, - 'log_directory' => null, - 'die_on_error' => false, - 'overwrite_mode' => PHPVideoToolkit::OVERWRITE_FAIL - ), $options); - -// start PHPVideoToolkit class - require_once dirname(dirname(__FILE__)).DS.'phpvideotoolkit.php5.php'; - $toolkit = new PHPVideoToolkit($options['temp_dir']); - $toolkit->on_error_die = $options['die_on_error']; -// get the output directory - if($options['output_dir']) - { - $output_dir = $options['output_dir']; - } - else - { - $output_dir = dirname($options['output_file']); - $output_dir = $output_dir == '.' ? dirname($file) : $output_dir; - } -// get the filename parts - $filename = basename($file); - $filename_minus_ext = substr($filename, 0, strrpos($filename, '.')); -// get the output filename - $output_filename = str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_file'])); - -// set the input file - $ok = $toolkit->setInputFile($file); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - $toolkit->setFormat(PHPVideoToolkit::FORMAT_PSP); - - $toolkit->setAudioSampleFrequency($options['frequency']); - $toolkit->setAudioBitRate($options['audio_bitrate']); -// $toolkit->addCommand('-acodec', 'libfaac'); -// $toolkit->addCommand('-acodec', 'mp3'); - - $toolkit->setVideoFormat(PHPVideoToolkit::FORMAT_MPEG4); - if($options['ratio'] !== false) - { - $toolkit->setVideoAspectRatio($options['ratio']); - } - $toolkit->setVideoOutputDimensions($options['width'], $options['height']); - $toolkit->setVideoBitRate($options['video_bitrate']); - $toolkit->setVideoFrameRate($options['frame_rate']); - $toolkit->addCommand('-flags', 'loop'); - $toolkit->addCommand('-trellis', '2'); - $toolkit->addCommand('-partitions', 'parti4x4+parti8x8+partp4x4+partp8x8+partb8x8'); - $toolkit->addCommand('-coder', '1'); - $toolkit->addCommand('-mbd', '2'); - $toolkit->addCommand('-cmp', '2'); - $toolkit->addCommand('-subcmp', '2'); - $toolkit->addCommand('-title', str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_title']))); - -// set the output details and overwrite if nessecary - $ok = $toolkit->setOutput($output_dir, $output_filename, $options['overwrite_mode']); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - -// execute the ffmpeg command using multiple passes and log the calls and PHPVideoToolkit results - $result = $toolkit->execute($options['use_multipass'], $options['generate_log']); - array_push(self::$_commands, $toolkit->getLastCommand()); - -// check the return value in-case of error - if($result !== PHPVideoToolkit::RESULT_OK) - { -// move the log file to the log directory as something has gone wrong - if($options['generate_log']) - { - $log_dir = $options['log_directory'] ? $options['log_directory'] : $output_dir; - $toolkit->moveLog($log_dir.$filename_minus_ext.'.log'); - array_push(self::$_log_files, $log_dir.$filename_minus_ext.'.log'); - } - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return $result; - } - - array_push(self::$_outputs, $toolkit->getLastOutput()); - -// reset - $toolkit->reset(); - - return $result; - } - - public static function iPod($file, $options=array(), $target_extension='mp4') - { -// merge the options with the defaults - $options = array_merge(array( - 'temp_dir' => '/tmp', - 'width' => 320, - 'height' => 240, - 'frequency' => 44100, - 'audio_bitrate' => 128, - 'video_bitrate' => 1200, - 'ratio' => false, //PHPVideoToolkit::RATIO_STANDARD, - 'frame_rate' => 29.7, - 'output_dir' => null, // this doesn't have to be set it can be automatically retreived from 'output_file' - 'output_file' => '#filename.#ext', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'output_title' => '#filename', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'use_multipass' => false, - 'generate_log' => true, - 'log_directory' => null, - 'die_on_error' => false, - 'overwrite_mode' => PHPVideoToolkit::OVERWRITE_FAIL - ), $options); - -// start PHPVideoToolkit class - require_once dirname(dirname(__FILE__)).DS.'phpvideotoolkit.php5.php'; - $toolkit = new PHPVideoToolkit($options['temp_dir']); - $toolkit->on_error_die = $options['die_on_error']; -// get the output directory - if($options['output_dir']) - { - $output_dir = $options['output_dir']; - } - else - { - $output_dir = dirname($options['output_file']); - $output_dir = $output_dir == '.' ? dirname($file) : $output_dir; - } -// get the filename parts - $filename = basename($file); - $filename_minus_ext = substr($filename, 0, strrpos($filename, '.')); -// get the output filename - $output_filename = str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_file'])); - -// set the input file - $ok = $toolkit->setInputFile($file); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - $toolkit->setFormat(PHPVideoToolkit::FORMAT_MP4); - - $toolkit->setAudioSampleFrequency($options['frequency']); - $toolkit->setAudioBitRate($options['audio_bitrate']); -// $toolkit->addCommand('-acodec', 'libfaac'); -// $toolkit->addCommand('-acodec', 'mp3'); - - $toolkit->setVideoFormat(PHPVideoToolkit::FORMAT_MPEG4); - if($options['ratio'] !== false) - { - $toolkit->setVideoAspectRatio($options['ratio']); - } - $toolkit->setVideoOutputDimensions($options['width'], $options['height']); - $toolkit->setVideoFrameRate($options['frame_rate']); - $toolkit->addCommand('-mbd', '2'); - $toolkit->addCommand('-flags', '+4mv+trell'); - $toolkit->addCommand('-aic', '2'); - $toolkit->addCommand('-cmp', '2'); - $toolkit->addCommand('-subcmp', '2'); - - $toolkit->addCommand('-title', str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_title']))); - -// set the output details and overwrite if nessecary - $ok = $toolkit->setOutput($output_dir, $output_filename, $options['overwrite_mode']); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - -// execute the ffmpeg command using multiple passes and log the calls and PHPVideoToolkit results - $result = $toolkit->execute($options['use_multipass'], $options['generate_log']); - array_push(self::$_commands, $toolkit->getLastCommand()); - -// check the return value in-case of error - if($result !== PHPVideoToolkit::RESULT_OK) - { -// move the log file to the log directory as something has gone wrong - if($options['generate_log']) - { - $log_dir = $options['log_directory'] ? $options['log_directory'] : $output_dir; - $toolkit->moveLog($log_dir.$filename_minus_ext.'.log'); - array_push(self::$_log_files, $log_dir.$filename_minus_ext.'.log'); - } - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return $result; - } - - array_push(self::$_outputs, $toolkit->getLastOutput()); - -// reset - $toolkit->reset(); - - return $result; - } - - public static function gif($file, $options=array(), $target_extension='gif') - { -// merge the options with the defaults - $options = array_merge(array( - 'temp_dir' => '/tmp', - 'width' => 320, - 'height' => 240, - 'ratio' => false, //PHPVideoToolkit::RATIO_STANDARD, - 'frame_rate' => 1, - 'loop_output' => 0, // 0 will loop endlessly - 'output_dir' => null, // this doesn't have to be set it can be automatically retreived from 'output_file' - 'output_file' => '#filename.#ext', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'output_title' => '#filename', // you can use #filename to automagically hold the filename and #ext to automagically hold the target format extension - 'use_multipass' => false, - 'generate_log' => true, - 'log_directory' => null, - 'die_on_error' => false, - 'overwrite_mode' => PHPVideoToolkit::OVERWRITE_FAIL - ), $options); - -// start PHPVideoToolkit class - require_once dirname(dirname(__FILE__)).DS.'phpvideotoolkit.php5.php'; - $toolkit = new PHPVideoToolkit($options['temp_dir']); - $toolkit->on_error_die = $options['die_on_error']; -// get the output directory - if($options['output_dir']) - { - $output_dir = $options['output_dir']; - } - else - { - $output_dir = dirname($options['output_file']); - $output_dir = $output_dir == '.' ? dirname($file) : $output_dir; - } -// get the filename parts - $filename = basename($file); - $filename_minus_ext = substr($filename, 0, strrpos($filename, '.')); -// get the output filename - $output_filename = str_replace(array('#filename', '#ext'), array($filename_minus_ext, $target_extension), basename($options['output_file'])); - -// set the input file - $ok = $toolkit->setInputFile($file); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - $toolkit->setFormat(PHPVideoToolkit::FORMAT_GIF); - - $toolkit->disableAudio(); - - if($options['ratio'] !== false) - { - $toolkit->setVideoAspectRatio($options['ratio']); - } - $toolkit->setVideoOutputDimensions($options['width'], $options['height']); - $toolkit->setVideoFrameRate($options['frame_rate']); - $toolkit->addCommand('-loop_output', $options['loop_output']); - -// set the output details and overwrite if nessecary - $ok = $toolkit->setOutput($output_dir, $output_filename, $options['overwrite_mode']); -// check the return value in-case of error - if(!$ok) - { - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return false; - } - -// execute the ffmpeg command using multiple passes and log the calls and PHPVideoToolkit results - $result = $toolkit->execute($options['use_multipass'], $options['generate_log']); - array_push(self::$_commands, $toolkit->getLastCommand()); - -// check the return value in-case of error - if($result !== PHPVideoToolkit::RESULT_OK) - { -// move the log file to the log directory as something has gone wrong - if($options['generate_log']) - { - $log_dir = $options['log_directory'] ? $options['log_directory'] : $output_dir; - $toolkit->moveLog($log_dir.$filename_minus_ext.'.log'); - array_push(self::$_log_files, $log_dir.$filename_minus_ext.'.log'); - } - $toolkit->reset(); - array_push(self::$_error_messages, $toolkit->getLastError()); - return $result; - } - - array_push(self::$_outputs, $toolkit->getLastOutput()); - -// reset - $toolkit->reset(); - - return $result; - } - - public static function getOutput($all=false) - { - return $all ? self::$_outputs : self::$_outputs[count(self::$_outputs)-1]; - } - - public static function getCommand($all=false) - { - return $all ? self::$_commands : self::$_commands[count(self::$_commands)-1]; - } - - public static function getError($all=false) - { - return $all ? self::$_error_messages : self::$_error_messages[count(self::$_error_messages)-1]; - } - - public static function getLogFile($all=false) - { - return $all ? self::$_log_files : self::$_log_files[count(self::$_log_files)-1]; - } - - }
\ No newline at end of file diff --git a/libraries/phpvideotoolkit/phpvideotoolkit.php4.php b/libraries/phpvideotoolkit/phpvideotoolkit.php4.php deleted file mode 100644 index c476260..0000000 --- a/libraries/phpvideotoolkit/phpvideotoolkit.php4.php +++ /dev/null @@ -1,3599 +0,0 @@ -<?php - - /* SVN FILE: $Id$ */ - - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * - * @license BSD - * @copyright Copyright (c) 2008 Oliver Lillie <http://www.buggedcom.co.uk> - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software - * is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @package PHPVideoToolkit (was called ffmpeg) - * @version 0.1.8 - * @changelog SEE CHANGELOG - * @abstract This class can be used in conjunction with several server binary libraries to manipulate video and audio - * through PHP. It is not intended to solve any particular problems, however you may find it useful. This php class - * is in no way associated with the actual FFmpeg releases. Any mistakes contained in this php class are mine and mine - * alone. - * - * Please Note: There are several prerequisites that are required before this class can be used as an aid to manipulate - * video and audio. You must at the very least have FFMPEG compiled on your server. If you wish to use this class for FLV - * manipulation you must compile FFMPEG with LAME and Ruby's FLVTOOL2. I cannot answer questions regarding the install of - * the server binaries needed by this class. I had too learn the hard way and it isn't easy, however it is a good learning - * experience. For those of you who do need help read the install.txt file supplied along side this class. It wasn't written - * by me however I found it useful when installing ffmpeg for the first time. The original source for the install.txt file - * is located http://www.luar.com.hk/blog/?p=669 and the author is Lunar. - * - * @see install.txt - * - * @uses ffmpeg http://ffmpeg.sourceforge.net/ - * @uses lame http://lame.sourceforge.net/ - * @uses flvtool2 http://www.inlet-media.de/flvtool2 (and ruby http://www.ruby-lang.org/en/) - * - * @config examples/example-config.php Please edit this files in order for the examples to work. - * @example examples/example01.php Converts video to Flash Video (ie FLV). - * @example examples/example02.php Screen grabs video frames. - * @example examples/example03.php Compile a movie from multiple jpegs - * @example examples/example04.php Watermark a video. - * @example examples/example05.php Access media metadata without using the ffmpeg-php library. - * @example examples/example06.php Extract audio from video. - * @example examples/example07.php Join multiple videos together. - * @example examples/example08.php Easy video conversion to common formats using the adapters. - * @example examples/example09.php Shows you how to access the information about your ffmpeg installation. - * @example examples/example10.php Shows you how to extract a specific frame from a movie. - * @example examples/example11.php Shows you how to use the ffmpeg-php adapters to provide a pure php emulation of ffmpeg-php. - * @example examples/example12.php Shows you how to manipulate/format timecode strings. - * @example examples/example13.php This demonstrates how to simply create a FLV stream script. - */ - - if(!defined('DS')) - { - define('DS', DIRECTORY_SEPARATOR); - } - - /** - * Set the ffmpeg binary path - */ - if(!defined('PHPVIDEOTOOLKIT_FFMPEG_BINARY')) - { - define('PHPVIDEOTOOLKIT_FFMPEG_BINARY', '/usr/local/bin/ffmpeg'); - } - /** - * Set the flvtool2 binary path - */ - if(!defined('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY')) - { - define('PHPVIDEOTOOLKIT_FLVTOOLS_BINARY', '/usr/bin/flvtool2'); - } - /** - * Set the watermark vhook path - */ - if(!defined('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK')) - { - define('PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK', '/usr/local/lib/vhook/watermark.so'); - } - /** - * Set the memcoder path - */ - if(!defined('PHPVIDEOTOOLKIT_MENCODER_BINARY')) - { - define('PHPVIDEOTOOLKIT_MENCODER_BINARY', '/usr/local/bin/mencoder'); - } - - /** - * Codec support constants - */ - define('PHPVIDEOTOOLKIT_ENCODE', 'encode'); - define('PHPVIDEOTOOLKIT_DECODE', 'decode'); - - /** - * Process Results from PHPVideoToolkit::execute - */ -// any return value with this means everything is ok - define('PHPVIDEOTOOLKIT_RESULT_OK', true); -// any return value with this means the file has been processed/converted ok however it was -// not able to be written to the output address. If this occurs you will need to move the -// processed file manually from the temp location - define('PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE', -1); - - /** - * Overwrite constants used in setOutput - */ - define('PHPVIDEOTOOLKIT_OVERWRITE_FAIL', 'fail'); - define('PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE', 'preserve'); - define('PHPVIDEOTOOLKIT_OVERWRITE_EXISTING', 'existing'); - define('PHPVIDEOTOOLKIT_OVERWRITE_UNIQUE', 'unique'); - - /** - * Formats supported - * 3g2 3gp2 format - * 3gp 3gp format - * aac ADTS AAC - * aiff Audio IFF - * amr 3gpp amr file format - * asf asf format - * avi avi format - * flv flv format - * gif GIF Animation - * mov mov format - * mov,mp4,m4a,3gp,3g2,mj2 QuickTime/MPEG4/Motion JPEG 2000 format - * mp2 MPEG audio layer 2 - * mp3 MPEG audio layer 3 - * mp4 mp4 format - * mpeg MPEG1 System format - * mpeg1video MPEG video - * mpeg2video MPEG2 video - * mpegvideo MPEG video - * psp psp mp4 format - * rm rm format - * swf Flash format - * vob MPEG2 PS format (VOB) - * wav wav format - * jpeg mjpeg format - * yuv4mpegpipe yuv4mpegpipe format - */ - define('PHPVIDEOTOOLKIT_FORMAT_3GP2', '3g2'); - define('PHPVIDEOTOOLKIT_FORMAT_3GP', '3gp'); - define('PHPVIDEOTOOLKIT_FORMAT_AAC', 'aac'); - define('PHPVIDEOTOOLKIT_FORMAT_AIFF', 'aiff'); - define('PHPVIDEOTOOLKIT_FORMAT_AMR', 'amr'); - define('PHPVIDEOTOOLKIT_FORMAT_ASF', 'asf'); - define('PHPVIDEOTOOLKIT_FORMAT_AVI', 'avi'); - define('PHPVIDEOTOOLKIT_FORMAT_FLV', 'flv'); - define('PHPVIDEOTOOLKIT_FORMAT_GIF', 'gif'); - define('PHPVIDEOTOOLKIT_FORMAT_MJ2', 'mj2'); - define('PHPVIDEOTOOLKIT_FORMAT_MP2', 'mp2'); - define('PHPVIDEOTOOLKIT_FORMAT_MP3', 'mp3'); - define('PHPVIDEOTOOLKIT_FORMAT_MP4', 'mp4'); - define('PHPVIDEOTOOLKIT_FORMAT_MPEG4', 'mpeg4'); - define('PHPVIDEOTOOLKIT_FORMAT_M4A', 'm4a'); - define('PHPVIDEOTOOLKIT_FORMAT_MPEG', 'mpeg'); - define('PHPVIDEOTOOLKIT_FORMAT_MPEG1', 'mpeg1video'); - define('PHPVIDEOTOOLKIT_FORMAT_MPEG2', 'mpeg2video'); - define('PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO', 'mpegvideo'); - define('PHPVIDEOTOOLKIT_FORMAT_PSP', 'psp'); - define('PHPVIDEOTOOLKIT_FORMAT_RM', 'rm'); - define('PHPVIDEOTOOLKIT_FORMAT_SWF', 'swf'); - define('PHPVIDEOTOOLKIT_FORMAT_VOB', 'vob'); - define('PHPVIDEOTOOLKIT_FORMAT_WAV', 'wav'); - define('PHPVIDEOTOOLKIT_FORMAT_JPG', 'mjpeg'); - define('PHPVIDEOTOOLKIT_FORMAT_Y4MP', 'yuv4mpegpipe'); - - /** - * Size Presets - */ - define('PHPVIDEOTOOLKIT_SIZE_SAS', 'SameAsSource'); - define('PHPVIDEOTOOLKIT_SIZE_SQCIF', '128x96'); - define('PHPVIDEOTOOLKIT_SIZE_QCIF', '176x144'); - define('PHPVIDEOTOOLKIT_SIZE_CIF', '352x288'); - define('PHPVIDEOTOOLKIT_SIZE_4CIF', '704x576'); - define('PHPVIDEOTOOLKIT_SIZE_QQVGA', '160x120'); - define('PHPVIDEOTOOLKIT_SIZE_QVGA', '320x240'); - define('PHPVIDEOTOOLKIT_SIZE_VGA', '640x480'); - define('PHPVIDEOTOOLKIT_SIZE_SVGA', '800x600'); - define('PHPVIDEOTOOLKIT_SIZE_XGA', '1024x768'); - define('PHPVIDEOTOOLKIT_SIZE_UXGA', '1600x1200'); - define('PHPVIDEOTOOLKIT_SIZE_QXGA', '2048x1536'); - define('PHPVIDEOTOOLKIT_SIZE_SXGA', '1280x1024'); - define('PHPVIDEOTOOLKIT_SIZE_QSXGA', '2560x2048'); - define('PHPVIDEOTOOLKIT_SIZE_HSXGA', '5120x4096'); - define('PHPVIDEOTOOLKIT_SIZE_WVGA', '852x480'); - define('PHPVIDEOTOOLKIT_SIZE_WXGA', '1366x768'); - define('PHPVIDEOTOOLKIT_SIZE_WSXGA', '1600x1024'); - define('PHPVIDEOTOOLKIT_SIZE_WUXGA', '1920x1200'); - define('PHPVIDEOTOOLKIT_SIZE_WOXGA', '2560x1600'); - define('PHPVIDEOTOOLKIT_SIZE_WQSXGA', '3200x2048'); - define('PHPVIDEOTOOLKIT_SIZE_WQUXGA', '3840x2400'); - define('PHPVIDEOTOOLKIT_SIZE_WHSXGA', '6400x4096'); - define('PHPVIDEOTOOLKIT_SIZE_WHUXGA', '7680x4800'); - define('PHPVIDEOTOOLKIT_SIZE_CGA', '320x200'); - define('PHPVIDEOTOOLKIT_SIZE_EGA', '640x350'); - define('PHPVIDEOTOOLKIT_SIZE_HD480', '852x480'); - define('PHPVIDEOTOOLKIT_SIZE_HD720', '1280x720'); - define('PHPVIDEOTOOLKIT_SIZE_HD1080', '1920x1080'); - - /** - * Ratio Presets - */ - define('PHPVIDEOTOOLKIT_RATIO_STANDARD', '4:3'); - define('PHPVIDEOTOOLKIT_RATIO_WIDE', '16:9'); - define('PHPVIDEOTOOLKIT_RATIO_CINEMATIC', '1.85'); - - - /** - * Audio Channel Presets - */ - define('PHPVIDEOTOOLKIT_AUDIO_STEREO', 2); - define('PHPVIDEOTOOLKIT_AUDIO_MONO', 1); - - /** - * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk> - * @license BSD - * @package PHPVideoToolkit (was called ffmpeg) - */ - class PHPVideoToolkit - { - - var $version = '0.1.8'; - - /** - * Error strings - */ - var $_messages = array( - - 'generic_temp_404' => 'The temporary directory does not exist.', - 'generic_temp_writable' => 'The temporary directory is not write-able by the web server.', - - 'getFileInfo_no_input' => 'Input file does not exist so no information can be retrieved.', - 'inputFileHasVideo_no_input' => 'Input file does not exist so no information can be retrieved.', - 'inputFileHasAudio_no_input' => 'Input file does not exist so no information can be retrieved.', - 'setInputFile_file_existence' => 'Input file "#file" does not exist', - 'extractAudio_valid_format' => 'Value "#format" set from $toolkit->extractAudio, is not a valid audio format. Valid values ffmpeg PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A or PHPVIDEOTOOLKIT_FORMAT_WAV. If you wish to specifically try to set another format you should use the advanced function $toolkit->addCommand. Set $command to "-f" and $argument to your required value.', - 'extractFrame_video_frame_rate_404' => 'You have attempted to extract a thumbnail from a video while automagically guessing the framerate of the video, but the framerate could not be accessed. You can remove this error by manually setting the frame rate of the video.', - 'extractFrame_video_info_404' => 'You have attempted to extract a thumbnail from a video and check to see if the thumbnail exists, however it was not possible to access the video information. Please check your temporary directory permissions for read/write access by the webserver.', - 'extractFrame_video_frame_count' => 'You have attempted to extract a thumbnail from a video but the thumbnail you are trying to extract does not exist in the video.', - 'extractFrames_video_begin_frame_count' => 'You have attempted to extract thumbnails from a video but the thumbnail you are trying to start the extraction from does not exist in the video.', - 'extractFrames_video_end_frame_count' => 'You have attempted to extract thumbnails from a video but the thumbnail you are trying to end the extraction at does not exist in the video.', - 'setFormat_valid_format' => 'Value "#format" set from $toolkit->setFormat, is not a valid format. Valid values are PHPVIDEOTOOLKIT_FORMAT_3GP2, PHPVIDEOTOOLKIT_FORMAT_3GP, PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_AMR, PHPVIDEOTOOLKIT_FORMAT_ASF, PHPVIDEOTOOLKIT_FORMAT_AVI, PHPVIDEOTOOLKIT_FORMAT_FLV, PHPVIDEOTOOLKIT_FORMAT_GIF, PHPVIDEOTOOLKIT_FORMAT_MJ2, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A, PHPVIDEOTOOLKIT_FORMAT_MPEG, PHPVIDEOTOOLKIT_FORMAT_MPEG1, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO, PHPVIDEOTOOLKIT_FORMAT_PSP, PHPVIDEOTOOLKIT_FORMAT_RM, PHPVIDEOTOOLKIT_FORMAT_SWF, PHPVIDEOTOOLKIT_FORMAT_VOB, PHPVIDEOTOOLKIT_FORMAT_WAV, PHPVIDEOTOOLKIT_FORMAT_JPG. If you wish to specifically try to set another format you should use the advanced function $toolkit->addCommand. Set $command to "-f" and $argument to your required value.', - 'setAudioChannels_valid_channels' => 'Value "#channels" set from $toolkit->setAudioChannels, is not a valid integer. Valid values are 1, or 2. If you wish to specifically try to set another channels value you should use the advanced function $toolkit->addCommand. Set $command to "-ac" and $argument to your required value.', - 'setAudioSampleFrequency_valid_frequency' => 'Value "#frequency" set from $toolkit->setAudioSampleFrequency, is not a valid integer. Valid values are 11025, 22050, 44100. If you wish to specifically try to set another frequency you should use the advanced function $toolkit->addCommand. Set $command to "-ar" and $argument to your required value.', - 'setAudioFormat_valid_format' => 'Value "#format" set from $toolkit->setAudioFormat, is not a valid format. Valid values are PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_AMR, PHPVIDEOTOOLKIT_FORMAT_ASF, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_RM, PHPVIDEOTOOLKIT_FORMAT_WAV. If you wish to specifically try to set another format you should use the advanced function $toolkit->addCommand. Set $command to "-acodec" and $argument to your required value.', - 'setVideoFormat_valid_format' => 'Value "#format" set from $toolkit->setAudioFormat, is not a valid format. Valid values are PHPVIDEOTOOLKIT_FORMAT_3GP2, PHPVIDEOTOOLKIT_FORMAT_3GP, PHPVIDEOTOOLKIT_FORMAT_AVI, PHPVIDEOTOOLKIT_FORMAT_FLV, PHPVIDEOTOOLKIT_FORMAT_GIF, PHPVIDEOTOOLKIT_FORMAT_MJ2, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A, PHPVIDEOTOOLKIT_FORMAT_MPEG, PHPVIDEOTOOLKIT_FORMAT_MPEG1, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO. If you wish to specifically try to set another format you should use the advanced function $toolkit->addCommand. Set $command to "-vcodec" and $argument to your required value.', - 'setAudioBitRate_valid_bitrate' => 'Value "#bitrate" set from $toolkit->setAudioBitRate, is not a valid integer. Valid values are 16, 32, 64, 128. If you wish to specifically try to set another bitrate you should use the advanced function $toolkit->addCommand. Set $command to "-ab" and $argument to your required value.', - 'prepareImagesForConversionToVideo_one_img' => 'When compiling a movie from a series of images, you must include at least one image.', - 'prepareImagesForConversionToVideo_img_404' => '"#img" does not exist.', - 'prepareImagesForConversionToVideo_img_copy' => '"#img" can not be copied to "#tmpfile"', - 'prepareImagesForConversionToVideo_img_type' => 'The images can not be prepared for conversion to video. Please make sure all images are of the same type, ie gif, png, jpeg and then try again.', - 'setVideoOutputDimensions_valid_format' => 'Value "#format" set from $toolkit->setVideoOutputDimensions, is not a valid preset dimension. Valid values are PHPVIDEOTOOLKIT_SIZE_SQCIF, PHPVIDEOTOOLKIT_SIZE_SAS, PHPVIDEOTOOLKIT_SIZE_QCIF, PHPVIDEOTOOLKIT_SIZE_CIF, PHPVIDEOTOOLKIT_SIZE_4CIF, PHPVIDEOTOOLKIT_SIZE_QQVGA, PHPVIDEOTOOLKIT_SIZE_QVGA, PHPVIDEOTOOLKIT_SIZE_VGA, PHPVIDEOTOOLKIT_SIZE_SVGA, PHPVIDEOTOOLKIT_SIZE_XGA, PHPVIDEOTOOLKIT_SIZE_UXGA, PHPVIDEOTOOLKIT_SIZE_QXGA, PHPVIDEOTOOLKIT_SIZE_SXGA, PHPVIDEOTOOLKIT_SIZE_QSXGA, PHPVIDEOTOOLKIT_SIZE_HSXGA, PHPVIDEOTOOLKIT_SIZE_WVGA, PHPVIDEOTOOLKIT_SIZE_WXGA, PHPVIDEOTOOLKIT_SIZE_WSXGA, PHPVIDEOTOOLKIT_SIZE_WUXGA, PHPVIDEOTOOLKIT_SIZE_WOXGA, PHPVIDEOTOOLKIT_SIZE_WQSXGA, PHPVIDEOTOOLKIT_SIZE_WQUXGA, PHPVIDEOTOOLKIT_SIZE_WHSXGA, PHPVIDEOTOOLKIT_SIZE_WHUXGA, PHPVIDEOTOOLKIT_SIZE_CGA, PHPVIDEOTOOLKIT_SIZE_EGA, PHPVIDEOTOOLKIT_SIZE_HD480, PHPVIDEOTOOLKIT_SIZE_HD720, PHPVIDEOTOOLKIT_SIZE_HD1080. You can also manually set the width and height.', - 'setVideoOutputDimensions_sas_dim' => 'It was not possible to determine the input video dimensions so it was not possible to continue. If you wish to override this error please change the call to setVideoOutputDimensions and add a true argument to the arguments list... setVideoOutputDimensions(PHPVIDEOTOOLKIT_SIZE_SAS, true);', - 'setVideoOutputDimensions_valid_integer' => 'You tried to set the video output dimensions to an odd number. FFmpeg requires that the video output dimensions are of event value and divisible by 2. ie 2, 4, 6,... etc', - 'setVideoAspectRatio_valid_ratio' => 'Value "#ratio" set from $toolkit->setVideoOutputDimensions, is not a valid preset dimension. Valid values are PHPVIDEOTOOLKIT_RATIO_STANDARD, PHPVIDEOTOOLKIT_RATIO_WIDE, PHPVIDEOTOOLKIT_RATIO_CINEMATIC. If you wish to specifically try to set another video aspect ratio you should use the advanced function $toolkit->addCommand. Set $command to "-aspect" and $argument to your required value.', - 'addWatermark_img_404' => 'Watermark file "#watermark" does not exist.', - 'addWatermark_vhook_disabled' => 'Vhooking is not enabled in your FFmpeg binary. In order to allow video watermarking you must have FFmpeg compiled with --enable-vhook set. You can however watermark any extracted images using GD. To enable frame watermarking, call $toolkit->addGDWatermark($file) before you execute the extraction.', - 'addVideo_file_404' => 'File "#file" does not exist.', - 'setOutput_output_dir_404' => 'Output directory "#dir" does not exist!', - 'setOutput_output_dir_writable' => 'Output directory "#dir" is not writable!', - 'setOutput_%_missing' => 'The output of this command will be images yet you have not included the "%index" or "%timecode" in the $output_name.', - 'setOutput_%d_depreciated' => 'The use of %d in the output file name is now depreciated. Please use %index. Number padding is still supported. You may also use %timecode instead to add a timecode to the filename.', - 'execute_input_404' => 'Execute error. Input file missing.', - 'execute_output_not_set' => 'Execute error. Output not set.', - 'execute_temp_unwritable' => 'Execute error. The tmp directory supplied is not writable.', - 'execute_overwrite_process' => 'Execute error. A file exists in the temp directory and is of the same name as this process file. It will conflict with this conversion. Conversion stopped.', - 'execute_overwrite_fail' => 'Execute error. Output file exists. Process halted. If you wish to automatically overwrite files set the third argument in "PHPVideoToolkit::setOutput();" to "PHPVIDEOTOOLKIT_OVERWRITE_EXISTING".', - 'execute_partial_error' => 'Execute error. Output for file "#input" encountered a partial error. Files were generated, however one or more of them were empty.', - 'execute_image_error' => 'Execute error. Output for file "#input" was not found. No images were generated.', - 'execute_output_404' => 'Execute error. Output for file "#input" was not found. Please check server write permissions and/or available codecs compiled with FFmpeg. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().', - 'execute_output_empty' => 'Execute error. Output for file "#input" was found, but the file contained no data. Please check the available codecs compiled with FFmpeg can support this type of conversion. You can check the encode decode availability by inspecting the output array from PHPVideoToolkit::getFFmpegInfo().', - 'execute_image_file_exists' => 'Execute error. There is a file name conflict. The file "#file" already exists in the filesystem. If you wish to automatically overwrite files set the third argument in "PHPVideoToolkit::setOutput();" to "PHPVIDEOTOOLKIT_OVERWRITE_EXISTING".', - 'execute_result_ok_but_unwritable' => 'Process Partially Completed. The process successfully completed however it was not possible to output to "#output". The output was left in the temp directory "#process" for a manual file movement.', - 'execute_result_ok' => 'Process Completed. The process successfully completed. Output was generated to "#output".', - - 'ffmpeg_log_ffmpeg_output' => 'OUTPUT', - 'ffmpeg_log_ffmpeg_result' => 'RESULT', - 'ffmpeg_log_ffmpeg_command' => 'COMMAND', - 'ffmpeg_log_ffmpeg_join_gunk' => 'FFMPEG JOIN OUTPUT', - 'ffmpeg_log_ffmpeg_gunk' => 'FFMPEG OUTPUT', - 'ffmpeg_log_separator' => '-------------------------------' - - ); - - /** - * A public var that is to the information available about - * the current ffmpeg compiled binary. - * @var mixed - * @access public - */ - var $ffmpeg_info = false; - - /** - * A public var that determines if the ffmpeg binary has been found. The default value - * is null unless getFFmpegInfo is called whereby depending on the results it is set to - * true or false - * @var mixed - * @access public - */ - var $ffmpeg_found = null; - - /** - * A private var that contains the info of any file that is accessed by PHPVideoToolkit::getFileInfo(); - * @var array - * @access private - */ - var $_file_info = array(); - - /** - * Determines what happens when an error occurs - * @var boolean If true then the script will die, if not false is return by the error - * @access public - */ - var $on_error_die = false; - - /** - * Holds the log file name - * @var string - * @access private - */ - var $_log_file = null; - - /** - * Determines if when outputting image frames if the outputted files should have the %d number - * replaced with the frames timecode. - * @var boolean If true then the files will be renamed. - * @access public - */ - var $image_output_timecode = true; - - /** - * Holds the timecode separator for when using $image_output_timecode = true - * Not all systems allow ':' in filenames. - * @var string - * @access public - */ - var $timecode_seperator_output = '-'; - - /** - * Holds the starting time code when outputting image frames. - * @var string The timecode hh(n):mm:ss:ff - * @access private - */ - var $_image_output_timecode_start = '00:00:00.00'; - - /** - * The format in which the image %timecode placeholder string is outputted. - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * NOTE; there are special characters that will be replace by PHPVideoToolkit::$timecode_seperator_output, these characters are - * - : - * - . - * @var string - * @access public - */ - var $image_output_timecode_format = '%hh-%mm-%ss-%fn'; - - /** - * Holds the fps of image extracts - * @var integer - * @access private - */ - var $_image_output_timecode_fps = 1; - - /** - * Holds the current execute commands that will need to be combined - * @var array - * @access private - */ - var $_commands = array(); - - /** - * Holds the commands executed - * @var array - * @access private - */ - var $_processed = array(); - - /** - * Holds the file references to those that have been processed - * @var array - * @access private - */ - var $_files = array(); - - /** - * Holds the errors encountered - * @access private - * @var array - */ - var $_errors = array(); - - /** - * Holds the input file / input file sequence - * @access private - * @var string - */ - var $_input_file = null; - - /** - * Holds the output file / output file sequence - * @access private - * @var string - */ - var $_output_address = null; - - /** - * Holds the process file / process file sequence - * @access private - * @var string - */ - var $_process_address = null; - - /** - * Temporary filename prefix - * @access private - * @var string - */ - var $_tmp_file_prefix = 'tmp_'; - - /** - * Holds the temporary directory name - * @access private - * @var string - */ - var $_tmp_directory = null; - - /** - * Holds the directory paths that need to be removed by the ___destruct function - * @access private - * @var array - */ - var $_unlink_dirs = array(); - - /** - * Holds the file paths that need to be deleted by the ___destruct function - * @access private - * @var array - */ - var $_unlink_files = array(); - - /** - * Holds the timer start micro-float. - * @access private - * @var integer - */ - var $_timer_start = 0; - - /** - * Holds the times taken to process each file. - * @access private - * @var array - */ - var $_timers = array(); - - /** - * Holds the times taken to process each file. - * @access private - * @var constant - */ - var $_overwrite_mode = null; - - /** - * Holds a integer value that flags if the image extraction is just a single frame. - * @access private - * @var integer - */ - var $_single_frame_extraction = null; - - /** - * Holds the watermark file that is used to watermark any outputted images via GD. - * @access private - * @var string - */ - var $_watermark_url = null; - - /** - * Holds the watermark options used to watermark any outputted images via GD. - * @access private - * @var array - */ - var $_watermark_options = null; - - /** - * Holds the number of files processed per run. - * @access private - * @var integer - */ - var $_process_file_count = 0; - - /** - * Holds the times taken to process each file. - * @access private - * @var array - */ - var $_post_processes = array(); - - /** - * Holds commands should be sent added to the exec before the input file, this is by no means a definitive list - * of all the ffmpeg commands, as it only utilizes the ones in use by this class. Also only commands that have - * specific required places are entered in the arrays below. Anything not in these arrays will be treated as an - * after-input item. - * @access private - * @var array - */ -// var $_cmds_before_input = array(); - var $_cmds_before_input = array('-inputr'); -// var $_cmds_before_input = array('-r', '-f'); - - /** - * Constructs the class and sets the temporary directory. - * - * @access private - * @param string $tmp_directory A full absolute path to you temporary directory - */ - function PHPVideoToolkit($tmp_directory='/tmp/') - { - $this->_tmp_directory = $tmp_directory; -// emulate php5 destructors - register_shutdown_function(array(&$this, '__destruct')); - } - - function microtimeFloat() - { - list($usec, $sec) = explode(" ", microtime()); - return ((float) $usec + (float) $sec); - } - - /** - * Resets the class - * - * @access public - * @param boolean $keep_input_file Determines whether or not to reset the input file currently set. - */ - function reset($keep_input_file=false, $keep_processes=false) - { - if($keep_input_file === false) - { - $this->_input_file = null; - } - if($keep_processes === false) - { - $this->_post_processes = array(); - } - $this->_single_frame_extraction = null; - $this->_output_address = null; - $this->_process_address = null; - $this->_log_file = null; - $this->_commands = array(); - $this->_timer_start = 0; - $this->_process_file_count = 0; - $this->__destruct(); - } - - /** - * Returns information about the specified file without having to use ffmpeg-php - * as it consults the ffmpeg binary directly. - * - * @access public - * @param string $file The absolute path of the file that is required to be manipulated. - * @return mixed false on error encountered, true otherwise - **/ - function getFFmpegInfo() - { -// check to see if this is a static call - if(!$this) - { - $toolkit = new PHPVideoToolkit($tmp_directory); - return $toolkit->getFFmpegInfo(); - } -// check to see if the info has already been cached - if($this->ffmpeg_info !== false) - { - return $this->ffmpeg_info; - } -// check to see if this is a static call - $format = ''; - $data = array(); -// execute the ffmpeg lookup - exec(PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -formats 2>&1', $buffer); - - $this->ffmpeg_found = $data['ffmpeg-found'] = !(strpos($buffer[0], 'command not found') !== false || strpos($buffer[0], 'No such file or directory') !== false); - $data['binary'] = array(); - $data['compiler'] = array(); - $data['ffmpeg-php-support'] = $this->hasFFmpegPHPSupport(); - $data['raw'] = implode("\r\n", $buffer); - - if(!$this->ffmpeg_found) - { - $this->ffmpeg_info = $data; - return $data; - } - - $buffer = $data['raw']; - -// start building the info array - $look_ups = array('configuration'=>'configuration: ', 'formats'=>'File formats:', 'codecs'=>'Codecs:', 'filters'=>'Bitstream filters:', 'protocols'=>'Supported file protocols:', 'abbreviations'=>'Frame size, frame rate abbreviations:', 'Note:'); - $total_lookups = count($look_ups); - $pregs = array(); - $indexs = array(); - foreach($look_ups as $key=>$reg) - { - if(strpos($buffer, $reg) !== false) - { - $index = array_push($pregs, $reg); - $indexs[$key] = $index; - } - } - preg_match('/'.implode('(.*)', $pregs).'(.*)/s', $buffer, $matches); - $configuration = trim($matches[$indexs['configuration']]); -// grab the ffmpeg configuration flags - preg_match_all('/--[a-zA-Z0-9\-]+/', $configuration, $config_flags); - $data['binary']['configuration'] = $config_flags[0]; - $data['binary']['vhook-support'] = in_array('--enable-vhook', $config_flags[0]) || !in_array('--disable-vhook', $config_flags[0]); -// grab the versions - $data['binary']['versions'] = array(); - preg_match_all('/([a-zA-Z0-9\-]+) version: ([0-9\.]+)/', $configuration, $versions); - for($i=0, $a=count($versions[0]); $i<$a; $i++) - { - $data['binary']['versions'][strtolower(trim($versions[1][$i]))] = $versions[2][$i]; - } -// grab the ffmpeg compile info - preg_match('/built on (.*), gcc: (.*)/', $configuration, $conf); - if(count($conf) > 0) - { - $data['compiler']['gcc'] = $conf[2]; - $data['compiler']['build_date'] = $conf[1]; - $data['compiler']['build_date_timestamp'] = strtotime($conf[1]); - } -// grab the file formats available to ffmpeg - preg_match_all('/ (DE|D|E) (.*) {1,} (.*)/', trim($matches[$indexs['formats']]), $formats); - $data['formats'] = array(); -// loop and clean - for($i=0, $a=count($formats[0]); $i<$a; $i++) - { - $data['formats'][strtolower(trim($formats[2][$i]))] = array( - 'encode' => $formats[1][$i] == 'DE' || $formats[1][$i] == 'E', - 'decode' => $formats[1][$i] == 'DE' || $formats[1][$i] == 'D', - 'fullname' => $formats[3][$i] - ); - } -// grab the bitstream filters available to ffmpeg - $data['filters'] = array(); - if(isset($indexs['filters']) && isset($matches[$indexs['filters']])) - { - $filters = trim($matches[$indexs['filters']]); - if(empty($filters) === false) - { - $data['filters'] = explode(' ', $filters); - } - } -// grab the file prototcols available to ffmpeg - $data['filters'] = array(); - if(isset($indexs['protocols']) && isset($matches[$indexs['protocols']])) - { - $protocols = trim($matches[$indexs['protocols']]); - if(empty($protocols) === false) - { - $data['protocols'] = explode(' ', str_replace(':', '', $protocols)); - } - } -// grab the abbreviations available to ffmpeg - $data['abbreviations'] = array(); - if(isset($indexs['abbreviations']) && isset($matches[$indexs['abbreviations']])) - { - $abbreviations = trim($matches[$indexs['abbreviations']]); - if(empty($abbreviations) === false) - { - $data['abbreviations'] = explode(' ', $abbreviations); - } - } - $this->ffmpeg_info = $data; - return $data; - - } - - /** - * Determines the type of support that exists for the FFmpeg-PHP module. - * - * @access public - * @return mixed. Boolean false if there is no support, String 'module' if the actuall - * FFmpeg-PHP module is loaded, or String 'emulated' if the FFmpeg-PHP classes - * can be emulated through the adapter classes. - */ - function hasFFmpegPHPSupport() - { - return $this->ffmpeg_found === false ? false : (extension_loaded('ffmpeg') ? 'module' : (is_file(dirname(__FILE__).DS.'adapters'.DS.'ffmpeg-php'.DS.'ffmpeg_movie.php') && is_file(dirname(__FILE__).DS.'adapters'.DS.'ffmpeg-php'.DS.'ffmpeg_frame.php') && is_file(dirname(__FILE__).DS.'adapters'.DS.'ffmpeg-php'.DS.'ffmpeg_animated_gif.php') ? 'emulated' : false)); - } - - /** - * Determines if the ffmpeg binary has been compiled with vhook support. - * - * @access public - * @return mixed. Boolean false if there is no support, true there is support. - */ - function hasVHookSupport() - { - $info = $this->getFFmpegInfo(); - return $info['binary']['vhook-support']; - } - - /** - * Returns information about the specified file without having to use ffmpeg-php - * as it consults the ffmpeg binary directly. This idea for this function has been borrowed from - * a French ffmpeg class located: http://www.phpcs.com/codesource.aspx?ID=45279 - * - * @access public - * @todo Change the search from string explode to a regex based search - * @param string $file The absolute path of the file that is required to be manipulated. - * @return mixed false on error encountered, true otherwise - **/ - function getFileInfo($file=false, $tmp_directory='/tmp/') - { -// check to see if this is a static call - if($file !== false && !$this) - { - $toolkit = new PHPVideoToolkit($tmp_directory); - return $toolkit->getFileInfo($file); - } -// if the file has not been specified check to see if an input file has been specified - if($file === false) - { - if(!$this->_input_file) - { -// input file not valid - return $this->_raiseError('getFileInfo_no_input'); -//<- exits - } - $file = $this->_input_file; - } - $file = escapeshellarg($file); -// create a hash of the filename - $hash = md5($file); -// check to see if the info has already been generated - if(isset($this->_file_info[$hash])) - { - return $this->_file_info[$hash]; - } -// execute the ffmpeg lookup - exec(PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -i '.$file.' 2>&1', $buffer); - $buffer = implode("\r\n", $buffer); - $data = array(); -// grab the duration and bitrate data - preg_match_all('/Duration: (.*)/', $buffer, $matches); - if(count($matches) > 0) - { - $line = trim($matches[0][0]); -// capture any data - preg_match_all('/(Duration|start|bitrate): ([^,]*)/', $line, $matches); -// setup the default data - $data['duration'] = array( - 'timecode' => array( - 'seconds' => array( - 'exact' => -1, - 'excess' => -1 - ), - 'rounded' => -1, - ) - ); -// get the data - foreach ($matches[1] as $key => $detail) - { - $value = $matches[2][$key]; - switch(strtolower($detail)) - { - case 'duration' : -// print_r($value); - $data['duration']['timecode']['rounded'] = substr($value, 0, 8); - $data['duration']['timecode']['frames'] = array(); - $data['duration']['timecode']['frames']['exact'] = $value; - $data['duration']['timecode']['frames']['excess'] = intval(substr($value, 9)); - break; - case 'bitrate' : - $data['bitrate'] = strtoupper($value) === 'N/A' ? -1 : intval($value); - break; - case 'start' : - $data['duration']['start'] = $value; - break; - } - } - } - -// match the video stream info - preg_match('/Stream(.*): Video: (.*)/', $buffer, $matches); - if(count($matches) > 0) - { - $data['video'] = array(); -// get the dimension parts - preg_match('/([0-9]{1,5})x([0-9]{1,5})/', $matches[2], $dimensions_matches); -// print_r($dimensions_matches); - $dimensions_value = $dimensions_matches[0]; - $data['video']['dimensions'] = array( - 'width' => floatval($dimensions_matches[1]), - 'height' => floatval($dimensions_matches[2]) - ); -// get the framerate - preg_match('/([0-9\.]+) (fps|tb)\(r\)/', $matches[0], $fps_matches); - $data['duration']['timecode']['frames']['frame_rate'] = $data['video']['frame_rate'] = floatval($fps_matches[1]); - $data['duration']['timecode']['seconds']['total'] = $data['duration']['seconds'] = $this->formatTimecode($data['duration']['timecode']['frames']['exact'], '%hh:%mm:%ss.%fn', '%st.%ms', $data['video']['frame_rate']); - $fps_value = $fps_matches[0]; -// get the ratios - preg_match('/\[PAR ([0-9\:\.]+) DAR ([0-9\:\.]+)\]/', $matches[0], $ratio_matches); - if(count($ratio_matches)) - { - $data['video']['pixel_aspect_ratio'] = $ratio_matches[1]; - $data['video']['display_aspect_ratio'] = $ratio_matches[2]; - } -// work out the number of frames - if(isset($data['duration']) && isset($data['video'])) - { -// set the total frame count for the video - $data['video']['frame_count'] = ceil($data['duration']['seconds'] * $data['video']['frame_rate']); -// set the framecode - $data['duration']['timecode']['seconds']['excess'] = floatval($data['duration']['seconds']) - floor($data['duration']['seconds']); - $data['duration']['timecode']['seconds']['exact'] = $this->formatSeconds($data['duration']['seconds'], '%hh:%mm:%ss.%ms'); - $data['duration']['timecode']['frames']['total'] = $data['video']['frame_count']; - } -// formats should be anything left over, let me know if anything else exists - $parts = explode(',', $matches[2]); - $other_parts = array($dimensions_value, $fps_value); - $formats = array(); - foreach($parts as $key=>$part) - { - $part = trim($part); - if(!in_array($part, $other_parts)) - { - array_push($formats, $part); - } - } - $data['video']['pixel_format'] = $formats[1]; - $data['video']['codec'] = $formats[0]; - } - -// match the audio stream info - preg_match('/Stream(.*): Audio: (.*)/', $buffer, $matches); - if(count($matches) > 0) - { -// setup audio values - $data['audio'] = array( - 'stereo' => -1, - 'sample_rate' => -1, - 'sample_rate' => -1 - ); - $other_parts = array(); -// get the stereo value - preg_match('/(stereo|mono)/i', $matches[0], $stereo_matches); - if(count($stereo_matches)) - { - $data['audio']['stereo'] = $stereo_matches[0]; - array_push($other_parts, $stereo_matches[0]); - } -// get the sample_rate - preg_match('/([0-9]{3,6}) Hz/', $matches[0], $sample_matches); - if(count($sample_matches)) - { - $data['audio']['sample_rate'] = count($sample_matches) ? floatval($sample_matches[1]) : -1; - array_push($other_parts, $sample_matches[0]); - } -// get the bit rate - preg_match('/([0-9]{1,3}) kb\/s/', $matches[0], $bitrate_matches); - if(count($bitrate_matches)) - { - $data['audio']['bitrate'] = count($bitrate_matches) ? floatval($bitrate_matches[1]) : -1; - array_push($other_parts, $bitrate_matches[0]); - } -// formats should be anything left over, let me know if anything else exists - $parts = explode(',', $matches[2]); - $formats = array(); - foreach($parts as $key=>$part) - { - $part = trim($part); - if(!in_array($part, $other_parts)) - { - array_push($formats, $part); - } - } - $data['audio']['codec'] = $formats[0]; -// if no video is set then no audio frame rate is set - if($data['duration']['timecode']['seconds']['exact'] === -1) - { - $exact_timecode = $this->formatTimecode($data['duration']['timecode']['frames']['exact'], '%hh:%mm:%ss.%fn', '%hh:%mm:%ss.%ms', 1000); - $data['duration']['timecode']['seconds'] = array( - 'exact' => $exact_timecode, - 'excess' => intval(substr($exact_timecode, 8)), - 'total' => $this->formatTimecode($data['duration']['timecode']['frames']['exact'], '%hh:%mm:%ss.%fn', '%ss.%ms', 1000) - ); - $data['duration']['timecode']['frames']['frame_rate'] = 1000; - $data['duration']['seconds'] = $data['duration']['timecode']['seconds']['total']; - //$this->formatTimecode($data['duration']['timecode']['frames']['exact'], '%hh:%mm:%ss.%fn', '%st.%ms', $data['video']['frame_rate']); - } - } - -// check that some data has been obtained - if(!count($data)) - { - $data = false; - } - else - { - $data['_raw_info'] = $buffer; - } - return $this->_file_info[$hash] = $data; - } - - /** - * Determines if the input media has a video stream. - * - * @access public - * @param string $file The absolute path of the file that is required to be manipulated. - * @return bool - **/ - function fileHasVideo($file=false) - { -// check to see if this is a static call - if($file !== false && !isset($this)) - { - $toolkit = new PHPVideoToolkit(); - $data = $toolkit->getFileInfo($file); - } -// if the file has not been specified check to see if an input file has been specified - else if($file === false) - { - if(!$this->_input_file) - { -// input file not valid - return $this->_raiseError('inputFileHasVideo_no_input'); -//<- exits - } - $file = $this->_input_file; - $data = $this->getFileInfo($file); - } - return isset($data['video']); - } - - /** - * Determines if the input media has an audio stream. - * - * @access public - * @param string $file The absolute path of the file that is required to be manipulated. - * @return bool - **/ - function fileHasAudio($file=false) - { -// check to see if this is a static call - if($file !== false && !isset($this)) - { - $toolkit = new PHPVideoToolkit(); - $data = $toolkit->getFileInfo($file); - } -// if the file has not been specified check to see if an input file has been specified - else if($file === false) - { - if(!$this->_input_file) - { -// input file not valid - return $this->_raiseError('inputFileHasAudio_no_input'); -//<- exits - } - $file = $this->_input_file; - $data = $this->getFileInfo($file); - } - return isset($data['audio']); - } - - /** - * Determines if your ffmpeg has particular codec support for encode or decode. - * - * @access public - * @param string $codec The name of the codec you are checking for. - * @param const $support PHPVideoToolkit::ENCODE or PHPVideoToolkit::DECODE, depending on which functionality is desired. - * @return mixed. Boolean false if there is no support, true if there is support. - */ - function hasCodecSupport($codec, $support=PHPVIDEOTOOLKIT_ENCODE) - { - $codec = strtolower($codec); - $data = $this->getFFmpegInfo(); - return isset($data['formats'][$codec]) ? $data['formats'][$codec][$support] : false; - } - - /** - * Sets the input file that is going to be manipulated. - * - * @access public - * @param string $file The absolute path of the file that is required to be manipulated. - * @param mixed $input_frame_rate If 0 (default) then no input frame rate is set, if false it is automatically retreived, otherwise - * any other integer will be set as the incoming frame rate. - * @return boolean false on error encountered, true otherwise - */ - function setInputFile($file, $input_frame_rate=0) - { - $files_length = count($file); -// if the total number of files entered is 1 then only one file is being processed - if($files_length == 1) - { -// check the input file, if there is a %d in there or a similar %03d then the file inputted is a sequence, if neither of those is found -// then qheck to see if the file exists - if(!preg_match('/\%([0-9]+)d/', $file) && strpos($file, '%d') === false && !is_file($file)) - { -// input file not valid - return $this->_raiseError('setInputFile_file_existence', array('file'=>$file)); -//<- exits - } - $escaped_name = $file; -// $escaped_name = escapeshellarg($files[0]); - $this->_input_file = $escaped_name; - $this->_input_file_id = md5($escaped_name); - -// the -inputr is a hack for -r to come before the input - if($input_frame_rate !== 0) - { - $info = $this->getFileInfo(); - if(isset($info['video'])) - { - if($input_frame_rate === false) - { - $input_frame_rate = $info['video']['frame_rate']; - } -// input frame rate is a command hack - $this->addCommand('-inputr', $input_frame_rate); - } - } - } - else - { -// more than one video is being added as input so we must join them all - call_user_func_array(array(&$this, 'addVideo'), array($file, $input_frame_rate)); - } - return true; - } - - /** - * A shortcut for converting video to FLV. - * - * @access public - * @param integer $audio_sample_frequency - * @param integer $audio_bitrate - */ - function setFormatToFLV($audio_sample_frequency=44100, $audio_bitrate=64) - { - $this->addCommand('-sameq'); - $this->setAudioFormat(PHPVIDEOTOOLKIT_FORMAT_MP3); -// adjust the audio rates - $this->setAudioBitRate($audio_bitrate); - $this->setAudioSampleFrequency($audio_sample_frequency); -// set the video format - $this->setFormat(PHPVIDEOTOOLKIT_FORMAT_FLV); -// flag that the flv has to have meta data added after the excecution of this command -// register the post tidy process - $this->registerPostProcess('_addMetaToFLV', $this); - } - - /** - * When converting video to FLV the meta data has to be added by a ruby program called FLVTools2. - * This is a second exec call only after the video has been converted to FLV - * http://inlet-media.de/flvtool2 - * - * @access private - */ - function _addMetaToFLV($files) - { - $file = array_pop($files); -// prepare the command suitable for exec - $exec_string = $this->_prepareCommand(PHPVIDEOTOOLKIT_FLVTOOLS_BINARY, '-U '.$file); -// execute the command - exec($exec_string); - if(is_array($this->_processed[0])) - { - array_push($this->_processed[0], $exec_string); - } - else - { - $this->_processed[0] = array($this->_processed[0], $exec_string); - } - return true; - } - - /** - * Streams a FLV file from a given point. You can control bandwidth, cache and session options. - * Inspired by xmoov-php - * @see xmoov-php, - * - @link http://xmoov.com/ - * - @author Eric Lorenzo Benjamin jr - * @access public - * @param integer $seek_pos The position in the file to seek to. - * @param array|boolean $bandwidth_options If a boolean value, false then no bandwidth limiting will take place. - * If true then bandwidth limiting will take place with packet_size = 90 and packet_interval = 0.3. - * If an array the following values are default packet_size = 90 and packet_interval = 0.3, you will also - * have to set active = true, ie array('active'=>true, 'packet_size'=>90, 'packet_interval'=>0.3) - * @param boolean $allow_cache If true the file will be allowed to cache in the browser, if false then it won't - * @return boolean - */ - function flvStreamSeek($seek_pos=0, $bandwidth_options=array(), $allow_cache=true) - { -// check for input file - if(!$this->_input_file) - { -// input file not valid - return $this->_raiseError('streamFLV_no_input'); -//<- exits - } -// make the pos safe - $seek_pos = intval($seek_pos); -// absorb the bandwidth options - $bandwidth_options = is_array($bandwidth_options) ? array_merge(array('active'=>false, 'packet_size'=>90, 'packet_interval'=>0.3), $bandwidth_options) : array('active'=>$bandwidth_options, 'packet_size'=>90, 'packet_interval'=>0.3); -// if this file is not allowed to be cached send cache headers for all browsers. - if(!$allow_cache) - { - session_cache_limiter('nocache'); - header('Expires: Thu, 19 Nov 1981 08:52:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); - header('Pragma: no-cache'); - } -// open file - $handle = fopen($this->_input_file, 'rb'); - $file_size = filesize($this->_input_file) - (($seek_pos > 0) ? $seek_pos + 1 : 0); -// send the flv headers - header('Content-Type: video/x-flv'); - header('Content-Disposition: attachment; filename="'.basename($this->_input_file).'"'); - header('Content-Length: '.$file_size); -// flv format header - if($seek_pos != 0) - { - print('FLV'); - print(pack('C', 1)); - print(pack('C', 1)); - print(pack('N', 9)); - print(pack('N', 9)); - } -// seek to the required point - if(fseek($handle, $seek_pos) === -1) - { -// input file not valid - return $this->_raiseError('streamFLV_passed_eof'); -//<- exits - } -// if bandwidth control is active then workout the options - if($bandwidth_options['active']) - { - $packet_interval = intval($bandwidth_options['packet_interval']); - $packet_size = intval($bandwidth_options['packet_size']) * 1042; - } -// output the file - while(!feof($handle)) - { -// limit the bandwidth - if($bandwidth_options['active'] && $packet_interval > 0) - { -// output the required packet - $time_start = $this->microtimeFloat(); - echo fread($handle, $packet_size); - $time_stop = $this->microtimeFloat(); -// delay the output - $time_difference = $time_stop - $time_start; - if($time_difference < $packet_interval) - { - usleep(($packet_interval * 1000000) - ($time_difference * 1000000)); - } - } -// no bandwidth limiting - else - { - echo fread($handle, $file_size); - } - } -// close the file - fclose($handle); - return true; - } - - /** - * This is an alias for setFormat, but restricts it to audio only formats. - * - * @access public - * @param integer $format A supported audio format. - * @param integer $audio_sample_frequency - * @param integer $audio_bitrate - **/ - function extractAudio($format=PHPVIDEOTOOLKIT_FORMAT_MP3, $audio_sample_frequency=44100, $audio_bitrate=64) - { -// check the format is one of the audio formats - if(!in_array($format, array(PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A, PHPVIDEOTOOLKIT_FORMAT_WAV))) - { - return $this->_raiseError('extractAudio_valid_format', array('format'=>$format)); -//<- exits - } - $this->setFormat($format); -// adjust the audio rates - $this->setAudioBitRate($audio_bitrate); - $this->setAudioSampleFrequency($audio_sample_frequency); - } - - /** - * Sets the new video format. - * - * @access public - * @param defined $format The format should use one of the defined variables stated below. - * PHPVIDEOTOOLKIT_FORMAT_3GP2 - 3g2 - * PHPVIDEOTOOLKIT_FORMAT_3GP - 3gp - * PHPVIDEOTOOLKIT_FORMAT_AAC - aac - * PHPVIDEOTOOLKIT_FORMAT_AIFF - aiff - * PHPVIDEOTOOLKIT_FORMAT_AMR - amr - * PHPVIDEOTOOLKIT_FORMAT_ASF - asf - * PHPVIDEOTOOLKIT_FORMAT_AVI - avi - * PHPVIDEOTOOLKIT_FORMAT_FLV - flv - * PHPVIDEOTOOLKIT_FORMAT_GIF - gif - * PHPVIDEOTOOLKIT_FORMAT_MJ2 - mj2 - * PHPVIDEOTOOLKIT_FORMAT_MP2 - mp2 - * PHPVIDEOTOOLKIT_FORMAT_MP3 - mp3 - * PHPVIDEOTOOLKIT_FORMAT_MP4 - mp4 - * PHPVIDEOTOOLKIT_FORMAT_MPEG4 - mpeg4 - * PHPVIDEOTOOLKIT_FORMAT_M4A - m4a - * PHPVIDEOTOOLKIT_FORMAT_MPEG - mpeg - * PHPVIDEOTOOLKIT_FORMAT_MPEG1 - mpeg1video - * PHPVIDEOTOOLKIT_FORMAT_MPEG2 - mpeg2video - * PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO - mpegvideo - * PHPVIDEOTOOLKIT_FORMAT_PSP - psp - * PHPVIDEOTOOLKIT_FORMAT_RM - rm - * PHPVIDEOTOOLKIT_FORMAT_SWF - swf - * PHPVIDEOTOOLKIT_FORMAT_VOB - vob - * PHPVIDEOTOOLKIT_FORMAT_WAV - wav - * PHPVIDEOTOOLKIT_FORMAT_JPG - jpg - * @return boolean false on error encountered, true otherwise - */ - function setFormat($format) - { -// validate input - if(!in_array($format, array(PHPVIDEOTOOLKIT_FORMAT_3GP2, PHPVIDEOTOOLKIT_FORMAT_3GP, PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_AMR, PHPVIDEOTOOLKIT_FORMAT_ASF, PHPVIDEOTOOLKIT_FORMAT_AVI, PHPVIDEOTOOLKIT_FORMAT_FLV, PHPVIDEOTOOLKIT_FORMAT_GIF, PHPVIDEOTOOLKIT_FORMAT_MJ2, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A, PHPVIDEOTOOLKIT_FORMAT_MPEG, PHPVIDEOTOOLKIT_FORMAT_MPEG1, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO, PHPVIDEOTOOLKIT_FORMAT_PSP, PHPVIDEOTOOLKIT_FORMAT_RM, PHPVIDEOTOOLKIT_FORMAT_SWF, PHPVIDEOTOOLKIT_FORMAT_VOB, PHPVIDEOTOOLKIT_FORMAT_WAV, PHPVIDEOTOOLKIT_FORMAT_JPG))) - { - return $this->_raiseError('setFormat_valid_format', array('format'=>$format)); -//<- exits - } - return $this->addCommand('-f', $format); - } - - /** - * Sets the audio sample frequency for audio outputs - * - * @access public - * @param integer $audio_sample_frequency Valid values are 11025, 22050, 44100 - * @return boolean false on error encountered, true otherwise - */ - function setAudioSampleFrequency($audio_sample_frequency) - { -// validate input - if(!in_array(intval($audio_sample_frequency), array(11025, 22050, 44100))) - { - return $this->_raiseError('setAudioSampleFrequency_valid_frequency', array('frequency'=>$audio_sample_frequency)); -//<- exits - } - return $this->addCommand('-ar', $audio_sample_frequency); - } - - /** - * @access public - * @depreciated - * @see PHPVideoToolkit::setAudioCodec() - */ - function setAudioFormat($video_format) - { - return $this->setAudioCodec($video_format); - } - - /** - * Sets the number of audio channels - * - * @access public - * @param integer $channel_type Valid values are PHPVIDEOTOOLKIT_AUDIO_MONO, PHPVIDEOTOOLKIT_AUDIO_STEREO - * @return boolean false on error encountered, true otherwise - */ - function setAudioChannels($channel_type=PHPVIDEOTOOLKIT_AUDIO_MONO) - { -// validate input - if(!in_array($channel_type, array(PHPVIDEOTOOLKIT_AUDIO_MONO, PHPVIDEOTOOLKIT_AUDIO_STEREO))) - { - return $this->_raiseError('setAudioChannels_valid_channels', array('channels'=>$channel_type)); -//<- exits - } - return $this->addCommand('-ac', $channel_type); - } - - /** - * Sets the audio format for audio outputs - * - * @access public - * @param integer $audio_format Valid values are PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_AMR, PHPVIDEOTOOLKIT_FORMAT_ASF, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_RM, PHPVIDEOTOOLKIT_FORMAT_WAV - * @return boolean false on error encountered, true otherwise - */ - function setAudioCodec($audio_format) - { -// validate input - if(!in_array($audio_format, array(PHPVIDEOTOOLKIT_FORMAT_AAC, PHPVIDEOTOOLKIT_FORMAT_AIFF, PHPVIDEOTOOLKIT_FORMAT_AMR, PHPVIDEOTOOLKIT_FORMAT_ASF, PHPVIDEOTOOLKIT_FORMAT_MP2, PHPVIDEOTOOLKIT_FORMAT_MP3, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_RM, PHPVIDEOTOOLKIT_FORMAT_WAV))) - { - return $this->_raiseError('setAudioFormat_valid_format', array('format'=>$audio_format)); -//<- exits - } -// run a libmp3lame check as it require different mp3 codec -// updated thanks to Varon for providing the research - if($audio_format == PHPVIDEOTOOLKIT_FORMAT_MP3) - { - $info = $this->getFFmpegInfo(); - if(isset($info['formats']['libmp3lame'])) - { - $audio_format = 'libmp3lame'; - } - } - return $this->addCommand('-acodec', $audio_format); - } - - /** - * @access public - * @depreciated - * @see PHPVideoToolkit::setVideoCodec() - */ - function setVideoFormat($video_format) - { - return $this->setVideoCodec($video_format); - } - - /** - * Sets the video format for video outputs. This should not be confused with setFormat. setVideoFormat does not generally need to - * be called unless setting a specific video format for a type of media format. It gets a little confusing... - * - * @access public - * @param integer $video_format Valid values are 11025, 22050, 44100 - * @return boolean false on error encountered, true otherwise - */ - function setVideoCodec($video_codec) - { -// validate input - if(!in_array($video_codec, array(PHPVIDEOTOOLKIT_FORMAT_3GP2, PHPVIDEOTOOLKIT_FORMAT_3GP, PHPVIDEOTOOLKIT_FORMAT_AVI, PHPVIDEOTOOLKIT_FORMAT_FLV, PHPVIDEOTOOLKIT_FORMAT_GIF, PHPVIDEOTOOLKIT_FORMAT_MJ2, PHPVIDEOTOOLKIT_FORMAT_MP4, PHPVIDEOTOOLKIT_FORMAT_MPEG4, PHPVIDEOTOOLKIT_FORMAT_M4A, PHPVIDEOTOOLKIT_FORMAT_MPEG, PHPVIDEOTOOLKIT_FORMAT_MPEG1, PHPVIDEOTOOLKIT_FORMAT_MPEG2, PHPVIDEOTOOLKIT_FORMAT_MPEGVIDEO))) - { - return $this->_raiseError('setVideoFormat_valid_format', array('format'=>$video_codec)); -//<- exits - } - return $this->addCommand('-vcodec', $video_codec); - } - - /** - * Disables audio encoding - * - * @access public - * @return boolean false on error encountered, true otherwise - */ - function disableAudio() - { - return $this->addCommand('-an'); - } - - /** - * Disables video encoding - * - * @access public - * @return boolean false on error encountered, true otherwise - */ - public function disableVideo() - { - return $this->addCommand('-vn'); - } - - /** - * Sets the audio bitrate - * - * @access public - * @param integer $audio_bitrate Valid values are 16, 32, 64 - * @return boolean false on error encountered, true otherwise - */ - function setAudioBitRate($bitrate) - { -// validate input - if(!in_array(intval($bitrate), array(16, 32, 64, 128))) - { - return $this->_raiseError('setAudioBitRate_valid_bitrate', array('bitrate'=>$bitrate)); -//<- exits - } - return $this->addCommand('-ab', $bitrate.'kb'); - } - - /** - * Compiles an array of images into a video. This sets the input file (setInputFile) so you do not need to set it. - * The images should be a full absolute path to the actual image file. - * NOTE 1; This copies and renames all the supplied images into a temporary folder so the images don't have to be specifically named. However, when - * creating the ffmpeg instance you will need to set the absolute path to the temporary folder. The default path is '/tmp/'. - * NOTE 2; Please make sure all of the images are all of the same type. - * - * @access public - * @param array $images An array of images that are to be joined and converted into a video - * @param integer $input_frame_rate An integer that will specify the input frame rate for the images. - * @return boolean Returns false on encountering an error - */ - function prepareImagesForConversionToVideo($images, $input_frame_rate) - { -// http://ffmpeg.mplayerhq.hu/faq.html#TOC3 -// ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg - if(empty($images)) - { - return $this->_raiseError('prepareImagesForConversionToVideo_one_img'); -//<- exits - } -// loop through and validate existence first before making a temporary copy - foreach ($images as $key=>$img) - { - if(!is_file($img)) - { - return $this->_raiseError('prepareImagesForConversionToVideo_img_404', array('img'=>$img)); -//<- exits - } - } - if(!is_dir($this->_tmp_directory)) - { - return $this->_raiseError('generic_temp_404'); -//<- exits - } - if(!is_writable($this->_tmp_directory)) - { - return $this->_raiseError('generic_temp_writable'); -//<- exits - } -// get the number of preceding places for the files based on how many files there are to copy - $total = count($images); -// create a temp dir in the temp dir - $uniqid = $this->unique(); - mkdir($this->_tmp_directory.$uniqid, 0777); -// loop through, copy and rename specified images to the temp dir - $ext = false; - foreach ($images as $key=>$img) - { - $file_ext = array_pop(explode('.', $img)); - if($ext !== false && $ext !== $file_ext) - { - return $this->_raiseError('prepareImagesForConversionToVideo_img_type'); -//<- exits - } - $ext = $file_ext; - $tmp_file = $this->_tmp_directory.$uniqid.DS.$this->_tmp_file_prefix.$key.'.'.$ext; - if(!@copy($img, $tmp_file)) - { - return $this->_raiseError('prepareImagesForConversionToVideo_img_copy', array('img'=>$img, 'tmpfile'=>$tmp_file)); -//<- exits - } -// push the tmp file name into the unlinks so they can be deleted on class destruction - array_push($this->_unlink_files, $tmp_file); - } -// the inputr is a hack for -r to come before the input - $this->addCommand('-inputr', $input_frame_rate); -// exit; -// add the directory to the unlinks - array_push($this->_unlink_dirs, $this->_tmp_directory.$uniqid); -// get the input file format - $file_iteration = $this->_tmp_file_prefix.'%d.'.$ext; -// set the input filename - return $this->setInputFile($this->_tmp_directory.$uniqid.DS.$file_iteration); - } - - /** - * Sets the video bitrate - * - * @access public - * @param integer $bitrate - * @return boolean - */ - function setVideoBitRate($bitrate) - { - $bitrate = intval($bitrate); - return $this->addCommand('-b', $bitrate.'kb'); - } - - /** - * Sets the amount of time an animated gif output will loop - * - * @access public - * @param integer $loop_count If false the gif will not loop, if 0 it will loop endlessly, any other number it will loop that amount. - */ - function setGifLoops($loop_count) - { - if($loop_count !== false) - { - $this->addCommand('-loop_output', $loop_count); - } - } - - /** - * @access public - * @depreciated - * @see PHPVideoToolkit::setVideoDimensions() - */ - function setVideoOutputDimensions($width, $height=null) - { - return $this->setVideoDimensions($width, $height); - } - - /** - * Sets the video output dimensions (in pixels) - * - * @access public - * @param mixed $width If an integer height also has to be specified, otherwise you can use one of the class constants - * PHPVIDEOTOOLKIT_SIZE_SAS = Same as input source - * PHPVIDEOTOOLKIT_SIZE_SQCIF = 128 x 96 - * PHPVIDEOTOOLKIT_SIZE_QCIF = 176 x 144 - * PHPVIDEOTOOLKIT_SIZE_CIF = 352 x 288 - * PHPVIDEOTOOLKIT_SIZE_4CIF = 704 x 576 - * PHPVIDEOTOOLKIT_SIZE_QQVGA = 160 x 120 - * PHPVIDEOTOOLKIT_SIZE_QVGA = 320 x 240 - * PHPVIDEOTOOLKIT_SIZE_VGA = 640 x 480 - * PHPVIDEOTOOLKIT_SIZE_SVGA = 800 x 600 - * PHPVIDEOTOOLKIT_SIZE_XGA = 1024 x 768 - * PHPVIDEOTOOLKIT_SIZE_UXGA = 1600 x 1200 - * PHPVIDEOTOOLKIT_SIZE_QXGA = 2048 x 1536 - * PHPVIDEOTOOLKIT_SIZE_SXGA = 1280 x 1024 - * PHPVIDEOTOOLKIT_SIZE_QSXGA = 2560 x 2048 - * PHPVIDEOTOOLKIT_SIZE_HSXGA = 5120 x 4096 - * PHPVIDEOTOOLKIT_SIZE_WVGA = 852 x 480 - * PHPVIDEOTOOLKIT_SIZE_WXGA = 1366 x 768 - * PHPVIDEOTOOLKIT_SIZE_WSXGA = 1600 x 1024 - * PHPVIDEOTOOLKIT_SIZE_WUXGA = 1920 x 1200 - * PHPVIDEOTOOLKIT_SIZE_WOXGA = 2560 x 1600 - * PHPVIDEOTOOLKIT_SIZE_WQSXGA = 3200 x 2048 - * PHPVIDEOTOOLKIT_SIZE_WQUXGA = 3840 x 2400 - * PHPVIDEOTOOLKIT_SIZE_WHSXGA = 6400 x 4096 - * PHPVIDEOTOOLKIT_SIZE_WHUXGA = 7680 x 4800 - * PHPVIDEOTOOLKIT_SIZE_CGA = 320 x 200 - * PHPVIDEOTOOLKIT_SIZE_EGA = 640 x 350 - * PHPVIDEOTOOLKIT_SIZE_HD480 = 852 x 480 - * PHPVIDEOTOOLKIT_SIZE_HD720 = 1280 x 720 - * PHPVIDEOTOOLKIT_SIZE_HD1080 = 1920 x 1080 - * @param integer $height - * @return boolean - */ - function setVideoDimensions($width, $height=null) - { - if($height === null || $height === true) - { -// validate input - if(!in_array($width, array(PHPVIDEOTOOLKIT_SIZE_SAS, PHPVIDEOTOOLKIT_SIZE_SQCIF, PHPVIDEOTOOLKIT_SIZE_QCIF, PHPVIDEOTOOLKIT_SIZE_CIF, PHPVIDEOTOOLKIT_SIZE_4CIF, PHPVIDEOTOOLKIT_SIZE_QQVGA, PHPVIDEOTOOLKIT_SIZE_QVGA, PHPVIDEOTOOLKIT_SIZE_VGA, PHPVIDEOTOOLKIT_SIZE_SVGA, PHPVIDEOTOOLKIT_SIZE_XGA, PHPVIDEOTOOLKIT_SIZE_UXGA, PHPVIDEOTOOLKIT_SIZE_QXGA, PHPVIDEOTOOLKIT_SIZE_SXGA, PHPVIDEOTOOLKIT_SIZE_QSXGA, PHPVIDEOTOOLKIT_SIZE_HSXGA, PHPVIDEOTOOLKIT_SIZE_WVGA, PHPVIDEOTOOLKIT_SIZE_WXGA, PHPVIDEOTOOLKIT_SIZE_WSXGA, PHPVIDEOTOOLKIT_SIZE_WUXGA, PHPVIDEOTOOLKIT_SIZE_WOXGA, PHPVIDEOTOOLKIT_SIZE_WQSXGA, PHPVIDEOTOOLKIT_SIZE_WQUXGA, PHPVIDEOTOOLKIT_SIZE_WHSXGA, PHPVIDEOTOOLKIT_SIZE_WHUXGA, PHPVIDEOTOOLKIT_SIZE_CGA, PHPVIDEOTOOLKIT_SIZE_EGA, PHPVIDEOTOOLKIT_SIZE_HD480, PHPVIDEOTOOLKIT_SIZE_HD720, PHPVIDEOTOOLKIT_SIZE_HD1080))) - { - return $this->_raiseError('setVideoOutputDimensions_valid_format', array('format'=>$format)); -//<- exits - } - if($width === PHPVIDEOTOOLKIT_SIZE_SAS) - { -// and override is made so no command is added in the hope that ffmpeg will just output the source - if($height === true) - { - return true; - } -// get the file info - $info = $this->getFileInfo(); - if(!isset($info['video']) || !isset($info['video']['dimensions'])) - { - return $this->_raiseError('setVideoOutputDimensions_sas_dim'); - } - else - { - $width = $info['video']['dimensions']['width'].'x'.$info['video']['dimensions']['height']; - } - } - } - else - { -// check that the width and height are even - if($width % 2 !== 0 || $height % 2 !== 0) - { - return $this->_raiseError('setVideoOutputDimensions_valid_integer'); -//<- exits - } - $width = $width.'x'.$height; - } - $this->addCommand('-s', $width); - return true; - } - - /** - * Sets the video aspect ratio - * - * @access public - * @param string|integer $ratio Valid values are PHPVIDEOTOOLKIT_RATIO_STANDARD, PHPVIDEOTOOLKIT_RATIO_WIDE, PHPVIDEOTOOLKIT_RATIO_CINEMATIC, or '4:3', '16:9', '1.85' - * @return boolean - */ - function setVideoAspectRatio($ratio) - { - if(!in_array($ratio, array(PHPVIDEOTOOLKIT_RATIO_STANDARD, PHPVIDEOTOOLKIT_RATIO_WIDE, PHPVIDEOTOOLKIT_RATIO_CINEMATIC))) - { - return $this->_raiseError('setVideoAspectRatio_valid_ratio', array('ratio'=>$ratio)); - } - $this->addCommand('-aspect', $ratio); - return true; - } - - /** - * Sets the frame rate of the video - * - * @access public - * @param string|integer $fps 1 being 1 frame per second, 1:2 being 0.5 frames per second - * @return boolean - */ - function setVideoFrameRate($fps) - { - return $this->addCommand('-r', $fps); - } - - /** - * Extracts a segment of video and/or audio - * (Note; If set to 1 and the duration set by $extract_begin_timecode and $extract_end_timecode is equal to 1 you get more than one frame. - * For example if you set $extract_begin_timecode='00:00:00' and $extract_end_timecode='00:00:01' you might expect because the time span is - * 1 second only to get one frame if you set $frames_per_second=1. However this is not correct. The timecode you set in $extract_begin_timecode - * acts as the beginning frame. Thus in this example the first frame exported will be from the very beginning of the video, the video will - * then move onto the next frame and export a frame there. Therefore if you wish to export just one frame from one position in the video, - * say 1 second in you should set $extract_begin_timecode='00:00:01' and set $extract_end_timecode='00:00:01'.) - * - * @access public - * @param string $extract_begin_timecode A timecode (hh:mm:ss.fn - you can change the timecode format by changing the $timecode_format param - * it obeys the formatting of PHPVideoToolkit::formatTimecode(), see below for more info) - * @param string|integer|boolean $extract_end_timecode A timecode (hh:mm:ss.fn - you can change the timecode format by changing the $timecode_format param - * it obeys the formatting of PHPVideoToolkit::formatTimecode(), see below for more info) - * @param integer $timecode_format The format of the $extract_begin_timecode and $extract_end_timecode timecodes are being given in. - * default '%hh:%mm:%ss' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - * @param boolean $check_frames_exist Determines if a frame exists check should be made to ensure the timecode given by $extract_end_timecode - * actually exists. - */ - public function extractSegment($extract_begin_timecode, $extract_end_timecode, $timecode_format='%hh:%mm:%ss.%fn', $frames_per_second=false, $check_frames_exist=true) - { -// check for frames per second, if it's not set auto set it. - if($frames_per_second === false) - { - $info = $this->getFileInfo(); - $frames_per_second = $info['duration']['timecode']['frames']['frame_rate']; - } - -// check if frame exists - if($check_frames_exist) - { - if($info['duration']['seconds'] < floatval($this->formatTimecode($extract_end_timecode, $timecode_format, '%ss.%ms', $frames_per_second))) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractSegment_end_timecode'); - } - else if($extract_end_timecode !== false && $info['duration']['seconds'] < floatval($this->formatTimecode($extract_begin_timecode, $timecode_format, '%ss.%ms', $frames_per_second))) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractSegment_begin_timecode'); - } - } - -// format the begin timecode if the timecode format is not already ok. - $begin_position = (float) $this->formatTimecode($extract_begin_timecode, $timecode_format, '%ss.%ms', $frames_per_second); - if($timecode_format !== '%hh:%mm:%ss.%ms') - { - $extract_begin_timecode = $this->formatTimecode($extract_begin_timecode, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second); - } - $this->addCommand('-ss', $extract_begin_timecode); - -// allows for exporting the entire timeline - if($extract_end_timecode !== false) - { - $end_position = (float) $this->formatTimecode($extract_end_timecode, $timecode_format, '%ss.%ms', $frames_per_second); -// format the end timecode if the timecode format is not already ok. - if($timecode_format !== '%hh:%mm:%ss.%ms') - { - $extract_end_timecode = $this->formatTimecode($extract_end_timecode, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second); - } - $this->addCommand('-t', $end_position-$begin_position); - } - return true; - } - - /** - * Extracts frames from a video. - * (Note; If set to 1 and the duration set by $extract_begin_timecode and $extract_end_timecode is equal to 1 you get more than one frame. - * For example if you set $extract_begin_timecode='00:00:00' and $extract_end_timecode='00:00:01' you might expect because the time span is - * 1 second only to get one frame if you set $frames_per_second=1. However this is not correct. The timecode you set in $extract_begin_timecode - * acts as the beginning frame. Thus in this example the first frame exported will be from the very beginning of the video, the video will - * then move onto the next frame and export a frame there. Therefore if you wish to export just one frame from one position in the video, - * say 1 second in you should set $extract_begin_timecode='00:00:01' and set $extract_end_timecode='00:00:01'.) - * - * @access public - * @param string $extract_begin_timecode A timecode (hh:mm:ss.fn - you can change the timecode format by changing the $timecode_format param - * it obeys the formatting of PHPVideoToolkit::formatTimecode(), see below for more info) - * @param string|integer|boolean $extract_end_timecode A timecode (hh:mm:ss.fn - you can change the timecode format by changing the $timecode_format param - * it obeys the formatting of PHPVideoToolkit::formatTimecode(), see below for more info), or false - * if all frames from the begin timecode are to be exported. (Boolean added by Matthias. Thanks. 12th March 2007) - * @param boolean|integer $frames_per_second The number of frames per second to extract. If left as default false, then the number of frames per second - * will be automagically gained from PHPVideoToolkit::fileGetInfo(); - * @param boolean|integer $frame_limit Frame limiter. If set to false then all the frames will be exported from the given time codes, however - * if you wish to set a export limit to the number of frames that are exported you can set an integer. For example; if you set - * $extract_begin_timecode='00:00:11.01', $extract_end_timecode='00:01:10.01', $frames_per_second=1, you will get one frame for every second - * in the video between 00:00:11 and 00:01:10 (ie 60 frames), however if you ant to artificially limit this to exporting only ten frames - * then you set $frame_limit=10. You could of course alter the timecode to reflect you desired frame number, however there are situations - * when a shortcut such as this is useful and necessary. - * @param integer $timecode_format The format of the $extract_begin_timecode and $extract_end_timecode timecodes are being given in. - * default '%hh:%mm:%ss' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - */ - function extractFrames($extract_begin_timecode, $extract_end_timecode, $frames_per_second=false, $frame_limit=false, $timecode_format='%hh:%mm:%ss.%fn', $check_frames_exist=true) - { -// are we autoguessing the frame rate? - if($frames_per_second === false || $check_frames_exist) - { -// get the file info, will exit if no input has been set - $info = $this->getFileInfo(); - if($info === false || !isset($info['video'])) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrame_video_frame_rate_404'); - } - } -// check to see if we have to get the fps of the input movie - if($frames_per_second === false) - { - $frames_per_second = $info['video']['frame_rate']; - } -// check if frame exists - if($check_frames_exist) - { - if($info['video']['frame_count'] < $this->formatTimecode($extract_end_timecode, $timecode_format, '%ft', $frames_per_second)) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrames_video_end_frame_count'); - } - else if($extract_end_timecode !== false && $info['video']['frame_count'] < $this->formatTimecode($extract_begin_timecode, $timecode_format, '%ft', $frames_per_second)) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrames_video_begin_frame_count'); - } - } -// disable audio output - $this->disableAudio(); -// format the begin timecode if the timecode format is not already ok. - if($timecode_format !== '%hh:%mm:%ss.%ms') - { - $extract_begin_timecode = $this->formatTimecode($extract_begin_timecode, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second); - } - $this->addCommand('-ss', $extract_begin_timecode); -// added by Matthias on 12th March 2007 -// allows for exporting the entire timeline - if($extract_end_timecode !== false) - { -// format the end timecode if the timecode format is not already ok. - if($timecode_format !== '%hh:%mm:%ss.%ms') - { - $extract_end_timecode = $this->formatTimecode($extract_end_timecode, $timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second); - } - $this->addCommand('-t', $extract_end_timecode); - } -// set the output frame rate - $this->setVideoFrameRate($frames_per_second); -// do we need to limit the number of frames outputted? - if($frame_limit !== false) - { - $this->addCommand('-vframes', $frame_limit); - } - $this->_image_output_timecode_start = $extract_begin_timecode; - $this->_image_output_timecode_fps = $frames_per_second; - } - - /** - * Extracts exactly one frame - * - * @access public - * @uses $toolkit->extractFrames - * @param string $frame_timecode A timecode (hh:mm:ss.fn) where fn is the frame number of that second - * @param integer|boolean $frames_per_second The frame rate of the movie. If left as the default, false. We will use PHPVideoToolkit::getFileInfo() to get - * the actual frame rate. It is recommended that it is left as false because an incorrect frame rate may produce unexpected results. - * @param integer $timecode_format The format of the $extract_begin_timecode and $extract_end_timecode timecodes are being given in. - * default '%hh:%mm:%ss' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - * @param boolean $check_frame_exists Makes an explicit check to see if the frame exists, default = true. - * Thanks to Istvan Szakacs for suggesting this check. Note, to improve performance disable this check. - */ - function extractFrame($frame_timecode, $frames_per_second=false, $frame_timecode_format='%hh:%mm:%ss.%fn', $check_frame_exists=true) - { -// get the file info, will exit if no input has been set - if($check_frame_exists || $frames_per_second === false) - { - $info = $this->getFileInfo(); - if($info === false || !isset($info['video'])) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrame_video_info_404'); - } - } -// are we autoguessing the frame rate? - if($frames_per_second === false) - { - if(!isset($info['video']['frame_rate'])) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrame_video_frame_rate_404'); - } - $frames_per_second = $info['video']['frame_rate']; - } -// check if frame exists - if($check_frame_exists) - { - if($info['video']['frame_count'] < $this->formatTimecode($frame_timecode, $frame_timecode_format, '%ft', $frames_per_second)) - { -// the input has not returned any video data so the frame rate can not be guessed - return $this->_raiseError('extractFrame_video_frame_count'); - } - } -// format the frame details if the timecode format is not already ok. - if($frame_timecode_format !== '%hh:%mm:%ss.%ms') - { - $frame_timecode = $this->formatTimecode($frame_timecode, $frame_timecode_format, '%hh:%mm:%ss.%ms', $frames_per_second); - } - $this->_single_frame_extraction = 1; -// we will limit the number of frames produced so the desired frame is the last image -// this way we limit the cpu usage of ffmpeg -// Thanks to Istvan Szakacs for pointing out that ffmpeg can export frames using the -ss hh:mm:ss[.xxx] -// it has saved a lot of cpu intensive processes. - $this->extractFrames($frame_timecode, $frame_timecode, $frames_per_second, 1, '%hh:%mm:%ss.%ms', false); -// register the post tidy process -// $this->registerPostProcess('_extractFrameTidy', $this); - } - -// /** -// * Tidies up after ffmpeg exports all frames from one second of video. -// * -// * @access public -// * @uses $toolkit->extractFrames -// * @param string $frame_timecode A timecode (hh:mm:ss.fn) where fn is the frame number of that second -// * @param integer|boolean $frames_per_second The frame rate of the movie. If left as the default, false. We will use PHPVideoToolkit::getFileInfo() to get -// * the actual frame rate. It is recommended that it is left as false because an incorrect frame rate may produce unexpected results. -// */ -// function _extractFrameTidy(&$files) -// { -// $frame_number = 1; -// $frame_file = array(); -// // print_r($files); -// foreach($files as $file=>$filename) -// { -// // print_R(array($this->_single_frame_extraction, $frame_number)); -// if($this->_single_frame_extraction == $frame_number) -// { -// // leave this file alone as it is the required frame -// $frame_file[$file] = $filename; -// } -// else -// { -// // add the frame to the unlink files list -// array_push($this->_unlink_files, $file); -// } -// $frame_number += 1; -// } -// // print_r($frame_file); -// // update the files list -// $files = $frame_file; -// return true; -// } - - /** - * Adds a watermark to the outputted files. This effects both video and image output. - * - * @access public - * @param string $watermark_url The absolute path to the watermark image. - * @param string $vhook The absolute path to the ffmpeg vhook watermark library. - * @param string $watermark_options Any additional options to supply to the vhook. - */ - function addWatermark($watermark_url, $vhook=PHPVIDEOTOOLKIT_FFMPEG_WATERMARK_VHOOK, $watermark_options=false) - { -// check to see if the ffmpeg binary has support for vhooking - if(!$this->hasVHookSupport()) - { - return $this->_raiseError('addWatermark_vhook_disabled'); - } -// does the file exist? - if(!is_file($watermark_url)) - { - return $this->_raiseError('addWatermark_img_404', array('watermark'=>$watermark_url)); - } - $this->addCommand('-vhook', $vhook.' -f '.$watermark_url.($watermark_options !== false ? ' '.$watermark_options : '')); - } - - /** - * Adds a watermark to the outputted image files using the PHP GD module. - * This effects only image output. - * - * @access public - * @param string $watermark_url The absolute path to the watermark image. - */ - function addGDWatermark($watermark_url, $options=array('x-offset'=>0, 'y-offset'=>0, 'position'=>'bottom-right')) - { -// does the file exist? - if(!is_file($watermark_url)) - { - return $this->_raiseError('addWatermark_img_404', array('watermark'=>$watermark_url)); - } -// save the watermark_url - $this->_watermark_url = $watermark_url; - $this->_watermark_options = array_merge(array('x-offset'=>0, 'y-offset'=>0, 'position'=>'bottom-right'), $options); -// register the post process - $this->registerPostProcess('_addGDWatermark', $this); - } - - /** - * Adds watermark to any outputted images via GD instead of using vhooking. - * - * @access private - * @param array $files An array of image files. - * @return array - */ - function _addGDWatermark($files) - { -// create the watermark resource and give it alpha blending - $info = pathinfo($this->_watermark_url); - switch(strtolower($info['extension'])) - { - case 'jpeg' : - case 'jpg' : - $watermark = imagecreatefromjpeg($this->_watermark_url); - break; - case 'gif' : - $watermark = imagecreatefromgif($this->_watermark_url); - break; - case 'png' : - $watermark = imagecreatefrompng($this->_watermark_url); - break; - default : - return false; - } - imagealphablending($watermark, true); - imagesavealpha($watermark, true); -// get the watermark dimensions - $watermark_width = imagesx($watermark); - $watermark_height = imagesy($watermark); -// $image = imagecreatetruecolor($watermark_width, $watermark_height); -// loop and watermark each file - $blended_files = array(); - foreach($files as $file=>$filename) - { -// detect the file extension and create the resource from them appropriate function - $info = pathinfo($file); - $quality = $output_function = null; - switch(strtolower($info['extension'])) - { - case 'jpeg' : - case 'jpg' : - $quality = 80; - $output_function = 'imagejpeg'; - $image = imagecreatefromjpeg($file); - break; - case 'gif' : - $output_function = 'imagegif'; - $image = imagecreatefromgif($file); - break; - case 'png' : - $quality = 9; - $output_function = 'imagepng'; - $image = imagecreatefrompng($file); - break; - default : - continue 1; - } - -// the dimensions will/should be the same for each image however still best to check - $image_width = imagesx($image); - $image_height = imagesy($image); -// calculate where to position the watermark - $dest_x = 0; - $dest_y = 0; - switch($this->_watermark_options['position']) - { - case 'top-left' : - $dest_x = 0; - $dest_y = 0; - break; - case 'top-middle' : - $dest_x = ($image_width-$watermark_width)/2; - $dest_y = 0; - break; - case 'top-right' : - $dest_x = $image_width-$watermark_width; - $dest_y = 0; - break; - case 'center-left' : - $dest_x = 0; - $dest_y = ($image_height-$watermark_height)/2; - break; - case 'center-middle' : - $dest_x = ($image_width-$watermark_width)/2; - $dest_y = ($image_height-$watermark_height)/2; - break; - case 'center-right' : - $dest_x = $image_width-$watermark_width; - $dest_y = ($image_height-$watermark_height)/2; - break; - case 'bottom-left' : - $dest_x = 0; - $dest_y = $image_height - $watermark_height; - break; - case 'bottom-middle' : - $dest_x = ($image_width-$watermark_width)/2; - $dest_y = $image_height - $watermark_height; - break; - case 'bottom-right' : - default : - $dest_x = $image_width-$watermark_width; - $dest_y = $image_height - $watermark_height; - break; - } - $dest_x += $this->_watermark_options['x-offset']; - $dest_y += $this->_watermark_options['y-offset']; -// copy the watermark to the new image -// print_r(array($this->_watermark_url, $image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height)); - imagecopy($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height); -// delete the old image - unlink($file); -// save the new image in place of the old - $output_function($image, $file, $quality); -// remove the image resouce - imagedestroy($image); - array_push($blended_files, $file); - } -// remove the watermark resource - imagedestroy($watermark); - return $blended_files; - } - -// /** -// * This will overlay an audio file over the top of a video file -// **/ -// function overlayAudio($audio_file) -// { -// $this->addCommand('-newaudio', ''); -// } - - /** - * This will adjust the audio volume. - * - * @access public - * @param integer $vol 256 = normal - **/ - function adjustVolume($vol=256) - { - $this->addCommand('-vol', ''); - } - - /** - * This process will combine the original input video with the video specified by this function. - * This function accepts more than one video as arguments. They will be added in order of the arguments. - * ie. input_video -> video1 -> video2 etc - * The process of doing this can take a long time as each incoming video has to be first converted - * into a format that accepts joining. The default joining codec is "mpg". However for almost lossless - * quality you can use the "yuv4mpegpipe" format. This is of course dependent upon your ffmpeg binary. - * You can check to see if you server supports yuv4mpegpipe by typing "ffmpeg -formats" into the - * command line. If you want to use the yuv4mpegpipe format you can add the flag, FFMPEG_USE_HQ_JOIN to the - * end of the video inputs. WARNING: High Quality joins will take longer to process. (well duh!) - * - * @access public - * @param $video1, $video2, $video3... $video(n) Paths of videos to attach to the input video. - * @param $flag integer FFMPEG_USE_HQ_JOIN If you wish to use the yuv4mpegpipe format for join add this to the end of the video list. - */ - function addVideo() - { - $videos = func_get_args(); - $videos_length = count($videos); -// is last arg the hq join flag -// check to see if a starter file has been added, if not set the input as an array - if($this->_input_file === null) - { - $this->_input_file = array(); - } -// if the input file is already set as a string that means as start file has been added so absorb into the input array - else if(is_string($this->_input_file)) - { - $this->_input_file = array($this->_input_file); - } - foreach($videos as $key=>$file) - { - if(!preg_match('/\%([0-9]+)d/', $file) && strpos($file, '%d') === false && !is_file($file)) - { -// input file not valid - return $this->_raiseError('addVideo_file_404', array('file'=>$file)); -//<- exits - } - array_push($this->_input_file, $file); -// array_push($this->_input_file, escapeshellarg($file)); - } - } - - /** - * @access public - * @uses addVideo() - */ - function addVideos() - { - $videos = func_get_args(); - call_user_func_array(array(&$this, 'addVideo'), $videos); - } - - /** - * Sets the output. - * - * @access public - * @param string $output_directory The directory to output the command output to - * @param string $output_name The filename to output to. - * (Note; if you are outputting frames from a video then you will need to add an extra item to the output_name. The output name you set is required - * to contain '%d'. '%d' is replaced by the image number. Thus entering setting output_name $output_name='img%d.jpg' will output - * 'img1.jpg', 'img2.jpg', etc... However 'img%03d.jpg' generates `img001.jpg', `img002.jpg', etc...) - * @param boolean $overwrite_mode Accepts one of the following class constants - * - PHPVIDEOTOOLKIT_OVERWRITE_FAIL - This produces an error if there is a file conflict and the processing is halted. - * - PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE - This continues with the processing but no file overwrite takes place. The processed file is left in the temp directory - * for you to manually move. - * - PHPVIDEOTOOLKIT_OVERWRITE_EXISTING - This will replace any existing files with the freshly processed ones. - * - PHPVIDEOTOOLKIT_OVERWRITE_UNIQUE - This will appended every output with a unique hash so that the filesystem is preserved. - * @return boolean false on error encountered, true otherwise - */ - function setOutput($output_directory, $output_name, $overwrite_mode=PHPVIDEOTOOLKIT_OVERWRITE_FAIL) - { -// check if directoy exists - if(!is_dir($output_directory)) - { - return $this->_raiseError('setOutput_output_dir_404', array('dir'=>$output_directory)); -//<- exits - } -// check if directory is writeable - if(!is_writable($output_directory)) - { - return $this->_raiseError('setOutput_output_dir_writable', array('dir'=>$output_directory)); -//<- exits - } - $process_name = ''; - -// check to see if a output delimiter is set - $has_d = preg_match('/\%([0-9]+)d/', $output_name) || strpos($output_name, '%d') !== false; - if($has_d) - { - return $this->_raiseError('setOutput_%d_depreciated'); -//<- exits - } - else - { -// determine if the extension is an image. If it is then we will be extracting frames so check for %d - $output_name_info = pathinfo($output_name); - $is_image = in_array(strtolower($output_name_info['extension']), array('jpg', 'jpeg', 'png')); - $is_gif = strtolower($output_name_info['extension']) === 'gif'; -// NOTE: for now we'll just stick to the common image formats, SUBNOTE: gif is ignore because ffmpeg can create animated gifs - if($this->_single_frame_extraction !== null && strpos($output_name, '%timecode') !== false && !(preg_match('/\%index/', $output_name) || strpos($output_name, '%index') !== false) && $is_image) - { - return $this->_raiseError('setOutput_%_missing'); -//<- exits - } - $process_name = '.'.$output_name_info['extension']; -// print_r(array($is_image, ($this->_single_frame_extraction !== null && $is_gif))); - if($is_image || ($this->_single_frame_extraction !== null && $is_gif)) - { - $process_name = '-%12d'.$process_name; - } - } -// set the output address - $this->_output_address = $output_directory.$output_name; -// set the processing address in the temp folder so it does not conflict with any other conversions - $this->_process_address = $this->_tmp_directory.$this->unique().$process_name; - $this->_overwrite_mode = $overwrite_mode; - return true; - } - - /** - * Sets a constant quality value to the encoding. (but a variable bitrate) - * - * @param integer $quality The quality to adhere to. 100 is highest quality, 1 is the lowest quality - */ - function setConstantQuality($quality) - { -// interpret quality into ffmpeg value - $quality = 31 - round(($quality/100) * 31); - if($quality > 31) - { - $quality = 31; - } - else if($quality < 1) - { - $quality = 1; - } - $this->addCommand('-qscale', $quality); - } - - /** - * Translates a number of seconds to a timecode. - * NOTE: this is now a depreciated, use formatSeconds() instead. - * - * @depreciated Use formatSeconds() instead. - * @access public - * @uses PHPVideoToolkit::formatSeconds() - * @param integer $input_seconds The number of seconds you want to calculate the timecode for. - */ - function secondsToTimecode($input_seconds=0) - { - return $this->formatSeconds($input_seconds, '%hh:%mm:%ss'); - } - - /** - * Translates a timecode to the number of seconds. - * NOTE: this is now a depreciated, use formatTimecode() instead. - * - * @depreciated Use formatTimecode() instead. - * @access public - * @uses PHPVideoToolkit::formatTimecode() - * @param integer $input_seconds The number of seconds you want to calculate the timecode for. - */ - function timecodeToSeconds($input_timecode='00:00:00') - { - return $this->formatTimecode($input_timecode, '%hh:%mm:%ss', '%st'); - } - - /** - * Translates a number of seconds to a timecode. - * - * @access public - * @param integer $input_seconds The number of seconds you want to calculate the timecode for. - * @param integer $return_format The format of the timecode to return. The default is - * default '%hh:%mm:%ss' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %sc (seconds ceiled) representative of total seconds (ceiled). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - * @param mixed|boolean|integer $frames_per_second The number of frames per second to translate for. If left false - * the class automagically gets the fps from PHPVideoToolkit::getFileInfo(), but the input has to be set - * first for this to work properly. - * @param boolean $use_smart_values Default value is true, if a format is found (ie %ss - secs) but no higher format (ie %mm - mins) - * is found then if $use_smart_values is true the value of of the format will be totaled. - * @return string|integer Returns the timecode, but if $frames_per_second is not set and a frame rate lookup is required - * but can't be reached then -1 will be returned. - */ - function formatSeconds($input_seconds, $return_format='%hh:%mm:%ss', $frames_per_second=false, $use_smart_values=true) - { - $timestamp = mktime(0, 0, $input_seconds, 0, 0); - $floored = floor($input_seconds); - $hours = $input_seconds > 3600 ? floor($input_seconds/3600) : 0; - $mins = date('i', $timestamp); - $searches = array(); - $replacements = array(); -// these ones are the simple replacements -// replace the hours - $using_hours = strpos($return_format, '%hh') !== false; - if($using_hours) - { - array_push($searches, '%hh'); - array_push($replacements, $hours); - } -// replace the minutes - $using_mins = strpos($return_format, '%mm') !== false; - if($using_mins) - { - array_push($searches, '%mm'); -// check if hours are being used, if not and hours are required enable smart minutes - if($use_smart_values === true && !$using_hours && $hours > 0) - { - $value = ($hours * 60) + $mins; - } - else - { - $value = $mins; - } - array_push($replacements, $value); - } -// replace the seconds - if(strpos($return_format, '%ss') !== false) - { -// check if hours are being used, if not and hours are required enable smart minutes - if($use_smart_values === true && !$using_mins && !$using_hours && $hours > 0) - { - $mins = ($hours * 60) + $mins; - } -// check if mins are being used, if not and hours are required enable smart minutes - if($use_smart_values === true && !$using_mins && $mins > 0) - { - $value = ($mins * 60) + date('s', $timestamp); - } - else - { - $value = date('s', $timestamp); - } - array_push($searches, '%ss'); - array_push($replacements, $value); - } -// replace the milliseconds - if(strpos($return_format, '%ms') !== false) - { - $milli = round($input_seconds - $floored, 3); - $milli = substr($milli, 2); - $milli = empty($milli) ? '0' : $milli; - array_push($searches, '%ms'); - array_push($replacements, $milli); - } -// replace the total seconds (rounded) - if(strpos($return_format, '%st') !== false) - { - array_push($searches, '%st'); - array_push($replacements, round($input_seconds)); - } -// replace the total seconds (floored) - if(strpos($return_format, '%sf') !== false) - { - array_push($searches, '%sf'); - array_push($replacements, floor($input_seconds)); - } -// replace the total seconds (ceiled) - if(strpos($return_format, '%sc') !== false) - { - array_push($searches, '%sc'); - array_push($replacements, ceil($input_seconds)); - } -// replace the total seconds - if(strpos($return_format, '%mt') !== false) - { - array_push($searches, '%mt'); - array_push($replacements, round($input_seconds, 3)); - } -// these are the more complicated as they depend on $frames_per_second / frames per second of the current input - $has_frames = strpos($return_format, '%fn') !== false; - $has_total_frames = strpos($return_format, '%ft') !== false; - if($has_frames || $has_total_frames) - { -// if the fps is false then we must automagically detect it from the input file - if($frames_per_second === false) - { - $info = $this->getFileInfo(); -// check the information has been received - if($info === false || (!isset($info['video']) || !isset($info['video']['frame_rate']))) - { -// fps cannot be reached so return -1 - return -1; - } - $frames_per_second = $info['video']['frame_rate']; - } -// replace the frames - $excess_frames = false; - if($has_frames) - { - $excess_frames = ceil(($input_seconds - $floored) * $frames_per_second); -// print_r(array($input_seconds, $excess_frames)); - array_push($searches, '%fn'); - array_push($replacements, $excess_frames); - } -// replace the total frames (ie frame number) - if($has_total_frames) - { - $round_frames = $floored * $frames_per_second; - if(!$excess_frames) - { - $excess_frames = ceil(($input_seconds - $floored) * $frames_per_second); - } - array_push($searches, '%ft'); - array_push($replacements, $round_frames + $excess_frames); - } - } -// print_r(array($searches, $replacements, $return_format)); -// print_r(array($input_seconds, $timestamp, $return_format, str_replace($searches, $replacements, $return_format))); - return str_replace($searches, $replacements, $return_format); - } - - /** - * Translates a timecode to the number of seconds - * - * @access public - * @param integer $input_seconds The number of seconds you want to calculate the timecode for. - * @param integer $input_format The format of the timecode is being given in. - * default '%hh:%mm:%ss' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - * @param integer $return_format The format of the timecode to return. The default is - * default '%ts' - * - %hh (hours) representative of hours - * - %mm (minutes) representative of minutes - * - %ss (seconds) representative of seconds - * - %fn (frame number) representative of frames (of the current second, not total frames) - * - %ms (milliseconds) representative of milliseconds (of the current second, not total milliseconds) (rounded to 3 decimal places) - * - %ft (frames total) representative of total frames (ie frame number) - * - %st (seconds total) representative of total seconds (rounded). - * - %sf (seconds floored) representative of total seconds (floored). - * - %sc (seconds ceiled) representative of total seconds (ceiled). - * - %mt (milliseconds total) representative of total milliseconds. (rounded to 3 decimal places) - * Thus you could use an alternative, '%hh:%mm:%ss:%ms', or '%hh:%mm:%ss' dependent on your usage. - * @param mixed|boolean|integer $frames_per_second The number of frames per second to translate for. If left false - * the class automagically gets the fps from PHPVideoToolkit::getFileInfo(), but the input has to be set - * first for this to work properly. - * @param boolean $use_smart_values Default value is true, if a format is found (ie %ss - secs) but no higher format (ie %mm - mins) - * is found then if $use_smart_values is true the value of of the format will be totaled. - * @return float Returns the value of the timecode in seconds. - */ - function formatTimecode($input_timecode, $input_format='%hh:%mm:%ss', $return_format='%ts', $frames_per_second=false, $use_smart_values=true) - { -// first we must get the timecode into the current seconds - $input_quoted = preg_quote($input_format); - $placeholders = array('%hh', '%mm', '%ss', '%fn', '%ms', '%ft', '%st', '%sf', '%sc', '%mt'); - $seconds = 0; - $input_regex = str_replace($placeholders, '([0-9]+)', preg_quote($input_format)); - preg_match('/'.$input_regex.'/', $input_timecode, $matches); -// work out the sort order for the placeholders - $sort_table = array(); - foreach($placeholders as $key=>$placeholder) - { - if(($pos = strpos($input_format, $placeholder)) !== false) - { - $sort_table[$pos] = $placeholder; - } - } - ksort($sort_table); -// check to see if frame related values are in the input - $has_frames = strpos($input_format, '%fn') !== false; - $has_total_frames = strpos($input_format, '%ft') !== false; - if($has_frames || $has_total_frames) - { -// if the fps is false then we must automagically detect it from the input file - if($frames_per_second === false) - { - $info = $this->getFileInfo(); -// check the information has been received - if($info === false || (!isset($info['video']) || !isset($info['video']['frame_rate']))) - { -// fps cannot be reached so return -1 - return -1; - } - $frames_per_second = $info['video']['frame_rate']; - } - } -// increment the seconds with each placeholder value - $key = 1; - foreach($sort_table as $placeholder) - { - if(!isset($matches[$key])) - { - break; - } - $value = $matches[$key]; - switch($placeholder) - { -// time related ones - case '%hh' : - $seconds += $value * 3600; - break; - case '%mm' : - $seconds += $value * 60; - break; - case '%ss' : - case '%sf' : - case '%sc' : - $seconds += $value; - break; - case '%ms' : - $seconds += floatval('0.'.$value); - break; - case '%st' : - case '%mt' : - $seconds = $value; - break 1; - break; -// frame related ones - case '%fn' : - $seconds += $value/$frames_per_second; - break; - case '%ft' : - $seconds = $value/$frames_per_second; - break 1; - break; - } - $key += 1; - } -// then we just format the seconds - return $this->formatSeconds($seconds, $return_format, $frames_per_second, $use_smart_values); - } - - - /** - * This is a function that joins multiple input sources into one source before - * the final processing takes place. All videos are temporarily converted into mpg for - * joining. - * - * PLEASE NOTE. This process is experimental an might not work on all systems. - * - * @access private - * @param boolean $log - */ - function _joinInput($log) - { - die('INPUT CANNOT YET BE JOINED.'); -// ---- ffmpeg works -/* -mkfifo /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate1.mpg -mkfifo /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate2.mpg -ffmpeg -i /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/MOV02820.MPG -sameq -y /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate1.mpg < /dev/null & -ffmpeg -i /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/MOV02832.MPG -sameq -y /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate2.mpg < /dev/null & -cat /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate1.mpg /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/intermediate2.mpg |\ -ffmpeg -f mpeg -i - -sameq -vcodec flv -acodec mp3 -ar 22050 /Users/ollie/Sites/@Projects/ffmpeg/checkout/root/examples/tmp/output.flv -*/ -// ---- mencoder works -/* -PHPVIDEOTOOLKIT_MENCODER_BINARY.' -oac copy -ovc copy -idx -o '.$temp_file.' '.implode(' ', $this->_input_file); -*/ -// run a libmp3lame check as it require different mp3 codec - $audio_codec = 'mp3'; - $info = $this->getFFmpegInfo(); - if(isset($info['binary']['configuration']) && in_array('--enable-libmp3lame', $info['binary']['configuration'])) - { - $audio_codec = 'libmp3lame'; - } - -// build commands - $temp_files = array(); - $mkinfo_commands = array(); - $ffmpeg_commands = array(); - $cat_files = array(); - $unique = $this->unique(); - foreach($this->_input_file as $key=>$file) - { - $unique_name = $this->_tmp_directory.$unique.'-'.$key.'-temp.mpg'; - $unique_name_escaped = escapeshellarg($unique_name); - - $logfile1 = $this->_tmp_directory.$unique.'-'.$key.'-log1.log'; - $logfile2 = $this->_tmp_directory.$unique.'-'.$key.'-log2.log'; - - array_push($mkinfo_commands, array('cmd'=> 'mkfifo '.$unique_name_escaped.($log ? ' &> '.$logfile1 : ''), 'logfile'=>$logfile1)); - array_push($ffmpeg_commands, array('cmd'=> PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -i '.escapeshellarg($file).' -acodec '.$audio_codec.' -sameq '.$unique_name_escaped.' < /dev/null '.($log ? '&> '.$logfile2 : '&'), 'logfile'=>$logfile2)); - array_push($cat_files, $unique_name_escaped); -// array_push($this->_unlink_files, $unique_name); - if($log) - { -// array_push($this->_unlink_files, $logfile1); -// array_push($this->_unlink_files, $logfile2); - } - } -// start log - if($log) - { - $log_lines = array(); - array_unshift($log_lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_join_gunk'), $this->_getMessage('ffmpeg_log_separator')); - } -// mkinfo for temp files - foreach($mkinfo_commands as $cmd) - { -// exec($cmd['cmd']); - echo($cmd['cmd']."\r\n"); - if($log) - { - array_push($log_lines, '---------', trim(file_get_contents($cmd['logfile']))); - } - } -// extract data - foreach($ffmpeg_commands as $cmd) - { -// exec($cmd['cmd']); - echo($cmd['cmd']."\r\n"); - if($log) - { - array_push($log_lines, trim(file_get_contents($cmd['logfile'])), '---------'); - } - } - -// join command - $unique = $this->unique(); - $temp_join_file = $this->_tmp_directory.$unique.'-combined-joined.mpg'; - $temp_join_file_escaped = escapeshellarg($temp_join_file); - $temp_process_file = $this->_tmp_directory.$unique.'-combined-temp.mpg'; - $temp_process_file_escaped = escapeshellarg($temp_process_file); - $logfile = $this->_tmp_directory.$unique.'.log'; -// command for use with cat mkinfo files -// exec('cat '.implode(' ', $cat_files).' |\ -// '.PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -f mpeg -i - -sameq -vcodec mpeg4 -acodec '.$audio_codec.' '.escapeshellarg($temp_process_file).($log ? ' &> '.$logfile : '')); - echo('cat '.implode(' ', $cat_files).' |\ -'.PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -f mpeg -i - -sameq -vcodec mpeg4 -acodec '.$audio_codec.' '.escapeshellarg($temp_process_file).($log ? ' &> '.$logfile : '')."\r\n"); -// echo('cat '.implode(' ', $cat_files).' > '.$temp_join_file_escaped.' -// '.PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -i '.$temp_join_file_escaped.' -sameq -vcodec mpeg4 -acodec '.$audio_codec.' '.$temp_process_file_escaped.($log ? ' &> '.$logfile : '')); -// exec('cat '.implode(' ', $cat_files).' > '.$temp_join_file_escaped.' -// '.PHPVIDEOTOOLKIT_FFMPEG_BINARY.' -i '.$temp_join_file_escaped.' -sameq -vcodec mpeg4 -acodec '.$audio_codec.' '.$temp_process_file_escaped.($log ? ' &> '.$logfile : '')); - if($log) - { - array_push($log_lines, trim(file_get_contents($logfile))); - array_push($this->_unlink_files, $logfile); - $this->_addToLog($log_lines, 'r+'); - print_r($log_lines); - } - -// create a temp dir in the temp dir -// $temp_file = $this->_tmp_directory.$this->unique().'.'.array_pop(explode('.', $this->_process_address)); -// print_r($temp_file); - $this->addCommand('-i', $temp_process_file); - // array_push($this->_unlink_files, $temp_process_file); - - - exit; - } - - /** - * Checks to see if a given codec can be encoded by the current ffmpeg binary. - * @access public - * @param $codec string The shortcode for the codec to check for. - * @return boolean True if the codec can be encoded by ffmpeg, otherwise false. - */ - function canCodecBeEncoded($codec) - { - return $this->validateCodec($codec, 'encode'); - } - - /** - * Checks to see if a given codec can be decoded by the current ffmpeg binary. - * @access public - * @param $codec string The shortcode for the codec to check for. - * @return boolean True if the codec can be decoded by ffmpeg, otherwise false. - */ - function canCodecBeDecoded($codec) - { - return $this->validateCodec($codec, 'decode'); - } - - /** - * Checks to see if a given codec can be decoded by the current ffmpeg binary. - * @access public - * @param $codec string The shortcode for the codec to check for. - * @param $method string 'encode' or 'decode', The method to check against the codec - * @return boolean True if the codec can be used with the diven method by ffmpeg, otherwise false. - */ - function validateCodec($codec, $method) - { - $info = $this->getFFmpegInfo(); - return isset($info['formats'][$codec]) && isset($info['formats'][$codec][$method]) ? $info['formats'][$codec][$method] : false; - } - - /** - * Returns the available codecs. - * @access public - * @return array An array of codecs available to ffmpeg. - */ - function getAvailableCodecs() - { - $info = $this->getFFmpegInfo(); - return array_keys($info['formats']); - } - - /** - * Commits all the commands and executes the ffmpeg procedure. This will also attempt to validate any outputted files in order to provide - * some level of stop and check system. - * - * @access public - * @param $multi_pass_encode boolean Determines if multi (2) pass encoding should be used. - * @param $log boolean Determines if a log file of the results should be generated. - * @return mixed - * - false On error encountered. - * - PHPVIDEOTOOLKIT_RESULT_OK (bool true) If the file has successfully been processed and moved ok to the output address - * - PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE (int -1) If the file has successfully been processed but was not able to be moved correctly to the output address - * If this is the case you will manually need to move the processed file from the temp directory. You can - * get around this by settings the third argument from PHPVideoToolkit::setOutput(), $overwrite to true. - * - n (int) A positive integer is only returned when outputting a series of frame grabs from a movie. It dictates - * the total number of frames grabbed from the input video. You should also not however, that if a conflict exists - * with one of the filenames then this return value will not be returned, but PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE - * will be returned instead. - * Because of the mixed return value you should always go a strict evaluation of the returned value. ie - * - * $result = $toolkit->excecute(); - * if($result === false) - * { - * // error - * } - * else if($result === PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE) - * { - * // ok but a manual move is required. The file to move can be it can be retrieved by $toolkit->getLastOutput(); - * } - * else if($result === PHPVIDEOTOOLKIT_RESULT_OK) - * { - * // everything is ok. - * } - */ - function execute($multi_pass_encode=false, $log=false) - { -// check for inut and output params - $has_placeholder = preg_match('/\%([0-9]+)index/', $this->_process_address) || (strpos($this->_process_address, '%index') === false && strpos($this->_process_address, '%timecode') === false); - if($this->_input_file === null && !$has_placeholder) - { - return $this->_raiseError('execute_input_404'); -//<- exits - } -// check to see if the output address has been set - if($this->_process_address === null) - { - return $this->_raiseError('execute_output_not_set'); -//<- exits - } - -// check if temp dir is required and is writable - if(($multi_pass_encode || $log) && !is_writable($this->_tmp_directory)) - { - return $this->_raiseError('execute_temp_unwritable'); -//<- exits - } - - if(($this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE || $this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_FAIL) && is_file($this->_process_address)) - { - return $this->_raiseError('execute_overwrite_process'); -//<- exits - } - -// carry out some overwrite checks if required - $overwrite = ''; - switch($this->_overwrite_mode) - { - case PHPVIDEOTOOLKIT_OVERWRITE_UNIQUE : -// insert a unique id into the output address (the process address already has one) - $unique = $this->unique(); - $last_index = strrpos($this->_output_address, DS); - $this->_output_address = substr($this->_output_address, 0, $last_index+1).$unique.'-'.substr($this->_output_address, $last_index+1); - break; - - case PHPVIDEOTOOLKIT_OVERWRITE_EXISTING : -// add an overwrite command to ffmpeg execution call - $overwrite = '-y '; - break; - - case PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE : -// do nothing as the preservation comes later - break; - - case PHPVIDEOTOOLKIT_OVERWRITE_FAIL : - default : -// if the file should fail - if(!$has_placeholder && is_file($this->_output_address)) - { - return $this->_raiseError('execute_overwrite_fail'); -//<- exits - } - break; - } - - $this->_timer_start = PHPVideoToolkit::microtimeFloat(); - -// we have multiple inputs that require joining so convert them to a joinable format and join - if(is_array($this->_input_file)) - { - $this->_joinInput($log); - } - -// add the input file command to the mix - $this->addCommand('-i', $this->_input_file); - -// if multi pass encoding is enabled add the commands and logfile - if($multi_pass_encode) - { - $multi_pass_file = $this->_tmp_directory.$this->unique().'-multipass'; - $this->addCommand('-pass', 1); - $this->addCommand('-passlogfile', $multi_pass_file); - } - -// check to see if the format has been set and if it hasn't been set and the extension is a gif -// we need to add an extra argument to set the pix format. - $format = $this->hasCommand('-f'); - if($format === false) - { - $extension = strtolower(array_pop(explode('.', $this->_input_file))); - if($extension === 'gif') - { - $this->addCommand('-pix_fmt', 'rgb24'); - } - } - else if($format === PHPVIDEOTOOLKIT_FORMAT_GIF) - { - $this->addCommand('-pix_fmt', 'rgb24'); - } - -// check to see if an aspect ratio is set, if it is correct the width and heights to reflect that aspect ratio. -// This isn't strictly needed it is purely for informational purposes that this is done, because if the width is not -// inline with what is should be according to the aspect ratio ffmpeg will report the wrong final width and height -// when using it to lookup information about the file. - $ratio = $this->hasCommand('-aspect'); - if($ratio !== false) - { - $size = $this->hasCommand('-s'); - if($size === false) - { - $info = $this->getFileInfo(); - if(isset($info['video']) && isset($info['video']['dimensions'])) - { - $size = $info['video']['dimensions']['width'].'x'.$info['video']['dimensions']['height']; - } - } - if($size !== false) - { - $dim = explode('x', substr($size, 1, -1)); - if(($boundry = strpos($ratio, ':')) !== false) - { - $ratio = substr($ratio, 1, $boundry-1)/substr($ratio, $boundry+1, -1); - $new_width = round($dim[1]*$ratio); -// make sure new width is an even number - $ceiled = ceil($new_width); - $new_width = $ceiled % 2 !== 0 ? floor($new_width) : $ceiled; - if($new_width != $dim[0]) - { - $this->setVideoDimensions($new_width, $dim[1]); - } - } - else if(strpos($ratio, '.') !== false) - { - $ratio = floatval($ratio); - $new_width = $dim[1]*$ratio; -// make sure new width is an even number - $ceiled = ceil($new_width); - $new_width = $ceiled % 2 !== 0 ? floor($new_width) : $ceiled; - if($new_width != $dim[0]) - { - $this->setVideoDimensions($new_width, $dim[1]); - } - } - } - } - -// combine all the output commands - $command_string = $this->_combineCommands(); -// prepare the command suitable for exec -// the input and overwrite commands have specific places to be set so they have to be added outside of the combineCommands function - $exec_string = $this->_prepareCommand(PHPVIDEOTOOLKIT_FFMPEG_BINARY, $command_string, $overwrite.escapeshellcmd($this->_process_address)); -// $exec_string = $this->_prepareCommand(PHPVIDEOTOOLKIT_FFMPEG_BINARY, '-i '.$this->_commands['-i'].' '.$command_string, $overwrite.escapeshellcmd($this->_process_address)); - if($log) - { - $this->_log_file = $this->_tmp_directory.$this->unique().'.info'; - array_push($this->_unlink_files, $this->_log_file); - $exec_string = $exec_string.' &> '.$this->_log_file; - } - -// execute the command - exec($exec_string); - -// track the processed command by adding it to the class - array_unshift($this->_processed, $exec_string); - -// create the multiple pass encode - if($multi_pass_encode) - { - $pass2_exc_string = str_replace('-pass '.escapeshellarg(1), '-pass '.escapeshellarg(2), $exec_string); - exec($pass2_exc_string); - $this->_processed[0] = array($this->_processed[0], $pass2_exc_string); -// remove the multipass log file - unlink($multi_pass_file.'-0.log'); - } -// keep track of the time taken - $execution_time = PHPVideoToolkit::microtimeFloat() - $this->_timer_start; - array_unshift($this->_timers, $execution_time); - -// add the exec string to the log file - if($log) - { - $lines = $this->_processed[0]; - if(!is_array($lines)) - { - $lines = array($lines); - } - array_unshift($lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_command'), $this->_getMessage('ffmpeg_log_separator')); - array_unshift($lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_gunk'), $this->_getMessage('ffmpeg_log_separator')); - $this->_addToLog($lines, 'r+'); - } -// exit -// must validate a series of outputed items -// detect if the output address is a sequence output - if(preg_match('/\%([0-9]+)d/', $this->_process_address, $d_matches) || strpos($this->_process_address, '%d') !== false) - { -// get the path details - $process_info = pathinfo($this->_process_address); - $output_info = pathinfo($this->_output_address); - $pad_amount = intval($d_matches[1]); -// print_r(array($process_info, $output_info)); - -// get the %index padd amounts - $has_preg_index = preg_match('/\%([0-9]+)index/', $output_info['basename'], $index_matches); - $output_index_pad_amount = isset($index_matches[1]) ? intval($index_matches[1], 1) : 0; -// var_dump($index_matches); - -// init the iteration values - $num = 1; - $files = array(); - $produced = array(); - $error = false; - $name_conflict = false; - $file_exists = false; - -// get the first files name - $filename = $process_info['dirname'].DS.str_replace($d_matches[0], str_pad($num, $pad_amount, '0', STR_PAD_LEFT), $process_info['basename']); - $use_timecode = strpos($output_info['basename'], '%timecode') !== false; - $use_index = $has_preg_index || strpos($output_info['basename'], '%index') !== false; - -// if(!$use_timecode && $use_index) -// { -// if($log) -// { -// $this->_logResult('execute_overwrite_fail'); -// } -// return $this->_raiseError('execute_overwrite_fail'); -// } - -// start the timecode pattern replacement values - if($use_timecode) - { - $secs_start = $this->formatTimecode($this->_image_output_timecode_start, '%hh:%mm:%ss.%ms', '%mt', $this->_image_output_timecode_fps); - $fps_inc = 1/$this->_image_output_timecode_fps; - $fps_current_sec = 0; - $fps_current_frame = 0; - } - -// loop checking for file existence - while(@is_file($filename)) - { -// check for empty file - $size = filesize($filename); - if($size == 0) - { - $error = true; - } - array_push($produced, $filename); -// create the substitution arrays - $searches = array(); - $replacements = array(); - if($use_index) - { - array_push($searches, isset($index_matches[0]) ? $index_matches[0] : '%index'); - array_push($replacements, str_pad($num, $output_index_pad_amount, '0', STR_PAD_LEFT)); - } -// check if timecode is in the output name, no need to use it if not - if($use_timecode) - { - $fps_current_sec += $fps_inc; - $fps_current_frame += 1; - if($fps_current_sec >= 1) - { - $fps_current_sec = $fps_inc; - $secs_start += 1; - $fps_current_frame = 1; - } - $timecode = $this->formatSeconds($secs_start, $this->image_output_timecode_format, $this->_image_output_timecode_fps); - $timecode = str_replace(array(':', '.'), $this->timecode_seperator_output, $timecode); -// add to the substitution array - array_push($searches, '%timecode'); - array_push($replacements, $timecode); - } -// check if the file exists already and if it does check that it can be overriden - $old_filename = $filename; -// print_r(array($searches, $replacements, $output_info['basename'])); - $new_file = str_replace($searches, $replacements, $output_info['basename']); - $new_filename = $output_info['dirname'].DS.$new_file; -// var_dump($filename, $new_filename); - if(!is_file($new_filename) || $this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_EXISTING) - { - rename($filename, $new_filename); - $filename = $new_filename; - } -// the file exists and is not allowed to be overriden so just rename in the temp directory using the timecode - else if($this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE) - { - $new_filename = $process_info['dirname'].DS.'tbm-'.$this->unique().'-'.$new_file; - rename($filename, $new_filename); - $filename = $new_filename; -// add the error to the log file - if($log) - { - $this->_logResult('execute_image_file_exists', array('file'=>$new_filename)); - } -// flag the conflict - $file_exists = true; - } -// the file exists so the process must fail - else - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_overwrite_fail'); - } -// tidy up the produced files - array_merge($this->_unlink_files, $produced); - return $this->_raiseError('execute_overwrite_fail'); - } -// process the name change if the %d is to be replaced with the timecode - $num += 1; - $files[$filename] = $size > 0 ? basename($filename) : false; -// print_r("\r\n\r\n".is_file($old_filename)." - ".$old_filename.' => '.$new_filename); -// print_r($files); -// get the next incremented filename to check for existance - $filename = $process_info['dirname'].DS.str_replace($d_matches[0], str_pad($num, $pad_amount, '0', STR_PAD_LEFT), $process_info['basename']); - } -// de-increment the last num as it wasn't found - $num -= 1; - -// if the file was detected but were empty then display a different error - if($error === true) - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_partial_error', array('input'=>$this->_input_file)); - } - return $this->_raiseError('execute_partial_error', array('input'=>$this->_input_file)); -//<- exits - } -// post process any files -// print_r($files); - $post_process_result = $this->_postProcess($log, $files); -// print_r($files); - if(is_array($post_process_result)) - { -// post process has occurred and everything is fine - $num = count($files); - } - else if($post_process_result !== false) - { -// the file has encountered an error in the post processing of the files - return $post_process_result; - } -// var_dump("\r\n\r\n", $files, __LINE__, __FILE__, "\r\n\r\n"); -// exit; -// if the result is false then no post process has taken place - - $this->_process_file_count = $num; - -// no files were generated in this sequence - if($num == 0) - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_image_error', array('input'=>$this->_input_file)); - } - return $this->_raiseError('execute_image_error', array('input'=>$this->_input_file)); -//<- exits - } - -// add the files the the class a record of what has been generated - array_unshift($this->_files, $files); - - array_push($lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_output'), $this->_getMessage('ffmpeg_log_separator'), implode("\n", $files)); - $this->_addToLog($lines, 'r+'); - - return $file_exists ? PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE : PHPVIDEOTOOLKIT_RESULT_OK; - } -// must validate one file - else - { -// check that it is a file - if(!is_file($this->_process_address)) - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_output_404', array('input'=>$this->_input_file)); - } - return $this->_raiseError('execute_output_404', array('input'=>$this->_input_file)); -//<- exits - } -// the file does exist but is it empty? - if(filesize($this->_process_address) == 0) - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_output_empty', array('input'=>$this->_input_file)); - } - return $this->_raiseError('execute_output_empty', array('input'=>$this->_input_file)); -//<- exits - } -// the file is ok so move to output address - if(!is_file($this->_output_address) || $this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_EXISTING) - { -// post process any files - $post_process_result = $this->_postProcess($log, array($this->_process_address)); - if(is_array($post_process_result) || $post_process_result === true) - { -// post process has occurred and everything is fine - } - else if($post_process_result !== false) - { - return $post_process_result; - } -// if the result is false then no post process has taken place - -// rename the file to the final destination and check it went ok - if(rename($this->_process_address, $this->_output_address)) - { - array_push($lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_output'), $this->_getMessage('ffmpeg_log_separator'), $this->_output_address); - $this->_addToLog($lines, 'r+'); - -// the file has been renamed ok -// add the error to the log file - if($log) - { - $this->_logResult('execute_result_ok', array('output'=>$this->_output_address)); - } - $this->_process_file_count = 1; -// add the file the the class a record of what has been generated - array_unshift($this->_files, array($this->_output_address)); - return PHPVIDEOTOOLKIT_RESULT_OK; - } -// renaming failed so return ok but erro - else - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_result_ok_but_unwritable', array('process'=>$this->_process_address, 'output'=>$this->_output_address)); - } -// add the file the the class a record of what has been generated - array_unshift($this->_files, array($this->_process_address)); - array_push($lines, $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_output'), $this->_getMessage('ffmpeg_log_separator'), $this->_process_address); - $this->_addToLog($lines, 'r+'); - return PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE; - } - } -// if it is not we signal that it has been created but has not been moved. - else if($this->_overwrite_mode == PHPVIDEOTOOLKIT_OVERWRITE_PRESERVE) - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_result_ok_but_unwritable', array('process'=>$this->_process_address, 'output'=>$this->_output_address)); - } -// add the file the the class a record of what has been generated - array_unshift($this->_files, array($this->_process_address)); - return PHPVIDEOTOOLKIT_RESULT_OK_BUT_UNWRITABLE; - } -// the file exists so the process must fail - else - { -// add the error to the log file - if($log) - { - $this->_logResult('execute_overwrite_fail'); - } -// tidy up the produced files - array_push($this->_unlink_files, $this->_process_address); - return $this->_raiseError('execute_overwrite_fail'); - } - } - - return null; - - } - - /** - * This function registers a post process after the internal handling of the ffmpeg output has been cleaned and checked. - * Each function that is set will be called in the order it is set unless an index is specified. All callbacks will be - * supplied with one argument with is an array of the outputted files. - * - * NOTE1: If a post process function is being applied to an outputted video or audio then the process will be applied - * before it has been moved to it's final destination, however if the output is an image sequence the post process - * function will be called after the images have been moved to their final destinations. - * - * NOTE2: Also it is important to return a boolean 'true' if the post process has been carried out ok. If the process is not - * a true value then the value will be treated/returned as an error and if applicable logged. - * - * @access public - * @param string $function The name of a function - * @param object|boolean $class The name of the callback class. If left as false the callback will be treated as a standalone function. - * @param integer|boolean $index The index of the callback array to put the callback into. If left as false it will be pushed to the end of the array. - */ - function registerPostProcess($function, $class=false, $index=false) - { -// create the callback - $callback = $class === false ? $function : array(&$class, $function); -// add it to the post process array - if($index === false) - { - array_push($this->_post_processes, $callback); - } - else - { - $this->_post_processes[$index] = $callback; - } - } - - /** - * Carries out the post processing of the files. - * - * @access private - * @param boolean $log Determines if logging of errors should be carried out. - * @param array $files The array of files that have just been processed. - * @return mixed - */ - function _postProcess($log, $files) - { - if(count($this->_post_processes)) - { -// loop through the post processes - foreach($this->_post_processes as $key=>$process) - { -// call the process - $return_value = call_user_func_array($process, array($files)); -// if the return value is not strictly equal to true the result will be treated as an error and exit the process loop - if(!is_array($return_value) && $return_value !== true) - { - if($log) - { - $this->_logResult($return_value); - } - return $this->_raiseError($return_value); - } - } - return $return_value; - } - return false; - } - - /** - * Returns the number of files outputted in this run. It will be reset when you call PHPVideoToolkit::reset(); - * - * @access public - * @return integer - */ - function getFileOutputCount() - { - return $this->_process_file_count; - } - - /** - * Adds lines to the current log file. - * - * @access private - * @param $message - * @param $replacements - */ - function _logResult($message, $replacements=false) - { - $this->_addToLog(array($this->_getMessage('ffmpeg_log_separator'), $this->_getMessage('ffmpeg_log_ffmpeg_result'), $this->_getMessage('ffmpeg_log_separator'), $this->_getMessage($message, $replacements))); - } - - /** - * Adds lines to the current log file. - * - * @access private - * @param $lines array An array of lines to add to the log file. - */ - function _addToLog($lines, $where='a') - { - $handle = fopen($this->_log_file, $where); - if(is_array($lines)) - { - $data = implode("\n", $lines)."\n"; - } - else - { - $data = $lines."\n"; - } - fwrite($handle, $data); - fclose($handle); - } - - /** - * Moves the current log file to another file. - * - * @access public - * @param $destination string The absolute path of the new filename for the log. - * @return boolean Returns the result of the log file rename. - */ - function moveLog($destination) - { - $result = false; - if($this->_log_file !== null && is_file($this->_log_file)) - { - $result = rename($this->_log_file, $destination); - $this->_log_file = $destination; - } - return $result; - } - - /** - * Reads the current log file - * - * @access public - * @return string|boolean Returns the current log file content. Returns false on failure. - */ - function readLog() - { - if($this->_log_file !== null && is_file($this->_log_file)) - { - $handle = fopen($this->_log_file, 'r'); - $contents = fread($handle, filesize($this->_log_file)); - fclose($handle); - return $contents; - } - return false; - } - - /** - * Returns the last outputted file that was processed by ffmpeg from this class. - * - * @access public - * @return mixed array|string Will return an array if the output was a sequence, or string if it was a single file output - */ - function getLastOutput() - { - return $this->_files[0]; - } - - /** - * Returns all the outputted files that were processed by ffmpeg from this class. - * - * @access public - * @return array - */ - function getOutput() - { - return $this->_files; - } - - /** - * Returns the amount of time taken of the last file to be processed by ffmpeg. - * - * @access public - * @return mixed integer Will return the time taken in seconds. - */ - function getLastProcessTime() - { - return $this->_timers[0]; - } - - /** - * Returns the amount of time taken of all the files to be processed by ffmpeg. - * - * @access public - * @return array - */ - function getProcessTime() - { - return $this->_timers; - } - - /** - * Returns the last encountered error message. - * - * @access public - * @return string - */ - function getLastError() - { - return $this->_errors[0]; - } - - /** - * Returns all the encountered errors as an array of strings - * - * @access public - * @return array - */ - function getErrors() - { - return $this->_errors; - } - - /** - * Returns the last command that ffmpeg was given. - * (Note; if setFormatToFLV was used in the last command then an array is returned as a command was also sent to FLVTool2) - * - * @access public - * @return mixed array|string - */ - function getLastCommand() - { - return $this->_processed[0]; - } - - /** - * Returns all the commands sent to ffmpeg from this class - * - * @access public - * @return unknown - */ - function getCommands() - { - return $this->_processed; - } - - /** - * Raises an error - * - * @access private - * @param string $message - * @param array $replacements a list of replacements in search=>replacement format - * @return boolean Only returns false if $toolkit->on_error_die is set to false - */ - function _raiseError($message, $replacements=false) - { - $msg = 'PHPVideoToolkit Error: '.$this->_getMessage($message, $replacements); -// check what the error is supposed to do - if($this->on_error_die === true) - { - die($msg); -//<- exits - } -// add the error message to the collection - array_unshift($this->_errors, $msg); - return false; - } - - /** - * Gets a message. - * - * @access private - * @param string $message - * @param array $replacements a list of replacements in search=>replacement format - * @return boolean Only returns false if $toolkit->on_error_die is set to false - */ - function _getMessage($message, $replacements=false) - { - $message = isset($this->_messages[$message]) ? $this->_messages[$message] : 'Unknown!!!'; - if($replacements) - { - $searches = $replaces = array(); - foreach($replacements as $search=>$replace) - { - array_push($searches, '#'.$search); - array_push($replaces, $replace); - } - $message = str_replace($searches, $replaces, $message); - } - return $message; - } - - /** - * Adds a command to be bundled into the ffmpeg command call. - * (SPECIAL NOTE; None of the arguments are checked or sanitized by this function. BE CAREFUL if manually using this. The commands and arguments are escaped - * however it is still best to check and sanitize any params given to this function) - * - * @access public - * @param string $command - * @param mixed $argument - * @return boolean - */ - function addCommand($command, $argument=false) - { - $this->_commands[$command] = $argument === false ? false : escapeshellarg($argument); - return true; - } - - /** - * Determines if the the command exits. - * - * @access public - * @param string $command - * @return mixed boolean if failure or value if exists. - */ - function hasCommand($command) - { - return isset($this->_commands[$command]) ? ($this->_commands[$command] === false ? true : $this->_commands[$command]): false; - } - - /** - * Combines the commands stored into a string - * - * @access private - * @return string - */ - function _combineCommands() - { - $before_input = array(); - $after_input = array(); - $input = null; - foreach ($this->_commands as $command=>$argument) - { - $command_string = trim($command.(!empty($argument) ? ' '.$argument : '')); -// check for specific none combinable commands as they have specific places they have to go in the string - switch($command) - { - case '-i' : - $input = $command_string; - break; - case '-inputr' : - $command_string = trim('-r'.($argument ? ' '.$argument : ''));; - default : - if(in_array($command, $this->_cmds_before_input)) - { - array_push($before_input, $command_string); - } - else - { - array_push($after_input, $command_string); - } - } - } - - $before_input = count($before_input) ? implode(' ', $before_input).' ' : ''; - $after_input_string = ' '; - if(count($after_input)) - { - $input .= ' '; - $after_input_string = implode(' ', $after_input).' '; - } - - return $before_input.$input.$after_input_string; - } - - /** - * Prepares the command for execution - * - * @access private - * @param string $path Path to the binary - * @param string $command Command string to execute - * @param string $args Any additional arguments - * @return string - */ - function _prepareCommand($path, $command, $args='') - { - if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' || !preg_match('/\s/', $path)) - { - return $path.' '.$command.' '.$args; - } - return 'start /D "'.$path.'" /B '.$command.' '.$args; - } - - /** - * Generates a unique id. Primarily used in jpeg to movie production - * - * @access public - * @param string $prefix - * @return string - */ - function unique($prefix='') - { - return uniqid($prefix.time().'-'); - } - - /** - * Destructs ffmpeg and removes any temp files/dirs - * @access private - */ - function __destruct() - { -// loop through the temp files to remove first as they have to be removed before the dir can be removed - if(!empty($this->_unlink_files)) - { - foreach ($this->_unlink_files as $key=>$file) - { - if(is_file($file)) - { - @unlink($file); - } - } - $this->_unlink_files = array(); - } -// loop through the dirs to remove - if(!empty($this->_unlink_dirs)) - { - foreach ($this->_unlink_dirs as $key=>$dir) - { - if(is_dir($dir)) - { - @rmdir($dir); - } - } - $this->_unlink_dirs = array(); - } - } - } - diff --git a/libraries/phpvideotoolkit/queue.sql b/libraries/phpvideotoolkit/queue.sql deleted file mode 100644 index 2f93bdc..0000000 --- a/libraries/phpvideotoolkit/queue.sql +++ /dev/null @@ -1,17 +0,0 @@ - -CREATE TABLE IF NOT EXISTS `video_queue` ( - `queue_id` int(11) unsigned NOT NULL auto_increment, - `queue_user_profile_id` int(11) unsigned NOT NULL, - `queue_user_requires_notification` enum('no','yes') NOT NULL default 'no', - `queue_video_filename` varchar(120) NOT NULL, - `queue_video_status` enum('pending','processing','processed','failed') NOT NULL default 'pending', - `queue_video_output_dir` varchar(255) NOT NULL, - `queue_failure_reason` varchar(255) NOT NULL, - `queue_addition_date` datetime NOT NULL default '0000-00-00 00:00:00', - `queue_processing_date` datetime NOT NULL default '0000-00-00 00:00:00', - `queue_processed_date` datetime NOT NULL default '0000-00-00 00:00:00', - PRIMARY KEY (`queue_id`), - KEY `queue_addition_date` (`queue_addition_date`), - KEY `queue_processed_date` (`queue_processed_date`), - KEY `queue_processing_date` (`queue_processing_date`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; diff --git a/transcoders/video_ffmpeg.inc b/transcoders/video_ffmpeg.inc index 1c2dcc6..a2aecad 100644 --- a/transcoders/video_ffmpeg.inc +++ b/transcoders/video_ffmpeg.inc @@ -148,7 +148,7 @@ class video_ffmpeg implements transcoder_interface { && variable_get('video_use_preset_wxh', FALSE)) { $video->dimensions = $settings['width'] . 'x' . $settings['height']; } - $converted = $converted_base_dir . '/' . file_munge_filename(str_replace(' ', '_', pathinfo($original_video_path, PATHINFO_FILENAME)) . '.' . $settings['video_extension'], $settings['video_extension']); + $converted = $converted_base_dir . '/' . file_munge_filename(str_replace(' ', '_', pathinfo($original_video_path, PATHINFO_FILENAME)) . '_' . strtolower($name) . '.' . $settings['video_extension'], $settings['video_extension']); //get the actual video file path from the stream wrappers $converted_video_path = drupal_realpath($converted); $dimensions = $this->dimensions($video); diff --git a/transcoders/video_phpvideotoolkit.inc b/transcoders/video_phpvideotoolkit.inc index b4bc96e..a16aded 100644 --- a/transcoders/video_phpvideotoolkit.inc +++ b/transcoders/video_phpvideotoolkit.inc @@ -54,7 +54,6 @@ class video_phpvideotoolkit implements transcoder_interface { foreach ($available_codecs as $key => $value) { $codecs['encode'][$key] = array(); $codecs['decode'][$key] = array(); - foreach ($value as $codec_key => $codec) { if ($codec['encode']) { $codecs['encode'][$key][$codec_key] = $codec['fullname']; @@ -64,7 +63,6 @@ class video_phpvideotoolkit implements transcoder_interface { } } } - return $codecs; } @@ -166,7 +164,7 @@ class video_phpvideotoolkit implements transcoder_interface { && variable_get('video_use_preset_wxh', FALSE)) { $video->dimensions = $settings['width'] . 'x' . $settings['height']; } - $converted_filename = file_munge_filename(str_replace(' ', '_', pathinfo($original_video_path, PATHINFO_FILENAME)) . '.' . $settings['video_extension'], $settings['video_extension']); + $converted_filename = file_munge_filename(str_replace(' ', '_', pathinfo($original_video_path, PATHINFO_FILENAME)) . '_' . strtolower($name) . '.' . $settings['video_extension'], $settings['video_extension']); $converted = $converted_base_dir . '/' . $converted_filename; //get the actual video file path from the stream wrappers $converted_video_path = drupal_realpath($converted); diff --git a/video.field.inc b/video.field.inc index 72b15e5..c848b5e 100644 --- a/video.field.inc +++ b/video.field.inc @@ -135,7 +135,7 @@ function video_field_presave($entity_type, $entity, $field, $instance, $langcode if (!empty($field['settings']['default_video_thumbnail'])) { foreach ($items as $delta => $item) { if ($item['use_default_video_thumb']) - $items[$delta]['thumbanail'] = $field['settings']['default_video_thumbnail']['fid']; + $items[$delta]['thumbnail'] = $field['settings']['default_video_thumbnail']['fid']; } } file_field_presave($entity_type, $entity, $field, $instance, $langcode, $items); diff --git a/video.install b/video.install index 0d1c8e7..450fb48 100644 --- a/video.install +++ b/video.install @@ -156,7 +156,7 @@ function video_field_schema($field) { 'not null' => FALSE, 'unsigned' => TRUE, ), - 'thumbanail' => array( + 'thumbnail' => array( 'description' => 'The {file_managed}.fid being referenced for video thumbanil.', 'type' => 'int', 'not null' => FALSE, diff --git a/video.module b/video.module index 8d31806..bc5aa2f 100644 --- a/video.module +++ b/video.module @@ -176,12 +176,12 @@ function video_thumb_process(&$element, &$form_state) { } if (!empty($thumbss)) { - $element['thumbanail'] = array( + $element['thumbnail'] = array( '#type' => 'radios', '#title' => t('Video thumbnails'), '#element_validate' => array('video_thumbnail_validate'), '#options' => $thumbss, - '#default_value' => !empty($file['thumbanail']) ? $file['thumbanail'] : $thumbs[$default_thumb]->fid, + '#default_value' => !empty($file['thumbnail']) ? $file['thumbnail'] : $thumbs[$default_thumb]->fid, '#weight' => 10, '#attributes' => array('class' => array('video-thumbnails'), 'onchange' => 'videoftp_thumbnail_change()', 'rel' => 'video_large_thumbnail-' . $delta), ); @@ -193,26 +193,26 @@ function video_thumb_process(&$element, &$form_state) { // if fail creating thumbnails fall back to manual or manual upload if ((!empty($gen_fail) && $field['settings']['autothumbnail'] == 'auto_fallback') || $field['settings']['autothumbnail'] == 'manual_upload') { - $element['thumbanail'] = array( + $element['thumbnail'] = array( '#title' => t('Video thumbnail'), // '#element_validate' => array('video_thumbnail_validate'), '#type' => 'managed_file', '#description' => t('The uploaded image will be used as video thumbnail on this video.'), - '#default_value' => !empty($file['thumbanail']['fid']) && is_integer($file['thumbanail']['fid']) ? $file['thumbanail']['fid'] : NULL, + '#default_value' => !empty($file['thumbnail']['fid']) && is_integer($file['thumbnail']['fid']) ? $file['thumbnail']['fid'] : NULL, '#upload_location' => file_default_scheme() . '://' . variable_get('video_thumb_path', 'videos/thumbnails') . '/' . $file['fid'], ); } // if no thumbnail creation if ($field['settings']['autothumbnail'] == 'no') { - $element['thumbanail'] = array( + $element['thumbnail'] = array( '#type' => 'value', '#value' => NULL, ); } // Setup our large thumbnail that is on the left. // @todo Add smaller video preview instead of thumbnail? - if (isset($file['thumbanail']) && !empty($file['thumbanail'])) { - $large_thumb = file_load($file['thumbanail']); + if (isset($file['thumbnail']) && !empty($file['thumbnail'])) { + $large_thumb = file_load($file['thumbnail']); } elseif (!empty($field['settings']['default_video_thumbnail']['fid'])) { $large_thumb = file_load($field['settings']['default_video_thumbnail']['fid']); diff --git a/video.theme.inc b/video.theme.inc index 065845a..b70e065 100644 --- a/video.theme.inc +++ b/video.theme.inc @@ -235,8 +235,8 @@ function theme_video_html5($variables) { $items = _video_object_to_array($video->files); $items +=array('thumbnail' => (array) $video->thumbnail); $attributes = array(); - $attributes['width'] = $video->width; - $attributes['height'] = $video->height; + $attributes['width'] = $video->player_width;; + $attributes['height'] = $video->player_height; return theme('videojs', array('items' => $items, 'player_id' => 'video-' . $video->fid, 'attributes' => $attributes)); break; } |