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

Issue 2101015: Change MediaFilter::Stop() to accept a callback so that Stop() is asynchronous. (Closed)

Created:
10 years, 7 months ago by boliu_use_chromium_pls
Modified:
9 years, 7 months ago
CC:
chromium-reviews, scherkus (not reviewing), fbarchard, awong, Alpha Left Google, Paweł Hajdan Jr., darin-cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Change MediaFilter::Stop() to accept a callback so that Stop() is asynchronous. So far PipelineImpl handles asynchronous MediaFilter::Stop(). The actual change to make MediaFilter::Stop() asynchronous will be in another check in. BUG=16059 TEST=Unit tests still runs Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48769

Patch Set 1 #

Total comments: 2

Patch Set 2 : Introduce kStopping and use FilterStateTransitionTask() for stop #

Total comments: 4

Patch Set 3 : Fix unit test errors in PipelineImpl change. #

Total comments: 7

Patch Set 4 : Remove PIPELINE_STOPPING completely and add a kErrorStopping state #

Patch Set 5 : Remove kErrorStopping state and use error_ to distinguish normal/error stops. #

Total comments: 7

Patch Set 6 : Fix comments. Rename DestroyFilters() to StartDestroyinFilters(). Add checks. #

Patch Set 7 : Start making filters in media/filters Stop() asynchronously. Fix WebMediaPlayerImpl Destroy() bug. #

Patch Set 8 : Revert filter changes. Going to make that another patch. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -141 lines) Patch
M media/base/filter_host.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/filters.h View 1 2 3 4 5 1 chunk +14 lines, -1 line 0 comments Download
M media/base/mock_filters.h View 3 4 5 7 chunks +11 lines, -6 lines 0 comments Download
M media/base/mock_filters.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M media/base/pipeline.h View 1 chunk +0 lines, -2 lines 0 comments Download
M media/base/pipeline_impl.h View 1 2 3 4 5 7 chunks +31 lines, -12 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 5 11 chunks +113 lines, -102 lines 3 comments Download
M media/base/pipeline_impl_unittest.cc View 4 10 chunks +20 lines, -10 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.cc View 7 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
boliu_use_chromium_pls
First patch only contains preliminary changes for the pipeline for making MediaFilter::Stop() asynchronous. Need review...
10 years, 7 months ago (2010-05-21 20:51:13 UTC) #1
boliu_use_chromium_pls
Forgot to add Reviewers.
10 years, 7 months ago (2010-05-21 20:57:22 UTC) #2
scherkus (not reviewing)
on the right track but I think this ultimately needs a new "kStopping" state http://codereview.chromium.org/2101015/diff/1/3 ...
10 years, 7 months ago (2010-05-22 01:44:08 UTC) #3
boliu_use_chromium_pls
I reverted my last change, so don't look at diff between changesets.
10 years, 7 months ago (2010-05-24 23:57:05 UTC) #4
scherkus (not reviewing)
getting there! http://codereview.chromium.org/2101015/diff/1004/6002 File media/base/pipeline_impl.cc (right): http://codereview.chromium.org/2101015/diff/1004/6002#newcode776 media/base/pipeline_impl.cc:776: I think we need to handle our ...
10 years, 7 months ago (2010-05-25 03:43:17 UTC) #5
boliu_use_chromium_pls
All media_unittests pass now. Introduced new method FinishDestroyingFilters which performs the clean up after all ...
10 years, 7 months ago (2010-05-26 00:53:08 UTC) #6
scherkus (not reviewing)
getting there!!!!! http://codereview.chromium.org/2101015/diff/9001/10001 File media/base/filters.h (right): http://codereview.chromium.org/2101015/diff/9001/10001#newcode111 media/base/filters.h:111: // TODO(boliu): Remove once Stop() is asynchronous ...
10 years, 7 months ago (2010-05-26 06:04:10 UTC) #7
boliu_use_chromium_pls
Remove PIPELINE_STOPPING completely and add a kErrorStopping state. New kErrorStopping state is used to distringuish ...
10 years, 7 months ago (2010-05-26 18:25:51 UTC) #8
boliu_use_chromium_pls
Remove kErrorStopping state and use error_ to distinguish normal/error stops. If currently in Stop(), then ...
10 years, 7 months ago (2010-05-26 21:18:57 UTC) #9
scherkus (not reviewing)
I think we're just about done here don't about unit tests for those corner cases ...
10 years, 7 months ago (2010-05-27 17:31:21 UTC) #10
boliu_use_chromium_pls
Filters under src/media/filters have Stop() with a callback now. Unit tests for these filters are ...
10 years, 7 months ago (2010-05-28 22:51:11 UTC) #11
boliu
Hey Andrew, Could you review the last bit of change to PipelineImpl? I ran tests ...
10 years, 6 months ago (2010-06-02 00:07:00 UTC) #12
scherkus (not reviewing)
10 years, 6 months ago (2010-06-02 02:13:05 UTC) #13
LGTM but we need to resolve some things before committing

http://codereview.chromium.org/2101015/diff/29001/30006
File media/base/pipeline_impl.cc (right):

http://codereview.chromium.org/2101015/diff/29001/30006#newcode638
media/base/pipeline_impl.cc:638: if (state_ == kStopped || (state_ == kStopping
&& error == PIPELINE_OK)) {
this bit of logic is confusing me...

so if we're stopping and then SetError() is called we'll save the error value
but continue stopping?

if we're in error state and stoptask is called we'll overwrite the error_ with
PIPELINE_OK?

also the comment seems to be out of date.. I believe StopTask can only be
executed as a result of calling Stop() -- not an error condition

we can talk about it in person

http://codereview.chromium.org/2101015/diff/29001/30006#newcode642
media/base/pipeline_impl.cc:642: } else if (state_ == kError ||
nit: we return, don't need else

http://codereview.chromium.org/2101015/diff/29001/30006#newcode1014
media/base/pipeline_impl.cc:1014: return; // Do not call Stop() on filters
twice.
nit: two spaces between ; and //

Powered by Google App Engine
This is Rietveld 408576698