Merge "Send current bandwidth info event when buffering occurs" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
415ce6714a
@@ -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);
|
||||
|
||||
@@ -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