Beispiel #1
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $seekpointCount = $this->getSize() / 18;
     for ($i = 0; $i < $seekpointCount; $i++) {
         $this->_seekpoints[] = array('sampleNumber' => $this->_reader->readInt64BE(), 'offset' => $this->_reader->readInt64BE(), 'numberOfSamples' => $this->_reader->readUInt16BE());
     }
 }
Beispiel #2
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @todo  There is the possibility to put only a link to the picture file by
  *  using the MIME type '-->' and having a complete URL instead of picture
  *  data. Support for such needs design considerations.
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $this->_type = $this->_reader->readUInt32BE();
     $this->_mimeType = $this->_reader->read($this->_reader->readUInt32BE());
     $this->_description = $this->_reader->read($this->_reader->readUInt32BE());
     $this->_width = $this->_reader->readUInt32BE();
     $this->_height = $this->_reader->readUInt32BE();
     $this->_colorDepth = $this->_reader->readUInt32BE();
     $this->_numberOfColors = $this->_reader->readUInt32BE();
     $this->_data = $this->_reader->read($this->_dataSize = $this->_reader->readUInt32BE());
 }
Beispiel #3
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $this->_minimumBlockSize = $this->_reader->readUInt16BE();
     $this->_maximumBlockSize = $this->_reader->readUInt16BE();
     $this->_minimumFrameSize = $this->_reader->readUInt24BE();
     $this->_maximumFrameSize = $this->_reader->readUInt24BE();
     $this->_sampleRate = HausDesign_Bit_Twiddling::getValue($tmp = $this->_reader->readUInt32BE(), 12, 31);
     $this->_numberOfChannels = HausDesign_Bit_Twiddling::getValue($tmp, 9, 11) + 1;
     $this->_bitsPerSample = HausDesign_Bit_Twiddling::getValue($tmp, 4, 8) + 1;
     $this->_numberOfSamples = HausDesign_Bit_Twiddling::getValue($tmp, 0, 3) << 32 | $this->_reader->readUInt32BE();
     $this->_md5Signature = bin2hex($this->_reader->read(16));
 }
Beispiel #4
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $this->_catalogNumber = rtrim($this->_reader->read(128), "");
     $this->_leadinSamples = $this->_reader->readInt64BE();
     $this->_compactDisc = $this->_reader->readUInt8() >> 7 & 0x1;
     $this->_reader->skip(258);
     $tracksLength = $this->_reader->readUInt8();
     for ($i = 0; $i < $tracksLength; $i++) {
         $this->_tracks[$i] = array('offset' => $this->_reader->readInt64BE(), 'number' => $this->_reader->readUInt8(), 'isrc' => rtrim($this->_reader->read(12), ""), 'type' => ($tmp = $this->_reader->readUInt8()) >> 7 & 0x1, 'pre-emphasis' => $tmp >> 6 & 0x1, 'index' => array());
         $this->_reader->skip(13);
         $indexPointsLength = $this->_reader->readUInt8();
         for ($j = 0; $j < $indexPointsLength; $j++) {
             $this->_tracks[$i]['index'][$j] = array('offset' => $this->_reader->readInt64BE(), 'number' => $this->_reader->readUInt8());
             $this->_reader->skip(3);
         }
     }
 }
Beispiel #5
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
 }
Beispiel #6
0
 /**
  * Constructs the class with given parameters and parses object related data.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $this->_identifier = $this->_reader->readUInt32BE();
     $this->_data = $this->_reader->read($this->getSize() - 4);
 }
 /**
  * Constructs the class with given parameters and parses object related data using the vorbis comment implementation
  * class {@link HausDesign_Media_Vorbis_Header_Comment}.
  *
  * @param HausDesign_Io_Reader $reader The reader object.
  */
 public function __construct($reader)
 {
     parent::__construct($reader);
     $this->_impl = new HausDesign_Media_Vorbis_Header_Comment($this->_reader, array('vorbisContext' => false));
 }