diff --git a/proprietary/wvm/WVMExtractorImpl.cpp b/proprietary/wvm/WVMExtractorImpl.cpp index 978d98ae..7e922bff 100644 --- a/proprietary/wvm/WVMExtractorImpl.cpp +++ b/proprietary/wvm/WVMExtractorImpl.cpp @@ -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); diff --git a/proprietary/wvm/include/WVMExtractorImpl.h b/proprietary/wvm/include/WVMExtractorImpl.h index 7a48e1e0..96841d9c 100644 --- a/proprietary/wvm/include/WVMExtractorImpl.h +++ b/proprietary/wvm/include/WVMExtractorImpl.h @@ -34,6 +34,7 @@ public: virtual sp getMetaData(); virtual int64_t getCachedDurationUs(status_t *finalStatus); + virtual status_t getEstimatedBandwidthKbps(int32_t *kbps); virtual void setAdaptiveStreamingMode(bool adaptive); bool getAdaptiveStreamingMode() const;