From a435de089da4dd37c3c183f633a49107c720dd95 Mon Sep 17 00:00:00 2001 From: Dalyn Cessac Date: Wed, 16 Mar 2011 11:06:40 -0500 Subject: Added phpvideotoolkit transcoder and updates to the preset ui --- .../src/ASF/Object/StreamPrioritization.php | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php (limited to 'libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php') diff --git a/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php new file mode 100644 index 0000000..e5f1bf5 --- /dev/null +++ b/libraries/phpvideotoolkit/adapters/ffmpeg-php/php-reader/src/ASF/Object/StreamPrioritization.php @@ -0,0 +1,99 @@ +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; } +} -- cgit v1.2.3