RTP Audio System
2.0.0
|
Abstract QoS Description. More...
#include <abstractqosdescription.h>
Public Member Functions | |
AbstractQoSDescription () | |
virtual | ~AbstractQoSDescription () |
void | initDescription (const double frameRate) |
virtual void | updateDescription (const cardinal pktHeaderSize, const cardinal pktMaxSize)=0 |
double | getFrameRate () const |
double | setFrameRate (const double frameRate) |
double | getNextFrameRate () const |
double | getPrevFrameRate () const |
double | getFrameRateScaleFactor () const |
card64 | getMinBandwidth () const |
card64 | getMaxBandwidth () const |
card64 | getPosition () const |
void | setPosition (const card64 position) |
virtual cardinal | getLayers () const =0 |
virtual AbstractLayerDescription * | getLayer (const cardinal layer) const =0 |
double | getResources (ResourceUtilizationPoint &rup) const |
double | setResources (const ResourceUtilizationPoint &rup) |
virtual double | calculateUtilizationForLayerBandwidths (const double frameRate, const cardinal layers, const card64 *bandwidth) const |
virtual cardinal | getPrecomputedResourceUtilizationList (ResourceUtilizationPoint *rup, const card64 bwThreshold, const double utThreshold, const cardinal maxPoints) const =0 |
virtual cardinal | calculateResourceUtilizationList (ResourceUtilizationPoint *rup, const card64 bwThreshold, const double utThreshold, const cardinal maxPoints) const |
double | calculateMaxUtilizationForBandwidth (const card64 totalBandwidth, ResourceUtilizationPoint &rup) const |
virtual void | calculateMaxUtilizationForBandwidthArray (const card64 *totalBandwidthArray, ResourceUtilizationPoint *rupArray, const cardinal points) const |
double | getWantedUtilization () const |
void | setWantedUtilization (const double utilization) |
card64 | getMinWantedBandwidth () const |
card64 | getMaxWantedBandwidth () const |
void | setMinWantedBandwidth (const card64 bandwidth) |
void | setMaxWantedBandwidth (const card64 bandwidth) |
int8 | getStreamPriority () const |
void | setStreamPriority (const int8 priority) |
int8 | getSessionPriority () const |
void | setSessionPriority (const int8 priority) |
Protected Attributes | |
double | WantedUtilization |
card64 | MinWantedBandwidth |
card64 | MaxWantedBandwidth |
double | FrameRate |
card64 | Position |
cardinal | PktHeaderSize |
cardinal | PktMaxSize |
int8 | StreamPriority |
int8 | SessionPriority |
Private Member Functions | |
void | doResourceUtilizationIteration (ResourceUtilizationPoint *rup, const card64 bwThreshold, const double utThreshold, double *utilizationCache, card64 *bandwidthCache, const cardinal maxPoints, const cardinal maxCachePoints, const cardinal start, const cardinal end, const card64 startBandwidth, const card64 endBandwidth, const cardinal level, const cardinal maxLevel, cardinal &count) const |
void | calculateBandwidthInfo (const cardinal layer, BandwidthInfo &bandwidthInfo) const |
Abstract QoS Description.
This class contains a stream's QoS requirements.
Constructor.
AbstractQoSDescription::~AbstractQoSDescription | ( | ) | [virtual] |
Destructor.
void AbstractQoSDescription::calculateBandwidthInfo | ( | const cardinal | layer, |
BandwidthInfo & | bandwidthInfo | ||
) | const [private] |
double AbstractQoSDescription::calculateMaxUtilizationForBandwidth | ( | const card64 | totalBandwidth, |
ResourceUtilizationPoint & | rup | ||
) | const [inline] |
Calculate maximum utilization for given bandwidth. This is the single-point version of calculateMaxUtilizationForBandwidthArray().
totalBandwidth | Total bandwidth. |
rup | ResourceUtilizationPoint reference to store result. |
void AbstractQoSDescription::calculateMaxUtilizationForBandwidthArray | ( | const card64 * | totalBandwidthArray, |
ResourceUtilizationPoint * | rupArray, | ||
const cardinal | points | ||
) | const [virtual] |
Calculate maximum utilizations for given bandwidth array.
totalBandwidthArray | Total bandwidth array. |
rupArray | ResourceUtilizationPoint array to store results. |
points | Number of points in arrays. |
cardinal AbstractQoSDescription::calculateResourceUtilizationList | ( | ResourceUtilizationPoint * | rup, |
const card64 | bwThreshold, | ||
const double | utThreshold, | ||
const cardinal | maxPoints | ||
) | const [virtual] |
Calculate resource utilization list. To use a precomputed list, call getPrecomputedResourceUtilizationList().
rup | ResourceUtilizationPoint array capable of storing maxPoints entries. |
bwThreshold | Bandwidth threshold. |
utThreshold | Utilization threshold. |
maxPoints | Maximum number of ResourceUtilizationPoint to generate. |
double AbstractQoSDescription::calculateUtilizationForLayerBandwidths | ( | const double | frameRate, |
const cardinal | layers, | ||
const card64 * | bandwidth | ||
) | const [virtual] |
Calculate utilization for given frame rate and layers bandwidths.
frameRate | Frame rate. |
layers | Number of layers. |
bandwidth | Bandwidth array with entry for each layer. |
void AbstractQoSDescription::doResourceUtilizationIteration | ( | ResourceUtilizationPoint * | rup, |
const card64 | bwThreshold, | ||
const double | utThreshold, | ||
double * | utilizationCache, | ||
card64 * | bandwidthCache, | ||
const cardinal | maxPoints, | ||
const cardinal | maxCachePoints, | ||
const cardinal | start, | ||
const cardinal | end, | ||
const card64 | startBandwidth, | ||
const card64 | endBandwidth, | ||
const cardinal | level, | ||
const cardinal | maxLevel, | ||
cardinal & | count | ||
) | const [private] |
double AbstractQoSDescription::getFrameRate | ( | ) | const [inline] |
Get frame rate.
double AbstractQoSDescription::getFrameRateScaleFactor | ( | ) | const [inline] |
Get frame rate scale factor: (frameRate - MinFrameRate) / (MaxFrameRate - MinFrameRate).
virtual AbstractLayerDescription* AbstractQoSDescription::getLayer | ( | const cardinal | layer | ) | const [pure virtual] |
virtual cardinal AbstractQoSDescription::getLayers | ( | ) | const [pure virtual] |
Get maximum required total bandwidth.
Get maximum wanted bandwidth.
Get minimum required total bandwidth.
Get minimum wanted bandwidth.
double AbstractQoSDescription::getNextFrameRate | ( | ) | const [inline] |
Get next higher frame rate.
card64 AbstractQoSDescription::getPosition | ( | ) | const [inline] |
Get position.
virtual cardinal AbstractQoSDescription::getPrecomputedResourceUtilizationList | ( | ResourceUtilizationPoint * | rup, |
const card64 | bwThreshold, | ||
const double | utThreshold, | ||
const cardinal | maxPoints | ||
) | const [pure virtual] |
Get precomputed resource utilization list. This method tries to use a precomputed list instead of calculating all points like calculateResourceUtilizationList().
rup | ResourceUtilizationPoint array capable of storing maxPoints entries. |
bwThreshold | Bandwidth threshold. |
utThreshold | Utilization threshold. |
maxPoints | Maximum number of ResourceUtilizationPoint to generate. |
double AbstractQoSDescription::getPrevFrameRate | ( | ) | const [inline] |
Get next lower frame rate.
double AbstractQoSDescription::getResources | ( | ResourceUtilizationPoint & | rup | ) | const |
Get resources.
rup | ResourceUtilizationPoint reference to store resources. |
int8 AbstractQoSDescription::getSessionPriority | ( | ) | const [inline] |
Get session priority.
int8 AbstractQoSDescription::getStreamPriority | ( | ) | const [inline] |
Get stream priority.
double AbstractQoSDescription::getWantedUtilization | ( | ) | const [inline] |
Get wanted utilization.
void AbstractQoSDescription::initDescription | ( | const double | frameRate | ) | [inline] |
Initialize description.
frameRate | Frame rate. |
double AbstractQoSDescription::setFrameRate | ( | const double | frameRate | ) | [inline] |
Set frame rate.
frameRate | Frame rate. |
void AbstractQoSDescription::setMaxWantedBandwidth | ( | const card64 | bandwidth | ) |
Set maximum wanted bandwidth.
wanted | bandwidth Maximum wanted bandwidth. |
void AbstractQoSDescription::setMinWantedBandwidth | ( | const card64 | bandwidth | ) |
Set minimum wanted bandwidth.
wanted | bandwidth Minimum wanted bandwidth. |
void AbstractQoSDescription::setPosition | ( | const card64 | position | ) | [inline] |
Set position.
position | Position. |
double AbstractQoSDescription::setResources | ( | const ResourceUtilizationPoint & | rup | ) |
Set resources.
rup | ResourceUtilizationPoint reference containing resources. |
void AbstractQoSDescription::setSessionPriority | ( | const int8 | priority | ) | [inline] |
Set session priority.
priority | Session priority. |
void AbstractQoSDescription::setStreamPriority | ( | const int8 | priority | ) | [inline] |
Set stream priority.
priority | Stream priority. |
void AbstractQoSDescription::setWantedUtilization | ( | const double | utilization | ) | [inline] |
Set wanted utilization.
utilization | Wanted utilization. |
virtual void AbstractQoSDescription::updateDescription | ( | const cardinal | pktHeaderSize, |
const cardinal | pktMaxSize | ||
) | [pure virtual] |
Update description.
pktHeaderSize | Packet header size. |
pktMaxSize | Maximum packet size. |
Implemented in SimpleAudioQoSDescription.
double AbstractQoSDescription::FrameRate [protected] |
card64 AbstractQoSDescription::MaxWantedBandwidth [protected] |
card64 AbstractQoSDescription::MinWantedBandwidth [protected] |
cardinal AbstractQoSDescription::PktHeaderSize [protected] |
cardinal AbstractQoSDescription::PktMaxSize [protected] |
card64 AbstractQoSDescription::Position [protected] |
int8 AbstractQoSDescription::SessionPriority [protected] |
int8 AbstractQoSDescription::StreamPriority [protected] |
double AbstractQoSDescription::WantedUtilization [protected] |