Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Issue 164403: Implemented end-of-stream callback for media::PipelineImpl. (Closed)

Created:
11 years, 4 months ago by scherkus (not reviewing)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : Finished #

Patch Set 3 : Nit #

Total comments: 10

Patch Set 4 : Fixes #

Patch Set 5 : More fixes #

Patch Set 6 : Removed commented out code #

Total comments: 13

Patch Set 7 : Foo #

Patch Set 8 : Baz #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -86 lines) Patch
M media/base/filter_host.h View 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/filters.h View 2 chunks +8 lines, -0 lines 0 comments Download
M media/base/mock_filter_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/mock_filters.h View 2 chunks +2 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.h View 1 6 chunks +14 lines, -2 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 7 chunks +50 lines, -4 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 3 chunks +47 lines, -0 lines 0 comments Download
M media/base/video_frame_impl.h View 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M media/base/video_frame_impl.cc View 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
M media/base/video_frame_impl_unittest.cc View 4 5 6 1 chunk +42 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_base.h View 2 chunks +5 lines, -0 lines 0 comments Download
M media/filters/audio_renderer_base.cc View 6 chunks +25 lines, -2 lines 0 comments Download
M media/filters/audio_renderer_base_unittest.cc View 1 2 3 3 chunks +21 lines, -0 lines 0 comments Download
M media/filters/video_renderer_base.h View 1 2 3 3 chunks +2 lines, -4 lines 0 comments Download
M media/filters/video_renderer_base.cc View 1 2 3 4 5 6 9 chunks +46 lines, -72 lines 0 comments Download
M media/filters/video_renderer_base_unittest.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.h View 3 chunks +6 lines, -0 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.cc View 1 5 chunks +26 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
scherkus (not reviewing)
Finally... took a few iterations and throw away changes to get here but I'm happy ...
11 years, 4 months ago (2009-08-12 19:08:50 UTC) #1
Alpha Left Google
the code looks good althoguh I have a question about the use of NotifyEnded vs ...
11 years, 4 months ago (2009-08-12 20:54:35 UTC) #2
scherkus (not reviewing)
callback vs. NotifyEnded()... it's tough to say because FilterHost itself is like an interface of ...
11 years, 4 months ago (2009-08-12 22:22:54 UTC) #3
Alpha Left Google
LGTM
11 years, 4 months ago (2009-08-12 22:27:05 UTC) #4
awong
couple of comments. http://codereview.chromium.org/164403/diff/1045/1050 File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/164403/diff/1045/1050#newcode678 Line 678: return; If NotifyEnded is called ...
11 years, 4 months ago (2009-08-12 22:36:15 UTC) #5
scherkus (not reviewing)
http://codereview.chromium.org/164403/diff/1045/1050 File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/164403/diff/1045/1050#newcode678 Line 678: return; On 2009/08/12 22:36:15, awong wrote: > If ...
11 years, 4 months ago (2009-08-12 23:19:45 UTC) #6
awong
11 years, 4 months ago (2009-08-12 23:33:05 UTC) #7
LGTM

Powered by Google App Engine
This is Rietveld 408576698