Add write support for iTunes/iPod and ID3v2 extensions for ISO 14496

git-svn-id: http://php-reader.googlecode.com/svn/trunk@92 51a70ab9-7547-0410-9469-37e369ee0574
This commit is contained in:
svollbehr
2008-05-10 13:43:14 +00:00
parent 01ba3eacdb
commit a97d59bf89
70 changed files with 1060 additions and 312 deletions

View File

@@ -73,15 +73,19 @@ final class ISO14496_Box_STSZ extends ISO14496_Box_Full
*
* @param Reader $reader The reader object.
*/
public function __construct($reader)
public function __construct($reader, &$options = array())
{
parent::__construct($reader);
parent::__construct($reader, $options);
$this->_sampleSize = $this->_reader->readUInt32BE();
$sampleCount = $this->_reader->readUInt32BE();
if ($this->_sampleSize == 0)
for ($i = 1; $i < $sampleCount; $i++)
$this->_sampleSizeTable[$i] = $this->_reader->readUInt32BE();
if ($this->_sampleSize == 0) {
$data = $this->_reader->read
($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
for ($i = 1; $i <= $sampleCount; $i++)
$this->_sampleSizeTable[$i] =
Transform::fromUInt32BE(substr($data, ($i - 1) * 4, 4));
}
}
/**