Error Correction Object defines the error correction method. This
* enables different error correction schemes to be used during content
* creation. The Error Correction Object contains provisions for opaque
* information needed by the error correction engine for recovery. For example,
* if the error correction scheme were a simple N+1 parity scheme, then the
* value of N would have to be available in this object.
*
* Note that this does not refer to the same thing as the Error Correction
* Type field in the {@link ASF_Object_StreamProperties Stream Properties
* Object}.
*
* @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_ErrorCorrection extends ASF_Object
{
/** @var string */
private $_type;
/** @var string */
private $_data;
/**
* 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);
$this->_type = $this->_reader->readGUID();
$dataLength = $this->_reader->readUInt32LE();
$this->_data = $this->_reader->read($dataLength);
}
/**
* Returns the type of error correction.
*
* @return string
*/
public function getType() { return $this->_type; }
/**
* Returns the data specific to the error correction scheme. The structure for
* the Error Correction Data field is determined by the value stored in
* the Error Correction Type field.
*
* @return Array
*/
public function getData() { return $this->_data; }
}