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

Issue 6686061: PipelineError is dead. Long live PipelineStatus! (Closed)

Created:
9 years, 9 months ago by Ami GONE FROM CHROMIUM
Modified:
9 years, 7 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, sjl, ddorwin+watch_chromium.org, fischman+watch_chromium.org, Paweł Hajdan Jr., acolwell GONE FROM CHROMIUM, annacc, pam+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), darin-cc_chromium.org
Visibility:
Public.

Description

PipelineError is dead. Long live PipelineStatus! PipelineError was a poor naming choice because most of the time variables of that type held the value PIPELINE_OK meaning there was in fact no error. Replaced the idiom of [0-ary callback + GetError()] with [1-ary callback taking PipelineStatus argument] which makes the Pipeline API cleaner and less error-prone. Before, consumers of the API had to make sure to call GetError() at the top of each callback, or risk missing state transitions in the pipeline. Now each callback gets an explicit parameter holding the pipeline status at the moment the callback was invoked so failing to handle error conditions should be more apparent in the code. BUG=none TEST=media_unittests + trybots: {mac,linux,win}{_layout,}, linux_rel, linux_clang (all pass or fail with unrelated errors) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=78379

Patch Set 1 #

Patch Set 2 : Double-delete fix for PipelineStatusNotification #

Total comments: 18

Patch Set 3 : responses to CR #

Total comments: 18

Patch Set 4 : responses to 2nd CR #

Unified diffs Side-by-side diffs Delta from patch set Stats (+410 lines, -303 lines) Patch
M media/base/async_filter_factory_base.h View 2 chunks +4 lines, -4 lines 0 comments Download
M media/base/async_filter_factory_base.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M media/base/composite_data_source_factory.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M media/base/composite_filter.h View 3 chunks +5 lines, -5 lines 0 comments Download
M media/base/composite_filter.cc View 10 chunks +15 lines, -17 lines 0 comments Download
M media/base/filter_factories.h View 2 chunks +2 lines, -2 lines 0 comments Download
M media/base/filter_host.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M media/base/mock_callback.h View 2 chunks +4 lines, -4 lines 0 comments Download
M media/base/mock_callback.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M media/base/mock_filter_host.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/mock_filters.h View 4 chunks +4 lines, -4 lines 0 comments Download
M media/base/mock_filters.cc View 5 chunks +11 lines, -9 lines 0 comments Download
M media/base/pipeline.h View 5 chunks +8 lines, -16 lines 0 comments Download
M media/base/pipeline_impl.h View 1 2 3 12 chunks +49 lines, -20 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 20 chunks +65 lines, -42 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 1 2 3 26 chunks +102 lines, -53 lines 0 comments Download
media/base/pipeline_status.h View 2 chunks +3 lines, -4 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer_factory.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M media/filters/file_data_source.h View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/file_data_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/file_data_source_factory.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M media/tools/player_wtl/movie.cc View 1 chunk +7 lines, -8 lines 0 comments Download
M media/tools/player_x11/player_x11.cc View 1 2 3 4 chunks +25 lines, -20 lines 0 comments Download
M webkit/glue/media/buffered_data_source.h View 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/media/buffered_data_source.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M webkit/glue/media/buffered_data_source_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/media/simple_data_source.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M webkit/glue/media/web_data_source_factory.cc View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.h View 1 2 4 chunks +18 lines, -17 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.cc View 1 2 9 chunks +44 lines, -37 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Ami GONE FROM CHROMIUM
9 years, 9 months ago (2011-03-14 22:39:01 UTC) #1
acolwell GONE FROM CHROMIUM
LGTM w/ minor suggestions. http://codereview.chromium.org/6686061/diff/2001/media/base/filter_host.h File media/base/filter_host.h (right): http://codereview.chromium.org/6686061/diff/2001/media/base/filter_host.h#newcode1 media/base/filter_host.h:1: // Copyright (c) 2010 The ...
9 years, 9 months ago (2011-03-15 03:56:27 UTC) #2
Ami GONE FROM CHROMIUM
Thanks for the review! PTAL. http://codereview.chromium.org/6686061/diff/2001/media/base/filter_host.h File media/base/filter_host.h (right): http://codereview.chromium.org/6686061/diff/2001/media/base/filter_host.h#newcode1 media/base/filter_host.h:1: // Copyright (c) 2010 ...
9 years, 9 months ago (2011-03-15 17:37:18 UTC) #3
acolwell GONE FROM CHROMIUM
http://codereview.chromium.org/6686061/diff/5004/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/6686061/diff/5004/media/base/pipeline_impl.cc#newcode20 media/base/pipeline_impl.cc:20: : cv_(&lock_), status_(PIPELINE_OK), notified_(false) { I think each initializer ...
9 years, 9 months ago (2011-03-15 23:43:55 UTC) #4
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/6686061/diff/5004/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/6686061/diff/5004/media/base/pipeline_impl.cc#newcode20 media/base/pipeline_impl.cc:20: : cv_(&lock_), status_(PIPELINE_OK), notified_(false) { On 2011/03/15 23:43:55, acolwell ...
9 years, 9 months ago (2011-03-16 00:01:01 UTC) #5
acolwell GONE FROM CHROMIUM
LGTM
9 years, 9 months ago (2011-03-16 00:05:23 UTC) #6
scherkus (not reviewing)
9 years, 9 months ago (2011-03-23 05:45:13 UTC) #7
FYI this is awesome

Powered by Google App Engine
This is Rietveld 408576698