当前位置: 首页>>代码示例>>PHP>>正文


PHP Transform::fromUInt32BE方法代码示例

本文整理汇总了PHP中Transform::fromUInt32BE方法的典型用法代码示例。如果您正苦于以下问题:PHP Transform::fromUInt32BE方法的具体用法?PHP Transform::fromUInt32BE怎么用?PHP Transform::fromUInt32BE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transform的用法示例。


在下文中一共展示了Transform::fromUInt32BE方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($reader === null) {
         return;
     }
     $this->_format = Transform::fromInt8($this->_data[0]);
     $this->_position = Transform::fromUInt32BE(substr($this->_data, 1, 4));
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:15,代码来源:POSS.php

示例2: __construct

 /**
  * Constructs the class with given parameters and reads box related data from
  * the ISO Base Media file.
  *
  * @param Reader $reader The reader object.
  */
 public function __construct($reader, &$options = array())
 {
   parent::__construct($reader, $options);
   
   $entryCount = $this->_reader->readUInt32BE();
   $data = $this->_reader->read
     ($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
   for ($i = 1; $i <= $entryCount; $i++)
     $this->_syncSampleTable[$i] =
       Transform::fromUInt32BE(substr($data, ($i - 1) * 4, 4));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:17,代码来源:STSS.php

示例3: __construct

  /**
   * Constructs the class with given parameters and parses object related data.
   *
   * @param Reader $reader The reader object.
   * @param Array $options The options array.
   */
  public function __construct($reader = null, &$options = array())
  {
    parent::__construct($reader, $options);
    
    if ($reader === null)
      return;

    if (strlen($this->_data) > 4)
      $this->_counter = Transform::fromInt64BE($this->_data); // UInt64
    else
      $this->_counter = Transform::fromUInt32BE($this->_data);
  }
开发者ID:rtdean93,项目名称:therock,代码行数:18,代码来源:PCNT.php

示例4: __construct

 /**
  * Constructs the class with given parameters and reads box related data from
  * the ISO Base Media file.
  *
  * @param Reader $reader The reader object.
  */
 public function __construct($reader, &$options = array())
 {
   parent::__construct($reader, $options);
   
   $entryCount = $this->_reader->readUInt32BE();
   $data = $this->_reader->read
     ($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
   for ($i = 1; $i <= $entryCount; $i++)
     $this->_compositionOffsetTable[$i] = array
       ("sampleCount" =>
          Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)),
        "sampleOffset" =>
          Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4)));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:20,代码来源:CTTS.php

示例5: __construct

 /**
  * Constructs the class with given parameters and reads box related data from
  * the ISO Base Media file.
  *
  * @param Reader $reader The reader object.
  */
 public function __construct($reader, &$options = array())
 {
   parent::__construct($reader, $options);
   
   $entryCount = $this->_reader->readUInt32BE();
   $data = $this->_reader->read
     ($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
   for ($i = 1; $i <= $entryCount; $i++)
     $this->_sampleToChunkTable[$i] = array
       ("firstChunk" =>
          Transform::fromUInt32BE(substr($data, ($i - 1) * 12, 4)),
        "samplesPerChunk" =>
          Transform::fromUInt32BE(substr($data, $i * 12 - 8, 4)),
        "sampleDescriptionIndex" =>
          Transform::fromUInt32BE(substr($data, $i * 12 - 4, 4)));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:22,代码来源:STSC.php

示例6: __construct

 /**
  * Constructs the class with given parameters and reads box related data from
  * the ISO Base Media file.
  *
  * @param Reader $reader The reader object.
  */
 public function __construct($reader, &$options = array())
 {
   parent::__construct($reader, $options);
   
   $groupingType = $this->_reader->readUInt32BE();
   $entryCount = $this->_reader->readUInt32BE();
   $data = $this->_reader->read
     ($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
   for ($i = 1; $i <= $entryCount; $i++)
     $this->_sampleToGroupTable[$i] = array
       ("sampleCount" =>
          Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)),
        "groupDescriptionIndex" =>
          Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4)));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:21,代码来源:SBGP.php

示例7: __construct

 /**
  * Constructs the class with given parameters and reads box related data from
  * the ISO Base Media file.
  *
  * @param Reader $reader The reader object.
  */
 public function __construct($reader, &$options = array())
 {
   parent::__construct($reader, $options);
   
   $entryCount = $this->_reader->readUInt32BE();
   $data = $this->_reader->read
     ($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
   for ($i = 0; $i < $entryCount; $i++)
     $this->_shadowSyncSampleTable[$i] = array
       ("shadowedSampleNumber" =>
          Transform::fromUInt32BE(substr($data, ($i - 1) * 8, 4)),
        "syncSampleNumber" =>
          Transform::fromUInt32BE(substr($data, $i * 8 - 4, 4)));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:20,代码来源:STSH.php

示例8: __construct

  /**
   * Constructs the class with given parameters and parses object related data.
   *
   * @param Reader $reader The reader object.
   * @param Array $options The options array.
   */
  public function __construct($reader = null, &$options = array())
  {
    parent::__construct($reader, $options);

    if ($reader === null)
      return;

    list ($this->_device, $this->_data) =
      $this->explodeString8($this->_data, 2);

    for ($i = $j = 0; $i < 9; $i++) {
      $this->_adjustments[$i] = array
        (self::channelType => Transform::fromInt8($this->_data[$j++]),
         self::volumeAdjustment =>
           Transform::fromInt16BE(substr($this->_data, $j++, 2)) / 512.0);
      $j++;
      $bitsInPeak = Transform::fromInt8($this->_data[$j++]);
      $bytesInPeak = $bitsInPeak > 0 ? ceil($bitsInPeak / 8) : 0;
      switch ($bytesInPeak) {
      case 8:
      case 7:
      case 6:
      case 5:
        $this->_adjustments[$i][self::peakVolume] =
          Transform::fromInt64BE(substr($this->_data, $j, $bytesInPeak));
        break;
      case 4:
      case 3:
        $this->_adjustments[$i][self::peakVolume] =
          Transform::fromUInt32BE(substr($this->_data, $j, $bytesInPeak));
        break;
      case 2:
        $this->_adjustments[$i][self::peakVolume] =
          Transform::fromUInt16BE(substr($this->_data, $j, $bytesInPeak));
        break;
      case 1:
        $this->_adjustments[$i][self::peakVolume] =
          Transform::fromUInt8(substr($this->_data, $j, $bytesInPeak));
      }
      $j += $bytesInPeak;
    }
  }
开发者ID:rtdean93,项目名称:therock,代码行数:48,代码来源:RVA2.php

示例9: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($reader === null) {
         return;
     }
     list($this->_device, $this->_data) = preg_split("/\\x00/", $this->_data, 2);
     for ($i = $j = 0; $i < 9; $i++) {
         $this->_adjustments[$i] = array("channelType" => Transform::fromInt8($this->_data[$j++]), "volumeAdjustment" => Transform::fromInt16BE(substr($this->_data, $j++, 2)));
         $bitsInPeak = Transform::fromInt8($this->_data[++$j]);
         $bytesInPeak = $bitsInPeak > 0 ? ceil($bitsInPeak / 8) : 0;
         switch ($bytesInPeak) {
             case 8:
             case 7:
             case 6:
             case 5:
                 $this->_adjustments[$i]["peakVolume"] = Transform::fromInt64BE(substr($this->_data, $j, $bytesInPeak));
                 $j += $bytesInPeak;
                 break;
             case 4:
             case 3:
                 $this->_adjustments[$i]["peakVolume"] = Transform::fromUInt32BE(substr($this->_data, $j, $bytesInPeak));
                 $j += $bytesInPeak;
                 break;
             case 2:
                 $this->_adjustments[$i]["peakVolume"] = Transform::fromUInt16BE(substr($this->_data, $j, $bytesInPeak));
                 $j += $bytesInPeak;
                 break;
             case 1:
                 $this->_adjustments[$i]["peakVolume"] = Transform::fromInt8(substr($this->_data, $j, $bytesInPeak));
                 $j += $bytesInPeak;
         }
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:40,代码来源:RVA2.php

示例10: __construct

  /**
   * Constructs the class with given parameters and parses object related data.
   *
   * @param Reader $reader The reader object.
   * @param Array $options The options array.
   */
  public function __construct($reader = null, &$options = array())
  {
    parent::__construct($reader, $options);
    
    if ($reader === null)
      return;

    $offset = 0;
    $this->_format = Transform::fromUInt8($this->_data[$offset++]);
    while ($offset < strlen($this->_data)) {
      $tempo = Transform::fromUInt8($this->_data[$offset++]);
      if ($tempo == 0xff)
        $tempo += Transform::fromUInt8($this->_data[$offset++]);
      $this->_events
        [Transform::fromUInt32BE(substr($this->_data, $offset, 4))] = $tempo;
      $offset += 4;
    }
    ksort($this->_events);
  }
开发者ID:rtdean93,项目名称:therock,代码行数:25,代码来源:SYTC.php

示例11: __construct

 /**
  * Constructs the class with given parameters and reads object related data
  * from the ID3v2 tag.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($reader === null) {
         return;
     }
     $offset = $this->_reader->getOffset();
     $this->_size = $this->decodeSynchsafe32($this->_reader->readUInt32BE());
     /* ID3v2.3.0 ExtendedHeader */
     if (isset($this->_options["version"]) && $this->_options["version"] < 4) {
         if ($this->_reader->readUInt16BE() == 0x8000) {
             $this->_flags = self::CRC32;
         }
         $this->_padding = $this->_reader->readUInt32BE();
         if ($this->hasFlag(self::CRC32)) {
             $this->_crc = Transform::readUInt32BE();
         }
     } else {
         $this->_reader->skip(1);
         $this->_flags = $this->_reader->readInt8();
         if ($this->hasFlag(self::UPDATE)) {
             $this->_reader->skip(1);
         }
         if ($this->hasFlag(self::CRC32)) {
             $this->_reader->skip(1);
             $this->_crc = Transform::fromInt8($this->_reader->read(1)) * (0xfffffff + 1) + decodeSynchsafe32(Transform::fromUInt32BE($this->_reader->read(4)));
         }
         if ($this->hasFlag(self::RESTRICTED)) {
             $this->_reader->skip(1);
             $this->_restrictions = $this->_reader->readInt8(1);
         }
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:40,代码来源:ExtendedHeader.php

示例12: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
   parent::__construct($reader, $options);
   
   if ($reader === null)
     return;
   
   $this->_encoding = Transform::fromUInt8($this->_data[0]);
   $this->_language = substr($this->_data, 1, 3);
   if ($this->_language == "XXX")
     $this->_language = "und";
   $this->_format = Transform::fromUInt8($this->_data[4]);
   $this->_type = Transform::fromUInt8($this->_data[5]);
   $this->_data = substr($this->_data, 6);
   
   switch ($this->_encoding) {
   case self::UTF16:
     list($this->_description, $this->_data) =
       $this->explodeString16($this->_data, 2);
     $this->_description = Transform::fromString16($this->_description);
     break;
   case self::UTF16BE:
     list($this->_description, $this->_data) =
       $this->explodeString16($this->_data, 2);
     $this->_description = Transform::fromString16BE($this->_description);
     break;
   default:
     list($this->_description, $this->_data) =
       $this->explodeString8($this->_data, 2);
     $this->_description = Transform::fromString8($this->_description);
   }
   
   while (strlen($this->_data) > 0) {
     switch ($this->_encoding) {
     case self::UTF16:
       list($syllable, $this->_data) = 
         $this->explodeString16($this->_data, 2);
       $syllable = Transform::fromString16($syllable);
       break;
     case self::UTF16BE:
       list($syllable, $this->_data) = 
         $this->explodeString16($this->_data, 2);
       $syllable = Transform::fromString16BE($syllable);
       break;
     default:
       list($syllable, $this->_data) = 
         $this->explodeString8($this->_data, 2);
       $syllable = Transform::fromString8($syllable);
     }
     $this->_events[Transform::fromUInt32BE(substr($this->_data, 0, 4))] =
       $syllable;
     $this->_data = substr($this->_data, 4);
   }
   ksort($this->_events);
 }
开发者ID:rtdean93,项目名称:therock,代码行数:61,代码来源:SYLT.php

示例13: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
   parent::__construct($reader, $options);
   
   if ($reader === null)
     return;
   
   $this->_bufferSize =
     Transform::fromUInt32BE("\0" . substr($this->_data, 0, 3));
   $this->_infoFlags = Transform::fromInt8($this->_data[3]);
   if ($this->getSize() > 4)
     $this->_offset = Transform::fromInt32BE(substr($this->_data, 4, 4));
 }
开发者ID:rtdean93,项目名称:therock,代码行数:19,代码来源:RBUF.php

示例14: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($reader === null) {
         return;
     }
     list($this->_owner, $this->_data) = preg_split("/\\x00/", $this->_data, 2);
     $this->_rating = Transform::fromInt8($this->_data[0]);
     $this->_data = substr($this->_data, 1);
     if (strlen($this->_data) > 4) {
         $this->_counter = Transform::fromInt64BE($this->_data);
     } else {
         if (strlen($this->_data) > 0) {
             $this->_counter = Transform::fromUInt32BE($this->_data);
         }
     }
 }
开发者ID:AsteriaGamer,项目名称:steamdriven-kohana,代码行数:23,代码来源:POPM.php

示例15: __construct

 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param Reader $reader The reader object.
  * @param Array $options The options array.
  */
 public function __construct($reader = null, &$options = array())
 {
   parent::__construct($reader, $options);
   
   if ($reader === null)
     return;
   
   $this->_format = Transform::fromUInt8($this->_data[0]);
   for ($i = 1; $i < $this->getSize(); $i += 5) {
     $this->_events[Transform::fromUInt32BE(substr($this->_data, $i + 1, 4))] =
       $data = Transform::fromUInt8($this->_data[$i]);
     if ($data == 0xff)
       break;
   }
   ksort($this->_events);
 }
开发者ID:rtdean93,项目名称:therock,代码行数:22,代码来源:ETCO.php


注:本文中的Transform::fromUInt32BE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。