本文整理汇总了PHP中Zend_Media_Asf_Object::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Media_Asf_Object::__construct方法的具体用法?PHP Zend_Media_Asf_Object::__construct怎么用?PHP Zend_Media_Asf_Object::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Media_Asf_Object
的用法示例。
在下文中一共展示了Zend_Media_Asf_Object::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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();
}
示例2: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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();
for ($i = 0; $i < $indexSpecifiersCount; $i++) {
$this->_indexSpecifiers[] = array('streamNumber' => $this->_reader->readUInt16LE(), 'indexType' => $this->_reader->readUInt16LE());
}
}
示例3: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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);
}
示例4: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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);
}
示例5: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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());
}
}
示例6: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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());
}
}
示例7: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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());
}
}
示例8: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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 Zend_Media_Asf_Object_Data_Packet($reader);
}
示例9: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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();
}
}
示例10: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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);
}
}
示例11: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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();
}
}
示例12: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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);
}
示例13: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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;
}
}
示例14: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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;
}
}
示例15: __construct
/**
* Constructs the class with given parameters and reads object related data
* from the ASF file.
*
* @param Zend_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));
}