コード例 #1
0
ファイル: Stdp.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     while ($this->_reader->getOffset() < $this->getOffset() + $this->getSize()) {
         $this->_values[] = array('priority' => $this->_reader->readUInt16BE());
     }
 }
コード例 #2
0
ファイル: Pdin.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     while ($this->_reader->getOffset() < $this->getOffset() + $this->getSize()) {
         $this->_progressiveDownloadInfo[] = array('rate' => $this->_reader->readUInt32BE(), 'initialDelay' => $this->_reader->readUInt32BE());
     }
 }
コード例 #3
0
ファイル: Infe.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_itemId = $this->_reader->readUInt16BE();
     $this->_itemProtectionIndex = $this->_reader->readUInt16BE();
     list($this->_itemName, $this->_contentType, $this->_contentEncoding) = preg_split("/\\x00/", $this->_reader->read($this->getOffset() + $this->getSize() - $this->_reader->getOffset()));
 }
コード例 #4
0
ファイル: Stsc.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 1; $i <= $entryCount; $i++) {
         $this->_sampleToChunkTable[$i] = array('firstChunk' => $this->_reader->readUInt32BE(), 'samplesPerChunk' => $this->_reader->readUInt32BE(), 'sampleDescriptionIndex' => $this->_reader->readUInt32BE());
     }
 }
コード例 #5
0
ファイル: Urn.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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->_name, $this->_location) = preg_split("/\\x00/", $this->_reader->read($this->getOffset() + $this->getSize() - $this->_reader->getOffset()));
 }
コード例 #6
0
ファイル: Stss.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 1; $i <= $entryCount; $i++) {
         $this->_syncSampleTable[$i] = $this->_reader->readUInt32BE();
     }
 }
コード例 #7
0
ファイル: Stts.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 1; $i <= $entryCount; $i++) {
         $this->_timeToSampleTable[$i] = array('sampleCount' => $this->_reader->readUInt32BE(), 'sampleDelta' => $this->_reader->readUInt32BE());
     }
 }
コード例 #8
0
ファイル: Hmhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_maxPDUSize = $this->_reader->readUInt16BE();
     $this->_avgPDUSize = $this->_reader->readUInt16BE();
     $this->_maxBitrate = $this->_reader->readUInt32BE();
     $this->_avgBitrate = $this->_reader->readUInt32BE();
 }
コード例 #9
0
ファイル: Url.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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->_location = $this->_reader->read($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
 }
コード例 #10
0
ファイル: Schm.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_schemeType = $this->_reader->read(4);
     $this->_schemeVersion = $this->_reader->readUInt32BE();
     if ($this->hasFlag(1)) {
         $this->_schemeUri = preg_split("/\\x00/", $this->_reader->read($this->getOffset() + $this->getSize() - $this->_reader->getOffset()));
     }
 }
コード例 #11
0
ファイル: Smhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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->_balance = (($tmp = $this->_reader->readUInt16BE()) >> 8 & 0xff) + (double) ("0." . (string) ($tmp & 0xff));
     $this->_reader->skip(2);
 }
コード例 #12
0
ファイル: Mehd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($this->getVersion() == 1) {
         $this->_fragmentDuration = $this->_reader->readInt64BE();
     } else {
         $this->_fragmentDuration = $this->_reader->readUInt32BE();
     }
 }
コード例 #13
0
ファイル: Meta.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_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();
 }
コード例 #14
0
ファイル: Id32.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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->_language = chr((($tmp = $this->_reader->readUInt16BE()) >> 10 & 0x1f) + 0x60) . chr(($tmp >> 5 & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60);
     $this->_tag = new HausDesign_Media_Id3v2($this->_reader, array('readonly' => true));
 }
コード例 #15
0
ファイル: Sbgp.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $groupingType = $this->_reader->readUInt32BE();
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 1; $i <= $entryCount; $i++) {
         $this->_sampleToGroupTable[$i] = array('sampleCount' => $this->_reader->readUInt32BE(), 'groupDescriptionIndex' => $this->_reader->readUInt32BE());
     }
 }
コード例 #16
0
ファイル: Trex.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  * @todo  The sample flags could be parsed further
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_trackId = $this->_reader->readUInt32BE();
     $this->_defaultSampleDescriptionIndex = $this->_reader->readUInt32BE();
     $this->_defaultSampleDuration = $this->_reader->readUInt32BE();
     $this->_defaultSampleSize = $this->_reader->readUInt32BE();
     $this->_defaultSampleFlags = $this->_reader->readUInt32BE();
 }
コード例 #17
0
ファイル: Vmhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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) {
         $this->setFlags(1);
         return;
     }
     $this->_graphicsMode = $this->_reader->readUInt16BE();
     $this->_opcolor = array($this->_reader->readUInt16BE(), $this->_reader->readUInt16BE(), $this->_reader->readUInt16BE());
 }
コード例 #18
0
ファイル: Stsz.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     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();
         }
     }
 }
コード例 #19
0
ファイル: Hdlr.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_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->_reader->skip(4);
     $this->_handlerType = $this->_reader->read(4);
     $this->_reader->skip(12);
     $this->_name = $this->_reader->readString8($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
 }
コード例 #20
0
ファイル: Mdhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($this->getVersion() == 1) {
         $this->_creationTime = $this->_reader->readInt64BE();
         $this->_modificationTime = $this->_reader->readInt64BE();
         $this->_timescale = $this->_reader->readUInt32BE();
         $this->_duration = $this->_reader->readInt64BE();
     } else {
         $this->_creationTime = $this->_reader->readUInt32BE();
         $this->_modificationTime = $this->_reader->readUInt32BE();
         $this->_timescale = $this->_reader->readUInt32BE();
         $this->_duration = $this->_reader->readUInt32BE();
     }
     $this->_language = chr((($tmp = $this->_reader->readUInt16BE()) >> 10 & 0x1f) + 0x60) . chr(($tmp >> 5 & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60);
 }
コード例 #21
0
ファイル: Mvhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($this->getVersion() == 1) {
         $this->_creationTime = $this->_reader->readInt64BE();
         $this->_modificationTime = $this->_reader->readInt64BE();
         $this->_timescale = $this->_reader->readUInt32BE();
         $this->_duration = $this->_reader->readInt64BE();
     } else {
         $this->_creationTime = $this->_reader->readUInt32BE();
         $this->_modificationTime = $this->_reader->readUInt32BE();
         $this->_timescale = $this->_reader->readUInt32BE();
         $this->_duration = $this->_reader->readUInt32BE();
     }
     $this->_rate = (($tmp = $this->_reader->readUInt32BE()) >> 16 & 0xffff) + (double) ("0." . (string) ($tmp & 0xffff));
     $this->_volume = (($tmp = $this->_reader->readUInt16BE()) >> 8 & 0xff) + (double) ("0." . (string) ($tmp & 0xff));
     $this->_reader->skip(10);
     for ($i = 0; $i < 9; $i++) {
         $this->_matrix[$i] = $this->_reader->readUInt32BE();
     }
     $this->_reader->skip(24);
     $this->_nextTrackId = $this->_reader->readUInt32BE();
 }
コード例 #22
0
ファイル: Ndrm.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_data = $reader->read($this->getSize() - 12);
 }
コード例 #23
0
ファイル: Tkhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($this->getVersion() == 1) {
         $this->_creationTime = $this->_reader->readInt64BE();
         $this->_modificationTime = $this->_reader->readInt64BE();
         $this->_trackId = $this->_reader->readUInt32BE();
         $this->_reader->skip(4);
         $this->_duration = $this->_reader->readInt64BE();
     } else {
         $this->_creationTime = $this->_reader->readUInt32BE();
         $this->_modificationTime = $this->_reader->readUInt32BE();
         $this->_trackId = $this->_reader->readUInt32BE();
         $this->_reader->skip(4);
         $this->_duration = $this->_reader->readUInt32BE();
     }
     $this->_reader->skip(8);
     $this->_layer = $this->_reader->readInt16BE();
     $this->_alternateGroup = $this->_reader->readInt16BE();
     $this->_volume = (($tmp = $this->_reader->readUInt16BE()) >> 8 & 0xff) + (double) ("0." . (string) ($tmp & 0xff));
     $this->_reader->skip(2);
     for ($i = 0; $i < 9; $i++) {
         $this->_matrix[$i] = $this->_reader->readUInt32BE();
     }
     $this->_width = (($tmp = $this->_reader->readUInt32BE()) >> 16 & 0xffff) + (double) ("0." . (string) ($tmp & 0xffff));
     $this->_height = (($tmp = $this->_reader->readUInt32BE()) >> 16 & 0xffff) + (double) ("0." . (string) ($tmp & 0xffff));
 }
コード例 #24
0
ファイル: Bxml.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_xml = $this->_reader->read($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
 }
コード例 #25
0
ファイル: Cprt.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  * @todo Distinguish UTF-16?
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_language = chr((($tmp = $this->_reader->readUInt16BE()) >> 10 & 0x1f) + 0x60) . chr(($tmp >> 5 & 0x1f) + 0x60) . chr(($tmp & 0x1f) + 0x60);
     $this->_notice = $this->_reader->readString8($this->getOffset() + $this->getSize() - $this->_reader->getOffset());
 }
コード例 #26
0
ファイル: Tfra.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_trackId = $this->_reader->readUInt32BE();
     $reserved = ($tmp = $this->_reader->readUInt32BE()) >> 6 & 0x3ffffff;
     $lengthSizeOfTrafNum = $tmp >> 4 & 0x3;
     $lengthSizeOfTrunNum = $tmp >> 2 & 0x3;
     $lengthSizeOfSampleNum = $tmp & 0x3;
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 0; $i < $entryCount; $i++) {
         $entry = array();
         if ($this->getVersion() == 1) {
             $entry['time'] = $this->_reader->readInt64BE();
             $entry['moofOffset'] = $this->_reader->readInt64BE();
         } else {
             $entry['time'] = $this->_reader->readUInt32BE();
             $entry['moofOffset'] = $this->_reader->readUInt32BE();
         }
         switch ($lengthSizeOfTrafNum) {
             case 0:
                 $entry['trafNumber'] = $this->_reader->readUInt8();
                 break;
             case 1:
                 $entry['trafNumber'] = $this->_reader->readUInt16BE();
                 break;
             case 2:
                 $entry['trafNumber'] = $this->_reader->readUInt32BE();
                 break;
             case 3:
                 $entry['trafNumber'] = $this->_reader->readInt64BE();
                 break;
         }
         switch ($lengthSizeOfTrunNum) {
             case 0:
                 $entry['trunNumber'] = $this->_reader->readUInt8();
                 break;
             case 1:
                 $entry['trunNumber'] = $this->_reader->readUInt16BE();
                 break;
             case 2:
                 $entry['trunNumber'] = $this->_reader->readUInt32BE();
                 break;
             case 3:
                 $entry['trunNumber'] = $this->_reader->readInt64BE();
                 break;
         }
         switch ($lengthSizeOfSampleNum) {
             case 0:
                 $entry['sampleNumber'] = $this->_reader->readUInt8();
                 break;
             case 1:
                 $entry['sampleNumber'] = $this->_reader->readUInt16BE();
                 break;
             case 2:
                 $entry['sampleNumber'] = $this->_reader->readUInt32BE();
                 break;
             case 3:
                 $entry['sampleNumber'] = $this->_reader->readInt64BE();
                 break;
         }
         $this->_entries[] = $entry;
     }
 }
コード例 #27
0
ファイル: Mfro.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_parentSize = $this->_reader->readUInt32BE();
 }
コード例 #28
0
ファイル: Stsh.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $entryCount = $this->_reader->readUInt32BE();
     for ($i = 0; $i < $entryCount; $i++) {
         $this->_shadowSyncSampleTable[$i] = array('shadowedSampleNumber' => $this->_reader->readUInt32BE(), 'syncSampleNumber' => $this->_reader->readUInt32BE());
     }
 }
コード例 #29
0
ファイル: Pitm.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_itemId = $this->_reader->readUInt16BE();
 }
コード例 #30
0
ファイル: Mfhd.php プロジェクト: hausdesign/zf-library
 /**
  * Constructs the class with given parameters and reads box related data
  * from the ISO Base Media file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader, $options);
     $this->_sequenceNumber = $this->_reader->readUInt32BE();
 }