summaryrefslogtreecommitdiffstats
path: root/content/renderer/media/android
diff options
context:
space:
mode:
authorsandersd@chromium.org <sandersd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 00:05:31 +0000
committersandersd@chromium.org <sandersd@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-16 00:05:31 +0000
commit02022fc1935970dfc2690eb150cbb0ab304d54ed (patch)
tree244563e26057baeaa1b9c91278e90caff951bd48 /content/renderer/media/android
parenteaf1a7c59154adf8672ccc7942464589e64c34a3 (diff)
downloadchromium_src-02022fc1935970dfc2690eb150cbb0ab304d54ed.zip
chromium_src-02022fc1935970dfc2690eb150cbb0ab304d54ed.tar.gz
chromium_src-02022fc1935970dfc2690eb150cbb0ab304d54ed.tar.bz2
Add return-by-value implementations of blink::WebMediaPlayer::buffered()
This prep work will allow the interface in blink to be changed. Blink change is https://codereview.chromium.org/284143002/. BUG=360254 Review URL: https://codereview.chromium.org/282073003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/media/android')
-rw-r--r--content/renderer/media/android/media_source_delegate.cc4
-rw-r--r--content/renderer/media/android/media_source_delegate.h1
-rw-r--r--content/renderer/media/android/webmediaplayer_android.cc6
-rw-r--r--content/renderer/media/android/webmediaplayer_android.h1
4 files changed, 12 insertions, 0 deletions
diff --git a/content/renderer/media/android/media_source_delegate.cc b/content/renderer/media/android/media_source_delegate.cc
index 6b6523c..bd786b0 100644
--- a/content/renderer/media/android/media_source_delegate.cc
+++ b/content/renderer/media/android/media_source_delegate.cc
@@ -190,6 +190,10 @@ const blink::WebTimeRanges& MediaSourceDelegate::Buffered() {
return buffered_web_time_ranges_;
}
+blink::WebTimeRanges MediaSourceDelegate::Buffered() const {
+ return ConvertToWebTimeRanges(buffered_time_ranges_);
+}
+
size_t MediaSourceDelegate::DecodedFrameCount() const {
return statistics_.video_frames_decoded;
}
diff --git a/content/renderer/media/android/media_source_delegate.h b/content/renderer/media/android/media_source_delegate.h
index 4480a45..75de676 100644
--- a/content/renderer/media/android/media_source_delegate.h
+++ b/content/renderer/media/android/media_source_delegate.h
@@ -68,6 +68,7 @@ class MediaSourceDelegate : public media::DemuxerHost {
const DurationChangeCB& duration_change_cb);
const blink::WebTimeRanges& Buffered();
+ blink::WebTimeRanges Buffered() const;
size_t DecodedFrameCount() const;
size_t DroppedFrameCount() const;
size_t AudioDecodedByteCount() const;
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 3fe6c2e..fbee409 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -440,6 +440,12 @@ const WebTimeRanges& WebMediaPlayerAndroid::buffered() {
return buffered_;
}
+WebTimeRanges WebMediaPlayerAndroid::buffered() const {
+ if (media_source_delegate_)
+ return media_source_delegate_->Buffered();
+ return buffered_;
+}
+
double WebMediaPlayerAndroid::maxTimeSeekable() const {
// If we haven't even gotten to ReadyStateHaveMetadata yet then just
// return 0 so that the seekable range is empty.
diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h
index 46142df..587e54c 100644
--- a/content/renderer/media/android/webmediaplayer_android.h
+++ b/content/renderer/media/android/webmediaplayer_android.h
@@ -99,6 +99,7 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer,
virtual void setRate(double rate);
virtual void setVolume(double volume);
virtual const blink::WebTimeRanges& buffered();
+ virtual blink::WebTimeRanges buffered() const;
virtual double maxTimeSeekable() const;
// Poster image, as defined in the <video> element.