/** * 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()); } }
/** * 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()); } }
/** * 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())); }
/** * 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()); } }
/** * 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())); }
/** * 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(); } }
/** * 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()); } }
/** * 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(); }
/** * 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()); }
/** * 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())); } }
/** * 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); }
/** * 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(); } }
/** * 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(); }
/** * 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)); }
/** * 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()); } }
/** * 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(); }
/** * 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()); }
/** * 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(); } } }
/** * 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()); }
/** * 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); }
/** * 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(); }
/** * 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); }
/** * 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)); }
/** * 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()); }
/** * 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()); }
/** * 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; } }
/** * 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(); }
/** * 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()); } }
/** * 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(); }
/** * 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(); }