Wasabi ExpressPlay SDK for Embedded Systems
1.23.0
|
Media Source statistics. More...
#include <WsbMediaAccess.h>
Data Fields | |
WSB_UInt64 | bandwidth |
Observed download rate for streamed media in bits per second. More... | |
Media Source statistics.
For the streaming media, download rate is measured and reported combined for all media streams. A WSB_MediaSourceStatistics field is included in the WSB_MediaSegmentInfo structure, and a WSB_MediaSourceStatistics argument is passed to the WSB_MediaSourceRepresentationSelectorInterface::SelectRepresentation callback.
The semantics of the reported bandwidth in WSB_MediaSourceStatistics::bandwidth is the following: in case of separate audio and video media, as in DASH-MP4, the download rate is measured at the start of each segment. For the case of multiplexed media types, e.g. DASH-TS, download rate is measured for each segment of the multiplexed stream. The measurement is done on the first 500KB of a segment or until a segment end. Individual measurement is combined with previous measurements, if any, in a exponentially moving average fashion using the expression: bandwidth = bandwidth*0.3 + new_measurement*0.7. (Note that the specific coefficients or the specific statistic used might change in a future version of this software, these details are provided as an example implementation.)
In the case of audio and video media fetched on separate streams, the measured bandwidth represents the download rate of the combined streams. In particular, even though they are on separate streams, audio and video samples get streamed in an interleaved fashion, based on their media time stamps, i.e. DTS. Such a total bandwidth estimate can be utilized in a representation selection algorithm provided by a client module that implements the WSB_MediaSourceRepresentationSelectorInterface interface.
WSB_UInt64 WSB_MediaSourceStatistics::bandwidth |
Observed download rate for streamed media in bits per second.