diff --git a/src/Zend/Media/Iso14496/Box/Dinf.php b/src/Zend/Media/Iso14496/Box/Dinf.php new file mode 100644 index 0000000..031676b --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Dinf.php @@ -0,0 +1,72 @@ +Data Information Box contains objects that declare the location + * of the media information in a track. + * + + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Dinf extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Dref.php b/src/Zend/Media/Iso14496/Box/Dref.php new file mode 100644 index 0000000..de43527 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Dref.php @@ -0,0 +1,100 @@ +Data Reference Box 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 Zend_Media_Iso14496_Box_Urn urn} or + * {@link Zend_Media_Iso14496_Box_Url url} boxes. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Dref extends Zend_Media_Iso14496_FullBox +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + 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 heap size in bytes. + * + * @return integer + */ + public function getHeapSize() + { + return parent::getHeapSize() + 4; + } + + /** + * Writes the box data. + * + * @param Zend_Io_Writer $writer The writer object. + * @return void + */ + protected function _writeData($writer) + { + parent::_writeData($writer); + $writer->writeUInt32BE($this->getBoxCount()); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Edts.php b/src/Zend/Media/Iso14496/Box/Edts.php new file mode 100644 index 0000000..28cce31 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Edts.php @@ -0,0 +1,76 @@ +Edit Box 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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Edts extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Iinf.php b/src/Zend/Media/Iso14496/Box/Iinf.php new file mode 100644 index 0000000..45db60a --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Iinf.php @@ -0,0 +1,100 @@ +Item Information Box provides extra information about selected + * items, including symbolic (file) 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. + * + + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Iinf extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + 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 heap size in bytes. + * + * @return integer + */ + public function getHeapSize() + { + return parent::getHeapSize() + 2; + } + + /** + * Writes the box data. + * + * @param Zend_Io_Writer $writer The writer object. + * @return void + */ + protected function _writeData($writer) + { + parent::_writeData($writer); + $writer->writeUInt16BE($this->getBoxCount()); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Imif.php b/src/Zend/Media/Iso14496/Box/Imif.php new file mode 100644 index 0000000..6f02d4b --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Imif.php @@ -0,0 +1,91 @@ +IPMP Information Box 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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Imif extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Ipro.php b/src/Zend/Media/Iso14496/Box/Ipro.php new file mode 100644 index 0000000..70235a4 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Ipro.php @@ -0,0 +1,95 @@ +Item Protection Box provides an array of item protection + * information, for use by the + * {@link Zend_Media_Iso14496_Box_Iinf Item Information Box}. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Ipro extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + 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 heap size in bytes. + * + * @return integer + */ + public function getHeapSize() + { + return parent::getHeapSize() + 2; + } + + /** + * Writes the box data. + * + * @param Zend_Io_Writer $writer The writer object. + * @return void + */ + protected function _writeData($writer) + { + parent::_writeData($writer); + $writer->writeUInt16BE($this->getBoxCount()); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Mdia.php b/src/Zend/Media/Iso14496/Box/Mdia.php new file mode 100644 index 0000000..4e6a7cc --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Mdia.php @@ -0,0 +1,71 @@ +Media Box contains all the objects that declare information about + * the media data within a track. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Mdia extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Meta.php b/src/Zend/Media/Iso14496/Box/Meta.php new file mode 100644 index 0000000..84b3c9c --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Meta.php @@ -0,0 +1,91 @@ +Meta Box contains descriptive or annotative metadata. The + * meta box is required to contain a + * {@link Zend_Media_Iso14496_Box_Hdlr hdlr} box indicating the structure or + * format of the meta 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 Zend_Media_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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Meta extends Zend_Media_Iso14496_FullBox +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Mfra.php b/src/Zend/Media/Iso14496/Box/Mfra.php new file mode 100644 index 0000000..bdb470c --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Mfra.php @@ -0,0 +1,86 @@ +Movie Fragment Random Access Box 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. + * + + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Mfra extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Minf.php b/src/Zend/Media/Iso14496/Box/Minf.php new file mode 100644 index 0000000..f539564 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Minf.php @@ -0,0 +1,71 @@ +Media Information Box contains all the objects that declare + * characteristic information of the media in the track. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Minf extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Moof.php b/src/Zend/Media/Iso14496/Box/Moof.php new file mode 100644 index 0000000..2c3b2b7 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Moof.php @@ -0,0 +1,81 @@ +Movie Fragment Box extend the presentation in time. They provide + * the information that would previously have been in the + * {@link Zend_Media_Iso14496_Box_Moov Movie Box}. The actual samples are in + * {@link Zend_Media_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 Zend_Media_Iso14496_Box_Mfhd Movie Fragment Header Box}, and then one + * or more {@link Zend_Media_Iso14496_Box_Traf Track Fragment Boxes}. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Moof extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Mvex.php b/src/Zend/Media/Iso14496/Box/Mvex.php new file mode 100644 index 0000000..ce212f5 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Mvex.php @@ -0,0 +1,74 @@ +Movie Extends Box warns readers that there might be + * {@link Zend_Media_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 Zend_Media_Iso14496_Box_Moov Movie Box}. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Mvex extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Schi.php b/src/Zend/Media/Iso14496/Box/Schi.php new file mode 100644 index 0000000..e52a1fd --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Schi.php @@ -0,0 +1,74 @@ +Scheme Information Box 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 Zend_Media_Iso14496_Box_Schm Scheme Type Box}. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Schi extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Sinf.php b/src/Zend/Media/Iso14496/Box/Sinf.php new file mode 100644 index 0000000..fff92d6 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Sinf.php @@ -0,0 +1,87 @@ +Protection Scheme Information Box 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 Zend_Media_Iso14496_Box_Imif IPMP Info Box}, + * when IPMP descriptors outside MPEG-4 systems are used; + * c) Scheme signaling: a {@link Zend_Media_Iso14496_Box_Schm Scheme Type Box} + * and {@link Zend_Media_Iso14496_Box_Schi Scheme Information Box}, when + * these are used (either both must occur, or neither). + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Sinf extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Skip.php b/src/Zend/Media/Iso14496/Box/Skip.php new file mode 100644 index 0000000..0858008 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Skip.php @@ -0,0 +1,73 @@ +Free Space Box 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). + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Skip extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Stbl.php b/src/Zend/Media/Iso14496/Box/Stbl.php new file mode 100644 index 0000000..9a09c7a --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Stbl.php @@ -0,0 +1,92 @@ +Sample Table Box 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 Zend_Media_Iso14496_Box_Stsd Sample Description}, + * {@link Zend_Media_Iso14496_Box_Stsz Sample Size}, + * {@link Zend_Media_Iso14496_Box_Stsc Sample To Chunk}, and + * {@link Zend_Media_Iso14496_Box_Stco Chunk Offset}. Further, the + * {@link Zend_Media_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 Zend_Media_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 Zend_Media_Iso14496_Box_Stss Sync Sample Box} is optional. If the + * Sync Sample Box is not present, all samples are sync samples. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Stbl extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Traf.php b/src/Zend/Media/Iso14496/Box/Traf.php new file mode 100644 index 0000000..1c6c533 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Traf.php @@ -0,0 +1,77 @@ +Track Fragment Box 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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Traf extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Trak.php b/src/Zend/Media/Iso14496/Box/Trak.php new file mode 100644 index 0000000..6048c76 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Trak.php @@ -0,0 +1,83 @@ +Track Box 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 Zend_Media_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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Trak extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Tref.php b/src/Zend/Media/Iso14496/Box/Tref.php new file mode 100644 index 0000000..1a8e5c6 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Tref.php @@ -0,0 +1,81 @@ +Track Reference Box provides a reference from the containing track + * to another track in the presentation. These references are typed. A + * {@link Zend_Media_Iso14496_Box_Hint hint} reference links from the containing + * hint track to the media data that it hints. A content description reference + * {@link Zend_Media_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 Zend_Media_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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Tref extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +} diff --git a/src/Zend/Media/Iso14496/Box/Udta.php b/src/Zend/Media/Iso14496/Box/Udta.php new file mode 100644 index 0000000..3979035 --- /dev/null +++ b/src/Zend/Media/Iso14496/Box/Udta.php @@ -0,0 +1,75 @@ +User Data Box 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. + * + * @category Zend + * @package Zend_Media + * @subpackage ISO 14496 + * @author Sven Vollbehr + * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id$ + */ +final class Zend_Media_Iso14496_Box_Udta extends Zend_Media_Iso14496_Box +{ + /** + * Constructs the class with given parameters and reads box related data + * from the ISO Base Media file. + * + * @param Zend_Io_Reader $reader The reader object. + * @param Array $options The options array. + */ + public function __construct($reader = null, &$options = array()) + { + parent::__construct($reader, $options); + $this->setContainer(true); + + if ($reader === null) { + return; + } + + $this->constructBoxes(); + } +}