• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Media_Iso14496_Box类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Media_Iso14496_FullBox类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Media_Id3_Frame类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap