Send current bandwidth info event when buffering occurs
There is a dependent change in frameworks/av Change-Id: Ic189654486936a501a1b45c5acb442753303d362 related-to-bug: 5883234
This commit is contained in:
@@ -556,6 +556,20 @@ int64_t WVMExtractorImpl::getCachedDurationUs(status_t *finalStatus) {
|
||||
return durationUs;
|
||||
}
|
||||
|
||||
status_t WVMExtractorImpl::getEstimatedBandwidthKbps(int32_t *kbps)
|
||||
{
|
||||
status_t err = UNKNOWN_ERROR;
|
||||
unsigned long bandwidth;
|
||||
WVStatus status = WV_Info_CurrentBandwidth(mSession, &bandwidth);
|
||||
if (status == WV_Status_OK) {
|
||||
*kbps = bandwidth / 1024;
|
||||
err = OK;
|
||||
} else {
|
||||
ALOGV("WV_Info_CurrentBandwidth failed: %d", status);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
void WVMExtractorImpl::setAdaptiveStreamingMode(bool adaptive)
|
||||
{
|
||||
//ALOGD("WVMExtractorImpl::setAdaptiveStreamingMode(%d)", adaptive);
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
|
||||
virtual sp<MetaData> getMetaData();
|
||||
virtual int64_t getCachedDurationUs(status_t *finalStatus);
|
||||
virtual status_t getEstimatedBandwidthKbps(int32_t *kbps);
|
||||
|
||||
virtual void setAdaptiveStreamingMode(bool adaptive);
|
||||
bool getAdaptiveStreamingMode() const;
|
||||
|
||||
Reference in New Issue
Block a user