summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authoracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-20 05:48:07 +0000
committeracolwell@chromium.org <acolwell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-20 05:48:07 +0000
commit47021af6a5368ced2a2fb7b47f151f8c0a068de5 (patch)
tree13678a8c4fc4cf4a8580fff8b28b7b0a2216dcbf /content/renderer
parentc5fa4c46d26e552b4105b480b65dedad70dad5dd (diff)
downloadchromium_src-47021af6a5368ced2a2fb7b47f151f8c0a068de5.zip
chromium_src-47021af6a5368ced2a2fb7b47f151f8c0a068de5.tar.gz
chromium_src-47021af6a5368ced2a2fb7b47f151f8c0a068de5.tar.bz2
Update the WebMediaSourceClientImpl & ChunkDemuxer to received explicit end of stream cancellation.
There are other MediaSource API interactions other than append() that can cause a transition out of the "end of stream" state. This patch simply makes it possible for ChunkDemuxer to get explicitly notified by Blink when entering/leaving the "end of stream" state. BUG=239506 TEST=All existing tests pass. Additional LayoutTests will be added to cover non-append related transitions out of the "end of stream" state. Review URL: https://chromiumcodereview.appspot.com/19649007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/media/webmediasourceclient_impl.cc12
-rw-r--r--content/renderer/media/webmediasourceclient_impl.h5
2 files changed, 15 insertions, 2 deletions
diff --git a/content/renderer/media/webmediasourceclient_impl.cc b/content/renderer/media/webmediasourceclient_impl.cc
index 1aef773..66a3f02 100644
--- a/content/renderer/media/webmediasourceclient_impl.cc
+++ b/content/renderer/media/webmediasourceclient_impl.cc
@@ -60,8 +60,14 @@ void WebMediaSourceClientImpl::setDuration(double new_duration) {
demuxer_->SetDuration(new_duration);
}
+// TODO(acolwell): Remove this once endOfStream() is removed from Blink.
void WebMediaSourceClientImpl::endOfStream(
WebMediaSourceClient::EndOfStreamStatus status) {
+ markEndOfStream(status);
+}
+
+void WebMediaSourceClientImpl::markEndOfStream(
+ WebMediaSourceClient::EndOfStreamStatus status) {
media::PipelineStatus pipeline_status = media::PIPELINE_OK;
switch (status) {
@@ -77,7 +83,11 @@ void WebMediaSourceClientImpl::endOfStream(
NOTIMPLEMENTED();
}
- demuxer_->EndOfStream(pipeline_status);
+ demuxer_->MarkEndOfStream(pipeline_status);
+}
+
+void WebMediaSourceClientImpl::unmarkEndOfStream() {
+ demuxer_->UnmarkEndOfStream();
}
} // namespace content
diff --git a/content/renderer/media/webmediasourceclient_impl.h b/content/renderer/media/webmediasourceclient_impl.h
index 4607dd3..bebdd54 100644
--- a/content/renderer/media/webmediasourceclient_impl.h
+++ b/content/renderer/media/webmediasourceclient_impl.h
@@ -29,7 +29,10 @@ class WebMediaSourceClientImpl : public WebKit::WebMediaSourceClient {
WebKit::WebSourceBuffer** source_buffer) OVERRIDE;
virtual double duration() OVERRIDE;
virtual void setDuration(double duration) OVERRIDE;
- virtual void endOfStream(EndOfStreamStatus status) OVERRIDE;
+ // TODO(acolwell): Remove this once endOfStream() is removed from Blink.
+ virtual void endOfStream(EndOfStreamStatus status);
+ virtual void markEndOfStream(EndOfStreamStatus status) OVERRIDE;
+ virtual void unmarkEndOfStream() OVERRIDE;
private:
media::ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl.