Stream Prioritization Object indicates the author's intentions as * to which streams should or should not be dropped in response to varying * network congestion situations. There may be special cases where this * preferential order may be ignored (for example, the user hits the "mute" * button). Generally it is expected that implementations will try to honor the * author's preference. * * The priority of each stream is indicated by how early in the list that * stream's stream number is listed (in other words, the list is ordered in * terms of decreasing priority). * * The Mandatory flag field shall be set if the author wants that stream kept * "regardless". If this flag is not set, then that indicates that the stream * should be dropped in response to network congestion situations. Non-mandatory * streams must never be assigned a higher priority than mandatory streams. * * @package php-reader * @subpackage ASF * @author Sven Vollbehr * @copyright Copyright (c) 2008 The PHP Reader Project Workgroup * @license http://code.google.com/p/php-reader/wiki/License New BSD License * @version $Rev: 108 $ */ final class ASF_Object_StreamPrioritization extends ASF_Object { /** @var Array */ private $_priorityRecords = array(); /** * Constructs the class with given parameters and reads object related data * from the ASF file. * * @param Reader $reader The reader object. * @param Array $options The options array. */ public function __construct($reader, &$options = array()) { parent::__construct($reader, $options); $priorityRecordCount = $this->_reader->readUInt16LE(); for ($i = 0; $i < $priorityRecordCount; $i++) $this->_priorityRecords[] = array ("streamNumber" => $this->_reader->readUInt16LE(), "flags" => $this->_reader->readUInt16LE()); } /** * Returns an array of records. Each record consists of the following keys. * * o streamNumber -- Specifies the stream number. Valid values are between * 1 and 127. * * o flags -- Specifies the flags. The mandatory flag is the bit 1 (LSB). * * @return Array */ public function getPriorityRecords() { return $this->_priorityRecords; } }