套件 | org.osmf.net.metrics |
類別 | public class MetricBase |
繼承 | MetricBase Object |
子類別 | ActualBitrateMetric, AvailableQualityLevelsMetric, BandwidthMetric, BufferFragmentsMetric, BufferLengthMetric, BufferOccupationRatioMetric, CurrentStatusMetric, DroppedFPSMetric, EmptyBufferMetric, FPSMetric, FragmentCountMetric, RecentSwitchMetric |
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | 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.
相關 API 元素
org.osmf.net.abr.MetricValue
org.osmf.net.abr.QoSInfoHistory
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
type : String [唯讀]
The type of the metric
| MetricBase | ||
value : MetricValue [唯讀]
The value of this metric
If the value has already been computed for the most recent QoSInfo,
return the cached result. | MetricBase |
屬性 | 定義自 | ||
---|---|---|---|
qosInfoHistory : QoSInfoHistory [唯讀]
The QoSInfoHistory object used to compute the metric. | MetricBase |
方法 | 定義自 | ||
---|---|---|---|
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 | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
會傳回指定之物件的字串形式。 | Object | ||
會傳回指定之物件的基本值。 | Object |
方法 | 定義自 | ||
---|---|---|---|
Computes the value of this metric
Subclasses must override to provide a specific implementation. | MetricBase |
qosInfoHistory | 屬性 |
qosInfoHistory:QoSInfoHistory
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
The QoSInfoHistory object used to compute the metric. It is only accessible to sublcasses.
實作
protected function get qosInfoHistory():QoSInfoHistory
type | 屬性 |
value | 屬性 |
value:MetricValue
[唯讀] 語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | 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.
實作
public function get value():MetricValue
MetricBase | () | 建構函式 |
public function MetricBase(qosInfoHistory:QoSInfoHistory, type:String)
Constructor.
參數qosInfoHistory:QoSInfoHistory — The QoSInfoHistory to be used for computing the metric
| |
type:String — The type of the metric
|
getValue | () | 方法 |
public function getValue():MetricValue
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | 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
傳回值MetricValue |
getValueForced | () | 方法 |
protected function getValueForced():MetricValue
語言版本: | ActionScript 3.0 |
產品版本: | OSMF 2.0 |
執行階段版本: | Flash Player 10, AIR 1.5 |
Computes the value of this metric Subclasses must override to provide a specific implementation.
傳回值MetricValue — The MetricValue result of the computation
|
Tue Jun 12 2018, 03:47 PM Z