예제 #1
0
 /**
  * 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->getSize()) {
         $this->_trackId[] = $this->_reader->readUInt32BE();
     }
 }
예제 #2
0
 /**
  * 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();
 }
예제 #3
0
 /**
  * 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.
  */
 public function __construct($reader = null, &$options = array())
 {
     parent::__construct($reader, $options);
     if ($reader === null) {
         return;
     }
     $this->_version = ($field = $this->_reader->readUInt32BE()) >> 24 & 0xff;
     $this->_flags = $field & 0xffffff;
 }
예제 #4
0
 /**
  * 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->_dataFormat = $this->_reader->read(4);
 }
예제 #5
0
 /**
  * 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);
     $offsetSize = ($tmp = $this->_reader->readUInt16BE()) >> 12 & 0xf;
     $lengthSize = $tmp >> 8 & 0xf;
     $baseOffsetSize = $tmp >> 4 & 0xf;
     $itemCount = $this->_reader->readUInt16BE();
     for ($i = 0; $i < $itemCount; $i++) {
         $item = array();
         $item['itemId'] = $this->_reader->readUInt16BE();
         $item['dataReferenceIndex'] = $this->_reader->readUInt16BE();
         $item['baseOffset'] = $baseOffsetSize == 4 ? $this->_reader->readUInt32BE() : ($baseOffsetSize == 8 ? $this->_reader->readInt64BE() : 0);
         $extentCount = $this->_reader->readUInt16BE();
         $item['extents'] = array();
         for ($j = 0; $j < $extentCount; $j++) {
             $extent = array();
             $extent['offset'] = $offsetSize == 4 ? $this->_reader->readUInt32BE() : ($offsetSize == 8 ? $this->_reader->readInt64BE() : 0);
             $extent['length'] = $lengthSize == 4 ? $this->_reader->readUInt32BE() : ($lengthSize == 8 ? $this->_reader->readInt64BE() : 0);
             $item['extents'][] = $extent;
         }
         $this->_items[] = $item;
     }
 }
예제 #6
0
 /**
  * Constructs the class with given parameters.
  *
  * @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);
 }
예제 #7
0
 /**
  * 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->_majorBrand = $this->_reader->readString8(4);
     $this->_minorVersion = $this->_reader->readUInt32BE();
     while ($this->_reader->getOffset() < $this->getSize()) {
         if (($brand = $this->_reader->readString8(4)) != '') {
             $this->_compatibleBrands[] = $brand;
         }
     }
 }