Original Format Box contains the four-character-code of the * original un-transformed sample description. * * @category Zend * @package Zend_Media * @subpackage ISO14496 * @author Sven Vollbehr * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ final class Zend_Media_Iso14496_Box_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. mp4v 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. mp4v 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)); } }