當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Media_Iso14496_Box類代碼示例

本文整理匯總了PHP中Zend_Media_Iso14496_Box的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Media_Iso14496_Box類的具體用法?PHP Zend_Media_Iso14496_Box怎麽用?PHP Zend_Media_Iso14496_Box使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Zend_Media_Iso14496_Box類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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();
     }
 }
開發者ID:andreiamfg,項目名稱:MobileWebHybrid,代碼行數:18,代碼來源:Ilst.php

示例2: removeBox

 /**
  * Removes the given box.
  *
  * @param Zend_Media_Iso14496_Box $box The box to remove
  * @throws Zend_Media_Iso14496_Exception if called on a non-container box
  */
 public final function removeBox($box)
 {
     if (!$this->isContainer()) {
         require_once 'Zend/Media/Iso14496/Exception.php';
         throw new Zend_Media_Iso14496_Exception('Box not a container');
     }
     if ($this->hasBox($box->getType())) {
         foreach ($this->_boxes[$box->getType()] as $key => $value) {
             if ($box === $value) {
                 unset($this->_boxes[$box->getType()][$key]);
             }
         }
     }
 }
開發者ID:andreiamfg,項目名稱:MobileWebHybrid,代碼行數:20,代碼來源:Box.php

示例3: _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));
     }
 }
開發者ID:andreiamfg,項目名稱:MobileWebHybrid,代碼行數:13,代碼來源:Free.php

示例4: __construct

 /**
  * 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();
 }
開發者ID:andreiamfg,項目名稱:MobileWebHybrid,代碼行數:16,代碼來源:Moov.php

示例5: _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]);
     }
 }
開發者ID:adam-fonseca,項目名稱:RuneUI,代碼行數:13,代碼來源:Hint.php

示例6: _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());
 }
開發者ID:adam-fonseca,項目名稱:RuneUI,代碼行數:11,代碼來源:Iinf.php

示例7: _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);
 }
開發者ID:google-code-backups,項目名稱:php-reader,代碼行數:11,代碼來源:FullBox.php

示例8: _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));
 }
開發者ID:google-code-backups,項目名稱:php-reader,代碼行數:11,代碼來源:Frma.php

示例9: _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));
     }
 }
開發者ID:andreiamfg,項目名稱:MobileWebHybrid,代碼行數:14,代碼來源:Ftyp.php

示例10: __destruct

 /**
  * Closes down the reader.
  */
 public function __destruct()
 {
     parent::__destruct();
     if ($this->_autoClose === true && $this->_reader !== null) {
         $this->_reader->close();
     }
 }
開發者ID:jreinert,項目名稱:RuneUI,代碼行數:10,代碼來源:Iso14496.php

示例11: _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']);
             }
         }
     }
 }
開發者ID:lokamaya,項目名稱:zend-mp3,代碼行數:52,代碼來源:Iloc.php


注:本文中的Zend_Media_Iso14496_Box類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。