Package | org.osmf.net.metrics |
Class | public class MetricBase |
Inheritance | MetricBase Object |
Subclasses | ActualBitrateMetric, AvailableQualityLevelsMetric, BandwidthMetric, BufferFragmentsMetric, BufferLengthMetric, BufferOccupationRatioMetric, CurrentStatusMetric, DroppedFPSMetric, EmptyBufferMetric, FPSMetric, FragmentCountMetric, RecentSwitchMetric |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
MetricBase is a base class for metrics used for Adaptive Bitrate. A metric's value is computed based on QoSInfoHistory. A metric is identified by its type.
The base class handles the caching of the computed value. The subclasses should only implement the actual computation.
All subclasses should have qosInfoHistory
as the first parameter in the constructor.
All subclasses must set the _type
in the constructor.
Related API Elements
org.osmf.net.abr.MetricValue
org.osmf.net.abr.QoSInfoHistory
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
type : String [read-only]
The type of the metric
| MetricBase | ||
value : MetricValue [read-only]
The value of this metric
If the value has already been computed for the most recent QoSInfo,
return the cached result. | MetricBase |
Property | Defined By | ||
---|---|---|---|
qosInfoHistory : QoSInfoHistory [read-only]
The QoSInfoHistory object used to compute the metric. | MetricBase |
Method | Defined By | ||
---|---|---|---|
Constructor. | MetricBase | ||
The value of this metric
If the value has already been computed for the most recent QoSInfo,
return the cached result.
This method is internal so it can be overriden by metric mockers,
for testing purposes
| MetricBase | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
Method | Defined By | ||
---|---|---|---|
Computes the value of this metric
Subclasses must override to provide a specific implementation. | MetricBase |
qosInfoHistory | property |
qosInfoHistory:QoSInfoHistory
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The QoSInfoHistory object used to compute the metric. It is only accessible to sublcasses.
Implementation
protected function get qosInfoHistory():QoSInfoHistory
type | property |
value | property |
value:MetricValue
[read-only] Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The value of this metric If the value has already been computed for the most recent QoSInfo, return the cached result.
Implementation
public function get value():MetricValue
MetricBase | () | Constructor |
public function MetricBase(qosInfoHistory:QoSInfoHistory, type:String)
Constructor.
ParametersqosInfoHistory:QoSInfoHistory — The QoSInfoHistory to be used for computing the metric
| |
type:String — The type of the metric
|
getValue | () | method |
public function getValue():MetricValue
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The value of this metric If the value has already been computed for the most recent QoSInfo, return the cached result. This method is internal so it can be overriden by metric mockers, for testing purposes
ReturnsMetricValue |
getValueForced | () | method |
protected function getValueForced():MetricValue
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 2.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Computes the value of this metric Subclasses must override to provide a specific implementation.
ReturnsMetricValue — The MetricValue result of the computation
|
Thu Dec 6 2018, 01:12 PM -08:00