Merge "Send current bandwidth info event when buffering occurs" into jb-mr1-dev

This commit is contained in:
Jeffrey Tinker
2012-08-23 17:24:36 -07:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 0 deletions

View File

@@ -557,6 +557,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);

View File

@@ -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;