Fix file properties
git-svn-id: http://php-reader.googlecode.com/svn/branches/zend@166 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
@@ -1,118 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Bxml extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var string */
|
||||
private $_xml;
|
||||
|
||||
/**
|
||||
* 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, &$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the binary data.
|
||||
*
|
||||
* @param string $xml The XML data.
|
||||
*/
|
||||
public function setXml($xml)
|
||||
{
|
||||
$this->_xml = $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + strlen($this->_xml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write($this->_xml);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Bxml extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var string */
|
||||
private $_xml;
|
||||
|
||||
/**
|
||||
* 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, &$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the binary data.
|
||||
*
|
||||
* @param string $xml The XML data.
|
||||
*/
|
||||
public function setXml($xml)
|
||||
{
|
||||
$this->_xml = $xml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + strlen($this->_xml);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write($this->_xml);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,133 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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 Zend_Media_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 Zend_Media_Iso14496_Box_Moov Movie Box}) at the front, as the size of
|
||||
* the {@link Zend_Media_Iso14496_Box_Moov Movie Box} will affect the chunk
|
||||
* offsets to the media data.
|
||||
*
|
||||
* This box variant contains 64-bit offsets.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Co64 extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var Array */
|
||||
private $_chunkOffsetTable = array();
|
||||
|
||||
/**
|
||||
* 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, &$options = array())
|
||||
{
|
||||
parent::__construct($reader, $options);
|
||||
|
||||
$entryCount = $this->_reader->readUInt32BE();
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$this->_chunkOffsetTable[$i] = $this->_reader->readInt64BE();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 + count($this->_chunkOffsetTable) * 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
$writer->writeUInt32BE($entryCount = count($this->_chunkOffsetTable));
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$writer->writeInt64BE($this->_chunkOffsetTable[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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 Zend_Media_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 Zend_Media_Iso14496_Box_Moov Movie Box}) at the front, as the size of
|
||||
* the {@link Zend_Media_Iso14496_Box_Moov Movie Box} will affect the chunk
|
||||
* offsets to the media data.
|
||||
*
|
||||
* This box variant contains 64-bit offsets.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Co64 extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var Array */
|
||||
private $_chunkOffsetTable = array();
|
||||
|
||||
/**
|
||||
* 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, &$options = array())
|
||||
{
|
||||
parent::__construct($reader, $options);
|
||||
|
||||
$entryCount = $this->_reader->readUInt32BE();
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$this->_chunkOffsetTable[$i] = $this->_reader->readInt64BE();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 + count($this->_chunkOffsetTable) * 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
$writer->writeUInt32BE($entryCount = count($this->_chunkOffsetTable));
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$writer->writeInt64BE($this->_chunkOffsetTable[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,150 +1,150 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Copyright Box</i> contains a copyright declaration which applies to
|
||||
* the entire presentation, when contained within the
|
||||
* {@link Zend_Media_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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Cprt extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_Reader $reader The reader object.
|
||||
* @param Array $options The options array.
|
||||
* @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->readString8
|
||||
($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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets 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}.
|
||||
*
|
||||
* @param string $language The language code.
|
||||
*/
|
||||
public function setLanguage($language)
|
||||
{
|
||||
$this->_language = $language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the copyright notice.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNotice()
|
||||
{
|
||||
return $this->_notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the copyright notice.
|
||||
*
|
||||
* @param string $notice The copyright notice.
|
||||
*/
|
||||
public function setNotice($notice)
|
||||
{
|
||||
$this->_notice = $notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 3 + strlen($this->_notice);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt16BE((ord($this->_language[0]) - 0x60) << 10 |
|
||||
(ord($this->_language[1])- 0x60) << 5 |
|
||||
(ord($this->_language[2])- 0x60))
|
||||
->writeString8($this->_notice, 1);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Copyright Box</i> contains a copyright declaration which applies to
|
||||
* the entire presentation, when contained within the
|
||||
* {@link Zend_Media_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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Cprt extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_Reader $reader The reader object.
|
||||
* @param Array $options The options array.
|
||||
* @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->readString8
|
||||
($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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets 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}.
|
||||
*
|
||||
* @param string $language The language code.
|
||||
*/
|
||||
public function setLanguage($language)
|
||||
{
|
||||
$this->_language = $language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the copyright notice.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNotice()
|
||||
{
|
||||
return $this->_notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the copyright notice.
|
||||
*
|
||||
* @param string $notice The copyright notice.
|
||||
*/
|
||||
public function setNotice($notice)
|
||||
{
|
||||
$this->_notice = $notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 3 + strlen($this->_notice);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt16BE((ord($this->_language[0]) - 0x60) << 10 |
|
||||
(ord($this->_language[1])- 0x60) << 5 |
|
||||
(ord($this->_language[2])- 0x60))
|
||||
->writeString8($this->_notice, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,139 +1,139 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Ctts extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var Array */
|
||||
private $_compositionOffsetTable = array();
|
||||
|
||||
/**
|
||||
* 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, &$options = array())
|
||||
{
|
||||
parent::__construct($reader, $options);
|
||||
|
||||
$entryCount = $this->_reader->readUInt32BE();
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$this->_compositionOffsetTable[$i] = array
|
||||
('sampleCount' => $this->_reader->readUInt32BE(),
|
||||
'sampleOffset' => $this->_reader->readUInt32BE());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an array of values. Each entry must have 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).
|
||||
*
|
||||
* @param Array $compositionOffsetTable The array of values.
|
||||
*/
|
||||
public function setCompositionOffsetTable($compositionOffsetTable)
|
||||
{
|
||||
$this->_compositionOffsetTable = $compositionOffsetTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 +
|
||||
count($this->_compositionOffsetTable) * 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt32BE($entryCount = count($this->_compositionOffsetTable));
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$writer->writeUInt32BE
|
||||
($this->_compositionOffsetTable[$i]['sampleCount'])
|
||||
->writeUInt32BE
|
||||
($this->_compositionOffsetTable[$i]['sampleOffset']);
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Ctts extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var Array */
|
||||
private $_compositionOffsetTable = array();
|
||||
|
||||
/**
|
||||
* 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, &$options = array())
|
||||
{
|
||||
parent::__construct($reader, $options);
|
||||
|
||||
$entryCount = $this->_reader->readUInt32BE();
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$this->_compositionOffsetTable[$i] = array
|
||||
('sampleCount' => $this->_reader->readUInt32BE(),
|
||||
'sampleOffset' => $this->_reader->readUInt32BE());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an array of values. Each entry must have 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).
|
||||
*
|
||||
* @param Array $compositionOffsetTable The array of values.
|
||||
*/
|
||||
public function setCompositionOffsetTable($compositionOffsetTable)
|
||||
{
|
||||
$this->_compositionOffsetTable = $compositionOffsetTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 +
|
||||
count($this->_compositionOffsetTable) * 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt32BE($entryCount = count($this->_compositionOffsetTable));
|
||||
for ($i = 1; $i <= $entryCount; $i++) {
|
||||
$writer->writeUInt32BE
|
||||
($this->_compositionOffsetTable[$i]['sampleCount'])
|
||||
->writeUInt32BE
|
||||
($this->_compositionOffsetTable[$i]['sampleOffset']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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 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 <sven@vollbehr.eu>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.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 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 <sven@vollbehr.eu>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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).
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Free extends Zend_Media_Iso14496_Box
|
||||
{
|
||||
/**
|
||||
* Constructs the class with given parameters.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return ($this->getSize() >= 8 ? $this->getSize() : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
if ($this->getSize() >= 8) {
|
||||
parent::_writeData($writer);
|
||||
$writer->write(str_repeat("\0", $this->getSize() - 8));
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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).
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Free extends Zend_Media_Iso14496_Box
|
||||
{
|
||||
/**
|
||||
* Constructs the class with given parameters.
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return ($this->getSize() >= 8 ? $this->getSize() : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
if ($this->getSize() >= 8) {
|
||||
parent::_writeData($writer);
|
||||
$writer->write(str_repeat("\0", $this->getSize() - 8));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/Box.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Original Format Box</i> contains the four-character-code of the
|
||||
* original un-transformed sample description.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Frma extends Zend_Media_Iso14496_Box
|
||||
{
|
||||
/** @var string */
|
||||
private $_dataFormat;
|
||||
|
||||
/**
|
||||
* 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, &$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets 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).
|
||||
*
|
||||
* @param string $dataFormat The data format.
|
||||
*/
|
||||
public function setDataFormat($dataFormat)
|
||||
{
|
||||
$this->_dataFormat = $dataFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->write(substr($this->_dataFormat, 0, 4));
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/Box.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Original Format Box</i> contains the four-character-code of the
|
||||
* original un-transformed sample description.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Frma extends Zend_Media_Iso14496_Box
|
||||
{
|
||||
/** @var string */
|
||||
private $_dataFormat;
|
||||
|
||||
/**
|
||||
* 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, &$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets 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).
|
||||
*
|
||||
* @param string $dataFormat The data format.
|
||||
*/
|
||||
public function setDataFormat($dataFormat)
|
||||
{
|
||||
$this->_dataFormat = $dataFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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->write(substr($this->_dataFormat, 0, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,174 +1,174 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Handler Reference Box</i> is within a
|
||||
* {@link Zend_Media_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 Zend_Media_Iso14496_Box_Meta Meta Box},
|
||||
* declares the structure or format of the <i>meta</i> box contents.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Hdlr extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_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->_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 heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 21 + strlen($this->_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write(str_pad('', 4, "\0"))
|
||||
->write($this->_handlerType)
|
||||
->writeUInt32BE(0)
|
||||
->writeUInt32BE(0)
|
||||
->writeUInt32BE(0)
|
||||
->writeString8($this->_name, 1);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>Handler Reference Box</i> is within a
|
||||
* {@link Zend_Media_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 Zend_Media_Iso14496_Box_Meta Meta Box},
|
||||
* declares the structure or format of the <i>meta</i> box contents.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Hdlr extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_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->_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 heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 21 + strlen($this->_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write(str_pad('', 4, "\0"))
|
||||
->write($this->_handlerType)
|
||||
->writeUInt32BE(0)
|
||||
->writeUInt32BE(0)
|
||||
->writeUInt32BE(0)
|
||||
->writeString8($this->_name, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,160 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>ID3v2 Box</i> resides under the
|
||||
* {@link Zend_Media_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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Id32 extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var string */
|
||||
private $_language = 'und';
|
||||
|
||||
/** @var Zend_Media_Id3v2 */
|
||||
private $_tag;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
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 Zend_Media_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 Zend_Media_Id3v2 Id3v2} tag class instance.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTag()
|
||||
{
|
||||
return $this->_tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link Zend_Media_Id3v2 Id3v2} tag class instance using given
|
||||
* language.
|
||||
*
|
||||
* @param Zend_Media_Id3v2 $tag The tag instance.
|
||||
* @param string $language The language code.
|
||||
*/
|
||||
public function setTag($tag, $language = null)
|
||||
{
|
||||
$this->_tag = $tag;
|
||||
if ($language !== null) {
|
||||
$this->_language = $language;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
* @todo There has got to be a better way to do this
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
$writer = new Zend_Io_StringWriter();
|
||||
$this->_tag->write($writer);
|
||||
return parent::getHeapSize() + 2 + $writer->getSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt16BE
|
||||
(((ord($this->_language[0]) - 0x60) << 10) |
|
||||
((ord($this->_language[1]) - 0x60) << 5) |
|
||||
ord($this->_language[2]) - 0x60);
|
||||
$this->_tag->write($writer);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* The <i>ID3v2 Box</i> resides under the
|
||||
* {@link Zend_Media_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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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_Id32 extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @var string */
|
||||
private $_language = 'und';
|
||||
|
||||
/** @var Zend_Media_Id3v2 */
|
||||
private $_tag;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
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 Zend_Media_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 Zend_Media_Id3v2 Id3v2} tag class instance.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTag()
|
||||
{
|
||||
return $this->_tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link Zend_Media_Id3v2 Id3v2} tag class instance using given
|
||||
* language.
|
||||
*
|
||||
* @param Zend_Media_Id3v2 $tag The tag instance.
|
||||
* @param string $language The language code.
|
||||
*/
|
||||
public function setTag($tag, $language = null)
|
||||
{
|
||||
$this->_tag = $tag;
|
||||
if ($language !== null) {
|
||||
$this->_language = $language;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
* @todo There has got to be a better way to do this
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
$writer = new Zend_Io_StringWriter();
|
||||
$this->_tag->write($writer);
|
||||
return parent::getHeapSize() + 2 + $writer->getSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->writeUInt16BE
|
||||
(((ord($this->_language[0]) - 0x60) << 10) |
|
||||
((ord($this->_language[1]) - 0x60) << 5) |
|
||||
ord($this->_language[2]) - 0x60);
|
||||
$this->_tag->write($writer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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.
|
||||
*
|
||||
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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.
|
||||
*
|
||||
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,326 +1,326 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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 Zend_Media_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>
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Ilst 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('Zend_Media_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 Zend_Media_Iso14496_Box_Ilst_Container($name))->data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic iTunes/iPod DATA Box container.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
* @ignore
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Ilst_Container
|
||||
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(is_string($reader) ? null : $reader, $options);
|
||||
$this->setContainer(true);
|
||||
|
||||
if (is_string($reader)) {
|
||||
$this->setType($reader);
|
||||
$this->addBox(new Zend_Media_Iso14496_Box_Data());
|
||||
} else {
|
||||
$this->constructBoxes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* A box that contains data for iTunes/iPod specific boxes.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Data extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_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->_reader->skip(4);
|
||||
$data = $this->_reader->read
|
||||
($this->getOffset() + $this->getSize() -
|
||||
$this->_reader->getOffset());
|
||||
switch ($this->getFlags()) {
|
||||
case self::INTEGER:
|
||||
// break intentionally omitted
|
||||
case self::INTEGER_OLD_STYLE:
|
||||
for ($i = 0; $i < strlen($data); $i++) {
|
||||
$this->_value .= ord($data[$i]);
|
||||
}
|
||||
break;
|
||||
case self::STRING:
|
||||
// break intentionally omitted
|
||||
default:
|
||||
$this->_value = $data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = null)
|
||||
{
|
||||
$this->_value = (string)$value;
|
||||
if ($type === null && is_string($value)) {
|
||||
$this->_flags = self::STRING;
|
||||
}
|
||||
if ($type === null && is_int($value)) {
|
||||
$this->_flags = self::INTEGER;
|
||||
}
|
||||
if ($type !== null) {
|
||||
$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)));
|
||||
}
|
||||
require_once 'Zend/Media/Iso14496/Exception.php';
|
||||
throw new Zend_Media_Iso14496_Exception('Unknown box/field: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 + strlen($this->_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write("\0\0\0\0");
|
||||
switch ($this->getFlags()) {
|
||||
case self::INTEGER:
|
||||
// break intentionally omitted
|
||||
case self::INTEGER_OLD_STYLE:
|
||||
for ($i = 0; $i < strlen($this->_value); $i++) {
|
||||
$writer->writeInt8($this->_value[$i]);
|
||||
}
|
||||
break;
|
||||
case self::STRING:
|
||||
// break intentionally omitted
|
||||
default:
|
||||
$writer->write($this->_value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @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$
|
||||
*/
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/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 Zend_Media_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>
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Ilst 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('Zend_Media_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 Zend_Media_Iso14496_Box_Ilst_Container($name))->data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic iTunes/iPod DATA Box container.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
* @ignore
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Ilst_Container
|
||||
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(is_string($reader) ? null : $reader, $options);
|
||||
$this->setContainer(true);
|
||||
|
||||
if (is_string($reader)) {
|
||||
$this->setType($reader);
|
||||
$this->addBox(new Zend_Media_Iso14496_Box_Data());
|
||||
} else {
|
||||
$this->constructBoxes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**#@+ @ignore */
|
||||
require_once 'Zend/Media/Iso14496/FullBox.php';
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* A box that contains data for iTunes/iPod specific boxes.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Media
|
||||
* @subpackage ISO 14496
|
||||
* @author Sven Vollbehr <sven@vollbehr.eu>
|
||||
* @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$
|
||||
* @since iTunes/iPod specific
|
||||
*/
|
||||
final class Zend_Media_Iso14496_Box_Data extends Zend_Media_Iso14496_FullBox
|
||||
{
|
||||
/** @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 Zend_Io_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->_reader->skip(4);
|
||||
$data = $this->_reader->read
|
||||
($this->getOffset() + $this->getSize() -
|
||||
$this->_reader->getOffset());
|
||||
switch ($this->getFlags()) {
|
||||
case self::INTEGER:
|
||||
// break intentionally omitted
|
||||
case self::INTEGER_OLD_STYLE:
|
||||
for ($i = 0; $i < strlen($data); $i++) {
|
||||
$this->_value .= ord($data[$i]);
|
||||
}
|
||||
break;
|
||||
case self::STRING:
|
||||
// break intentionally omitted
|
||||
default:
|
||||
$this->_value = $data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = null)
|
||||
{
|
||||
$this->_value = (string)$value;
|
||||
if ($type === null && is_string($value)) {
|
||||
$this->_flags = self::STRING;
|
||||
}
|
||||
if ($type === null && is_int($value)) {
|
||||
$this->_flags = self::INTEGER;
|
||||
}
|
||||
if ($type !== null) {
|
||||
$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)));
|
||||
}
|
||||
require_once 'Zend/Media/Iso14496/Exception.php';
|
||||
throw new Zend_Media_Iso14496_Exception('Unknown box/field: ' . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the box heap size in bytes.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeapSize()
|
||||
{
|
||||
return parent::getHeapSize() + 4 + strlen($this->_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the box data.
|
||||
*
|
||||
* @param Zend_Io_Writer $writer The writer object.
|
||||
* @return void
|
||||
*/
|
||||
protected function _writeData($writer)
|
||||
{
|
||||
parent::_writeData($writer);
|
||||
$writer->write("\0\0\0\0");
|
||||
switch ($this->getFlags()) {
|
||||
case self::INTEGER:
|
||||
// break intentionally omitted
|
||||
case self::INTEGER_OLD_STYLE:
|
||||
for ($i = 0; $i < strlen($this->_value); $i++) {
|
||||
$writer->writeInt8($this->_value[$i]);
|
||||
}
|
||||
break;
|
||||
case self::STRING:
|
||||
// break intentionally omitted
|
||||
default:
|
||||
$writer->write($this->_value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user