summaryrefslogtreecommitdiffstats
path: root/media/base/mock_filter_host.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 23:52:05 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-12 23:52:05 +0000
commit576537844b224ca246713c57e039d19d0dfefbf7 (patch)
treeb9cdb7a157abaa212fa87cfbd18ed05c0f6f71e2 /media/base/mock_filter_host.h
parent1cf1f99e52b39e01115eeef712c139dfa63df00e (diff)
downloadchromium_src-576537844b224ca246713c57e039d19d0dfefbf7.zip
chromium_src-576537844b224ca246713c57e039d19d0dfefbf7.tar.gz
chromium_src-576537844b224ca246713c57e039d19d0dfefbf7.tar.bz2
Implemented end-of-stream callback for media::PipelineImpl.
A new method HasEnded() was added to renderer interfaces. Renderers return true when they have both received and rendered an end-of-stream buffer. For audio this translates to sending the very last buffer to the hardware. For video this translates to displaying a black frame after the very last frame has been displayed. Renderers can notify the pipeline that the value of HasEnded() has changed to true via FilterHost::NotifyEnded(). Instead of tracking which renderers have called NotifyEnded(), the pipeline uses the notification to poll every renderer. The ended callback will only be executed once every renderer returns true for HasEnded(). This has a nice benefit of being able to ignore extra NotifyEnded() calls if we already determine the pipeline has ended. With the changes to WebMediaPlayerImpl, we should now properly support both the ended event and looping. BUG=16768,17970,18433,18846 TEST=media_unittests, media layout tests, ended event, timeupdate should stop firing, looping should work, seeking after video ends Review URL: http://codereview.chromium.org/164403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/mock_filter_host.h')
-rw-r--r--media/base/mock_filter_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/base/mock_filter_host.h b/media/base/mock_filter_host.h
index c463541..439eda8 100644
--- a/media/base/mock_filter_host.h
+++ b/media/base/mock_filter_host.h
@@ -37,6 +37,7 @@ class MockFilterHost : public FilterHost {
MOCK_METHOD1(SetBufferedBytes, void(int64 buffered_bytes));
MOCK_METHOD2(SetVideoSize, void(size_t width, size_t height));
MOCK_METHOD1(SetStreaming, void(bool streamed));
+ MOCK_METHOD0(NotifyEnded, void());
MOCK_METHOD1(BroadcastMessage, void(FilterMessage message));
private: