/**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_profile = $this->_reader->readUInt8();
     $this->_mode = $this->_reader->readUInt8();
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_indexEntryCountInterval = $this->_reader->readUInt32LE();
     $indexSpecifiersCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $indexSpecifiersCount; $i++) {
         $this->_indexSpecifiers[] = array('streamNumber' => $this->_reader->readUInt16LE(), 'indexType' => $this->_reader->readUInt16LE());
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $dataSize = $this->_reader->readUInt32LE();
     $this->_data = $this->_reader->read($dataSize);
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $bitrateRecordsCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $bitrateRecordsCount; $i++) {
         $this->_bitrateRecords[] = array('streamNumber' => ($tmp = $this->_reader->readInt16LE()) & 0x1f, 'flags' => $tmp >> 5, 'averageBitrate' => $this->_reader->readUInt32LE());
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_bannerImageType = $this->_reader->readUInt32LE();
     $bannerImageDataSize = $this->_reader->readUInt32LE();
     $this->_bannerImageData = $this->_reader->read($bannerImageDataSize);
     $bannerImageUrlLength = $this->_reader->readUInt32LE();
     $this->_bannerImageUrl = $this->_reader->read($bannerImageUrlLength);
     $copyrightUrlLength = $this->_reader->readUInt32LE();
     $this->_copyrightUrl = $this->_reader->read($copyrightUrlLength);
 }
Beispiel #6
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_fileId = $this->_reader->readGuid();
     $this->_indexEntryTimeInterval = $this->_reader->readInt64LE();
     $this->_maximumPacketCount = $this->_reader->readUInt32LE();
     $indexEntriesCount = $this->_reader->readUInt32LE();
     for ($i = 0; $i < $indexEntriesCount; $i++) {
         $this->_indexEntries[] = array('packetNumber' => $this->_reader->readUInt32LE(), 'packetCount' => $this->_reader->readUInt16LE());
     }
 }
Beispiel #7
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_fileId = $this->_reader->readGuid();
     $this->_totalDataPackets = $this->_reader->readInt64LE();
     $this->_reader->skip(2);
     //      No support for Data Packets as of yet (if ever)
     //      for ($i = 0; $i < $this->_totalDataPackets; $i++)
     //        $this->_dataPackets[] =
     //            new HausDesign_Media_Asf_Object_Data_Packet($reader);
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $priorityRecordCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $priorityRecordCount; $i++) {
         $this->_priorityRecords[] = array('streamNumber' => $this->_reader->readUInt16LE(), 'flags' => $this->_reader->readUInt16LE());
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_exclusionType = $this->_reader->readGuid();
     $streamNumbersCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $streamNumbersCount; $i++) {
         $this->_streamNumbers[] = $this->_reader->readUInt16LE();
     }
 }
Beispiel #10
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $languageIdRecordsCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $languageIdRecordsCount; $i++) {
         $languageIdLength = $this->_reader->readInt8();
         $languageId = $this->_reader->readString16($languageIdLength);
         $this->_languages[] = iconv('utf-16le', $this->getOption('encoding'), $languageId);
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF file.
  *
  * @param HausDesign_Io_Reader $reader  The reader object.
  * @param Array          $options The options array.
  */
 public function __construct($reader, &$options = array())
 {
     parent::__construct($reader = null, $options);
     if ($reader === null) {
         return;
     }
     $this->_sharingType = $this->_reader->readGuid();
     $this->_dataBitrate = $this->_reader->readUInt32LE();
     $this->_bufferSize = $this->_reader->readUInt32LE();
     $streamNumbersCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $streamNumbersCount; $i++) {
         $this->_streamNumbers[] = $this->_reader->readUInt16LE();
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $secretDataLength = $this->_reader->readUInt32LE();
     $this->_secretData = $this->_reader->read($secretDataLength);
     $protectionTypeLength = $this->_reader->readUInt32LE();
     $this->_protectionType = $this->_reader->readString8($protectionTypeLength);
     $keyIdLength = $this->_reader->readUInt32LE();
     $this->_keyId = $this->_reader->readString8($keyIdLength);
     $licenseUrlLength = $this->_reader->readUInt32LE();
     $this->_licenseUrl = $this->_reader->readString8($licenseUrlLength);
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $descriptionRecordsCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $descriptionRecordsCount; $i++) {
         $descriptionRecord = array('languageIndex' => $this->_reader->readUInt16LE(), 'streamNumber' => $this->_reader->readUInt16LE());
         $nameLength = $this->_reader->readUInt16LE();
         $dataType = $this->_reader->readUInt16LE();
         $dataLength = $this->_reader->readUInt32LE();
         $descriptionRecord['name'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($nameLength));
         switch ($dataType) {
             case 0:
                 // Unicode string
                 $descriptionRecord['data'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($dataLength));
                 break;
             case 1:
                 // BYTE array
                 $descriptionRecord['data'] = $this->_reader->read($dataLength);
                 break;
             case 2:
                 // BOOL
                 $descriptionRecord['data'] = $this->_reader->readUInt16LE() == 1;
                 break;
             case 3:
                 // DWORD
                 $descriptionRecord['data'] = $this->_reader->readUInt32LE();
                 break;
             case 4:
                 // QWORD
                 $descriptionRecord['data'] = $this->_reader->readInt64LE();
                 break;
             case 5:
                 // WORD
                 $descriptionRecord['data'] = $this->_reader->readUInt16LE();
                 break;
             case 6:
                 // GUID
                 $descriptionRecord['data'] = $this->_reader->readGuid();
                 break;
             default:
                 break;
         }
         $this->_descriptionRecords[] = $descriptionRecord;
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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);
     $contentEncryptionRecordsCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $contentEncryptionRecordsCount; $i++) {
         $entry = array('systemId' => $this->_reader->readGuid(), 'systemVersion' => $this->_reader->readUInt32LE(), 'streamNumbers' => array());
         $encryptedObjectRecordCount = $this->_reader->readUInt16LE();
         for ($j = 0; $j < $encryptedObjectRecordCount; $j++) {
             $this->_reader->skip(4);
             $entry['streamNumbers'][] = $this->_reader->readUInt16LE();
         }
         $dataCount = $this->_reader->readUInt32LE();
         $entry['data'] = $this->_reader->read($dataCount);
         $this->_contentEncryptionRecords[] = $entry;
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $titleLen = $this->_reader->readUInt16LE();
     $authorLen = $this->_reader->readUInt16LE();
     $copyrightLen = $this->_reader->readUInt16LE();
     $descriptionLen = $this->_reader->readUInt16LE();
     $ratingLen = $this->_reader->readUInt16LE();
     $this->_title = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($titleLen));
     $this->_author = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($authorLen));
     $this->_copyright = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($copyrightLen));
     $this->_description = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($descriptionLen));
     $this->_rating = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($ratingLen));
 }
Beispiel #16
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_reserved1 = $this->_reader->readGuid();
     $markersCount = $this->_reader->readUInt32LE();
     $this->_reserved2 = $this->_reader->readUInt16LE();
     $nameLength = $this->_reader->readUInt16LE();
     $this->_name = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($nameLength));
     for ($i = 0; $i < $markersCount; $i++) {
         $marker = array('offset' => $this->_reader->readInt64LE(), 'presentationTime' => $this->_reader->readInt64LE());
         $this->_reader->skip(2);
         $marker['sendTime'] = $this->_reader->readUInt32LE();
         $marker['flags'] = $this->_reader->readUInt32LE();
         $descriptionLength = $this->_reader->readUInt32LE();
         $marker['description'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($descriptionLength));
         $this->_markers[] = $marker;
     }
 }
Beispiel #17
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_reserved = $this->_reader->readGuid();
     $codecEntriesCount = $this->_reader->readUInt32LE();
     for ($i = 0; $i < $codecEntriesCount; $i++) {
         $entry = array('type' => $this->_reader->readUInt16LE());
         $codecNameLength = $this->_reader->readUInt16LE() * 2;
         $entry['codecName'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($codecNameLength));
         $codecDescriptionLength = $this->_reader->readUInt16LE() * 2;
         $entry['codecDescription'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($codecDescriptionLength));
         $codecInformationLength = $this->_reader->readUInt16LE();
         $entry['codecInformation'] = $this->_reader->read($codecInformationLength);
         $this->_entries[] = $entry;
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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;
     }
     $contentDescriptorsCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $contentDescriptorsCount; $i++) {
         $nameLen = $this->_reader->readUInt16LE();
         $name = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($nameLen));
         $valueDataType = $this->_reader->readUInt16LE();
         $valueLen = $this->_reader->readUInt16LE();
         switch ($valueDataType) {
             case 0:
                 // string
                 $this->_contentDescriptors[$name] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($valueLen));
                 break;
             case 1:
                 // byte array
                 $this->_contentDescriptors[$name] = $this->_reader->read($valueLen);
                 break;
             case 2:
                 // bool
                 $this->_contentDescriptors[$name] = $this->_reader->readUInt32LE() == 1 ? true : false;
                 break;
             case 3:
                 // 32-bit integer
                 $this->_contentDescriptors[$name] = $this->_reader->readUInt32LE();
                 break;
             case 4:
                 // 64-bit integer
                 $this->_contentDescriptors[$name] = $this->_reader->readInt64LE();
                 break;
             case 5:
                 // 16-bit integer
                 $this->_contentDescriptors[$name] = $this->_reader->readUInt16LE();
                 break;
             default:
                 break;
         }
     }
 }
Beispiel #19
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_reserved = $this->_reader->readGuid();
     $commandsCount = $this->_reader->readUInt16LE();
     $commandTypesCount = $this->_reader->readUInt16LE();
     $commandTypes = array();
     for ($i = 0; $i < $commandTypesCount; $i++) {
         $commandTypeNameLength = $this->_reader->readUInt16LE();
         $commandTypes[] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($commandTypeNameLength * 2));
     }
     for ($i = 0; $i < $commandsCount; $i++) {
         $command = array('presentationTime' => $this->_reader->readUInt32LE(), 'type' => $commandTypes[$this->_reader->readUInt16LE()]);
         $commandNameLength = $this->_reader->readUInt16LE();
         $command['name'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($commandNameLength * 2));
         $this->_commands[] = $command;
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_startTime = $this->_reader->readInt64LE();
     $this->_endTime = $this->_reader->readInt64LE();
     $this->_dataBitrate = $this->_reader->readUInt32LE();
     $this->_bufferSize = $this->_reader->readUInt32LE();
     $this->_initialBufferFullness = $this->_reader->readUInt32LE();
     $this->_alternateDataBitrate = $this->_reader->readUInt32LE();
     $this->_alternateBufferSize = $this->_reader->readUInt32LE();
     $this->_alternateInitialBufferFullness = $this->_reader->readUInt32LE();
     $this->_maximumObjectSize = $this->_reader->readUInt32LE();
     $this->_flags = $this->_reader->readUInt32LE();
     $this->_streamNumber = $this->_reader->readUInt16LE();
     $this->_streamLanguageIndex = $this->_reader->readUInt16LE();
     $this->_averageTimePerFrame = $this->_reader->readInt64LE();
     $streamNameCount = $this->_reader->readUInt16LE();
     $payloadExtensionSystemCount = $this->_reader->readUInt16LE();
     for ($i = 0; $i < $streamNameCount; $i++) {
         $streamName = array('languageIndex' => $this->_reader->readUInt16LE());
         $streamNameLength = $this->_reader->readUInt16LE();
         $streamName['streamName'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($streamNameLength));
         $this->_streamNames[] = $streamName;
     }
     for ($i = 0; $i < $payloadExtensionSystemCount; $i++) {
         $payloadExtensionSystem = array('extensionSystemId' => $this->_reader->readGuid(), 'extensionDataSize' => $this->_reader->readUInt16LE());
         $extensionSystemInfoLength = $this->_reader->readUInt32LE();
         $payloadExtensionSystem['extensionSystemInfo'] = iconv('utf-16le', $this->getOption('encoding'), $this->_reader->readString16($extensionSystemInfoLength));
         $this->_payloadExtensionSystems[] = $payloadExtensionSystem;
     }
 }
Beispiel #21
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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);
 }
Beispiel #22
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_indexEntryTimeInterval = $this->_reader->readUInt32LE();
     $indexSpecifiersCount = $this->_reader->readUInt16LE();
     $indexBlocksCount = $this->_reader->readUInt32LE();
     for ($i = 0; $i < $indexSpecifiersCount; $i++) {
         $this->_indexSpecifiers[] = array('streamNumber' => $this->_reader->readUInt16LE(), 'indexType' => $this->_reader->readUInt16LE());
     }
     for ($i = 0; $i < $indexBlocksCount; $i++) {
         $indexEntryCount = $this->_reader->readUInt32LE();
         $blockPositions = array();
         for ($i = 0; $i < $indexSpecifiersCount; $i++) {
             $blockPositions[] = $this->_reader->readInt64LE();
         }
         $offsets = array();
         for ($i = 0; $i < $indexSpecifiersCount; $i++) {
             $offsets[] = $this->_reader->readUInt32LE();
         }
         $this->_indexBlocks[] = array('blockPositions' => $blockPositions, 'indexEntryOffsets' => $offsets);
     }
 }
Beispiel #23
0
 /**
  * Sets the object size. The size must include the 24 byte header.
  *
  * @param integer $size The object size.
  */
 public final function setSize($size)
 {
     if ($this->_parent !== null) {
         $this->_parent->setSize(($this->_parent->getSize() > 0 ? $this->_parent->getSize() : 0) + $size - ($this->_size > 0 ? $this->_size : 0));
     }
     $this->_size = $size;
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_streamType = $this->_reader->readGuid();
     $this->_errorCorrectionType = $this->_reader->readGuid();
     $this->_timeOffset = $this->_reader->readInt64LE();
     $typeSpecificDataLength = $this->_reader->readUInt32LE();
     $errorCorrectionDataLength = $this->_reader->readUInt32LE();
     $this->_flags = $this->_reader->readUInt16LE();
     $this->_reserved = $this->_reader->readUInt32LE();
     switch ($this->_streamType) {
         case self::AUDIO_MEDIA:
             $this->_typeSpecificData = array('codecId' => $this->_reader->readUInt16LE(), 'numberOfChannels' => $this->_reader->readUInt16LE(), 'samplesPerSecond' => $this->_reader->readUInt32LE(), 'avgNumBytesPerSecond' => $this->_reader->readUInt32LE(), 'blockAlignment' => $this->_reader->readUInt16LE(), 'bitsPerSample' => $this->_reader->readUInt16LE());
             $codecSpecificDataSize = $this->_reader->readUInt16LE();
             $this->_typeSpecificData['codecSpecificData'] = $this->_reader->read($codecSpecificDataSize);
             break;
         case self::VIDEO_MEDIA:
             $this->_typeSpecificData = array('encodedImageWidth' => $this->_reader->readUInt32LE(), 'encodedImageHeight' => $this->_reader->readUInt32LE(), 'reservedFlags' => $this->_reader->readInt8());
             $this->_reader->skip(2);
             $formatDataSize = $this->_reader->readUInt32LE();
             $this->_typeSpecificData = array_merge($this->_typeSpecificData, array('imageWidth' => $this->_reader->readUInt32LE(), 'imageHeight' => $this->_reader->readUInt32LE(), 'reserved' => $this->_reader->readUInt16LE(), 'bitsPerPixelCount' => $this->_reader->readUInt16LE(), 'compressionId' => $this->_reader->readUInt32LE(), 'imageSize' => $this->_reader->readUInt32LE(), 'horizontalPixelsPerMeter' => $this->_reader->readUInt32LE(), 'verticalPixelsPerMeter' => $this->_reader->readUInt32LE(), 'colorsUsedCount' => $this->_reader->readUInt32LE(), 'importantColorsCount' => $this->_reader->readUInt32LE(), 'codecSpecificData' => $this->_reader->read($formatDataSize - 38)));
             break;
         case self::JFIF_MEDIA:
             $this->_typeSpecificData = array('imageWidth' => $this->_reader->readUInt32LE(), 'imageHeight' => $this->_reader->readUInt32LE(), 'reserved' => $this->_reader->readUInt32LE());
             break;
         case self::DEGRADABLE_JPEG_MEDIA:
             $this->_typeSpecificData = array('imageWidth' => $this->_reader->readUInt32LE(), 'imageHeight' => $this->_reader->readUInt32LE(), $this->_reader->readUInt16LE(), $this->_reader->readUInt16LE(), $this->_reader->readUInt16LE());
             $interchangeDataSize = $this->_reader->readUInt16LE();
             if ($interchangeDataSize == 0) {
                 $interchangeDataSize++;
             }
             $this->_typeSpecificData['interchangeData'] = $this->_reader->read($interchangeDataSize);
             break;
         case self::FILE_TRANSFER_MEDIA:
             // break intentionally omitted
         // break intentionally omitted
         case self::BINARY_MEDIA:
             $this->_typeSpecificData = array('majorMediaType' => $this->_reader->readGUID(), 'mediaSubtype' => $this->_reader->readGUID(), 'fixedSizeSamples' => $this->_reader->readUInt32LE(), 'temporalCompression' => $this->_reader->readUInt32LE(), 'sampleSize' => $this->_reader->readUInt32LE(), 'formatType' => $this->_reader->readGUID());
             $formatDataSize = $this->_reader->readUInt32LE();
             $this->_typeSpecificData['formatData'] = $this->_reader->read($formatDataSize);
             break;
         case self::COMMAND_MEDIA:
             // break intentionally omitted
         // break intentionally omitted
         default:
             $this->_reader->skip($typeSpecificDataLength);
             break;
     }
     switch ($this->_errorCorrectionType) {
         case self::AUDIO_SPREAD:
             $this->_errorCorrectionData = array('span' => $this->_reader->readInt8(), 'virtualPacketLength' => $this->_reader->readUInt16LE(), 'virtualChunkLength' => $this->_reader->readUInt16LE());
             $silenceDataSize = $this->_reader->readUInt16LE();
             $this->_errorCorrectionData['silenceData'] = $this->_reader->read($silenceDataSize);
             break;
         case self::NO_ERROR_CORRECTION:
             // break intentionally omitted
         // break intentionally omitted
         default:
             $this->_reader->skip($errorCorrectionDataLength);
             break;
     }
 }
Beispiel #25
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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 = $this->_reader->read($this->getSize() - 24);
 }
Beispiel #26
0
 /**
  * Removes the object.
  *
  * @param HausDesign_Media_Asf_Object $object The object to remove
  */
 public final function removeObject($object)
 {
     if ($this->hasObject($object->getIdentifier())) {
         foreach ($this->_objects[$object->getIdentifier()] as $key => $value) {
             if ($object === $value) {
                 unset($this->_objects[$object->getIdentifier()][$key]);
             }
         }
     }
 }
Beispiel #27
0
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_reader->skip(4);
     $indexSpecifiersCount = $this->_reader->readUInt16LE();
     $indexBlocksCount = $this->_reader->readUInt32LE();
     for ($i = 0; $i < $indexSpecifiersCount; $i++) {
         $this->_indexSpecifiers[] = array('streamNumber' => $this->_reader->readUInt16LE(), 'indexType' => $this->_reader->readUInt16LE());
     }
     for ($i = 0; $i < $indexBlocksCount; $i++) {
         $indexEntryCount = $this->_reader->readUInt32LE();
         $timecodeRange = $this->_reader->readUInt16LE();
         $blockPositions = array();
         for ($i = 0; $i < $indexSpecifiersCount; $i++) {
             $blockPositions[] = $this->_reader->readInt64LE();
         }
         $indexEntries = array();
         for ($i = 0; $i < $indexEntryCount; $i++) {
             $timecode = $this->_reader->readUInt32LE();
             $offsets = array();
             for ($i = 0; $i < $indexSpecifiersCount; $i++) {
                 $offsets[] = $this->_reader->readUInt32LE();
             }
             $indexEntries[] = array('timecode' => $timecode, 'offsets' => $offsets);
         }
         $this->_indexBlocks[] = array('timecodeRange' => $timecodeRange, 'blockPositions' => $blockPositions, 'indexEntries' => $indexEntries);
     }
 }
 /**
  * Constructs the class with given parameters and reads object related data
  * from the ASF 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->_fileId = $this->_reader->readGuid();
     $this->_fileSize = $this->_reader->readInt64LE();
     $this->_creationDate = $this->_reader->readInt64LE();
     $this->_dataPacketsCount = $this->_reader->readInt64LE();
     $this->_playDuration = $this->_reader->readInt64LE();
     $this->_sendDuration = $this->_reader->readInt64LE();
     $this->_preroll = $this->_reader->readInt64LE();
     $this->_flags = $this->_reader->readUInt32LE();
     $this->_minimumDataPacketSize = $this->_reader->readUInt32LE();
     $this->_maximumDataPacketSize = $this->_reader->readUInt32LE();
     $this->_maximumBitrate = $this->_reader->readUInt32LE();
 }