本文整理匯總了PHP中Zend_Media_Iso14496_Box::_writeData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Media_Iso14496_Box::_writeData方法的具體用法?PHP Zend_Media_Iso14496_Box::_writeData怎麽用?PHP Zend_Media_Iso14496_Box::_writeData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Media_Iso14496_Box
的用法示例。
在下文中一共展示了Zend_Media_Iso14496_Box::_writeData方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _writeData
/**
* 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("", $this->getSize() - 8));
}
}
示例2: _writeData
/**
* Writes the box data.
*
* @param Zend_Io_Writer $writer The writer object.
* @return void
*/
protected function _writeData($writer)
{
parent::_writeData($writer);
for ($i = 0; $i < count($this->_trackId); $i++) {
$writer->writeUInt32BE($this->_trackId[$i]);
}
}
示例3: _writeData
/**
* 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());
}
示例4: _writeData
/**
* Writes the box data without the header.
*
* @param Zend_Io_Writer $writer The writer object.
* @return void
*/
protected function _writeData($writer)
{
parent::_writeData($writer);
$writer->writeUInt32BE($this->_version << 24 | $this->_flags);
}
示例5: _writeData
/**
* 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));
}
示例6: _writeData
/**
* Writes the box data.
*
* @param Zend_Io_Writer $writer The writer object.
* @return void
*/
protected function _writeData($writer)
{
parent::_writeData($writer);
$writer->writeString8(substr($this->_majorBrand, 0, 4))->writeUInt32BE($this->_minorVersion);
for ($i = 0; $i < count($this->_compatibleBrands); $i++) {
$writer->writeString8(substr($this->_compatibleBrands[$i], 0, 4));
}
}
示例7: _writeData
/**
* Writes the box data.
*
* @param Zend_Io_Writer $writer The writer object.
* @return void
*/
protected function _writeData($writer)
{
parent::_writeData($writer);
$offsetSize = 4;
$lengthSize = 4;
$baseOffsetSize = 4;
$itemCount = count($this->_itemId);
for ($i = 0; $i < $itemCount; $i++) {
if ($this->_itemId[$i]['baseOffset'] > 0xffffffff) {
$baseOffsetSize = 8;
}
for ($j = 0; $j < count($this->_itemId[$i]['extents']); $j++) {
if ($this->_itemId[$i]['extents'][$j]['offset'] > 0xffffffff) {
$offsetSize = 8;
}
if ($this->_itemId[$i]['extents'][$j]['length'] > 0xffffffff) {
$lengthSize = 8;
}
}
}
$writer->writeUInt16BE(($offsetSize & 0xf) << 12 | ($lengthSize & 0xf) << 8 | ($baseOffsetSize & 0xf) << 4)->writeUInt16BE($itemCount);
for ($i = 0; $i < $itemCount; $i++) {
$writer->writeUInt16BE($this->_itemId[$i]['itemId'])->writeUInt16BE($this->_itemId[$i]['dataReferenceIndex']);
if ($baseOffsetSize == 4) {
$writer->writeUInt32BE($this->_itemId[$i]['baseOffset']);
}
if ($baseOffsetSize == 8) {
$writer->writeInt64BE($this->_itemId[$i]['baseOffset']);
}
$writer->writeUInt16BE($extentCount = count($this->_itemId[$i]['extents']));
for ($j = 0; $j < $extentCount; $j++) {
if ($offsetSize == 4) {
$writer->writeUInt32BE($this->_itemId[$i]['extents'][$j]['offset']);
}
if ($offsetSize == 8) {
$writer->writeInt64BE($this->_itemId[$i]['extents'][$j]['offset']);
}
if ($offsetSize == 4) {
$writer->writeUInt32BE($this->_itemId[$i]['extents'][$j]['length']);
}
if ($offsetSize == 8) {
$writer->writeInt64BE($this->_itemId[$i]['extents'][$j]['length']);
}
}
}
}