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

Issue 165733002: Add DecryptingDemuxerStream::Stop(). (Closed)

Created:
6 years, 10 months ago by xhwang
Modified:
6 years, 10 months ago
Reviewers:
ddorwin
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Add DecryptingDemuxerStream::Stop(). During the teardown process, media pipeline will be waiting on the render main thread. If a Decryptor depends on the render main thread (e.g. PpapiDecryptor), the pending DecryptCB will not be satisfied. This CL adds a DecryptingDemuxerStream::Stop() method so that the stopping process doesn't wait for any pending operation. BUG=343748 TEST=Add unittests to cover this case. R=ddorwin@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251277

Patch Set 1 #

Total comments: 28

Patch Set 2 : comments addressed #

Patch Set 3 : #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -16 lines) Patch
M media/filters/decoder_selector.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/decrypting_demuxer_stream.h View 1 2 chunks +12 lines, -3 lines 0 comments Download
M media/filters/decrypting_demuxer_stream.cc View 1 2 chunks +35 lines, -0 lines 4 comments Download
M media/filters/decrypting_demuxer_stream_unittest.cc View 1 2 9 chunks +91 lines, -11 lines 7 comments Download
M media/filters/video_frame_stream.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
xhwang
PTAL https://codereview.chromium.org/165733002/diff/1/media/filters/decoder_selector.cc File media/filters/decoder_selector.cc (right): https://codereview.chromium.org/165733002/diff/1/media/filters/decoder_selector.cc#newcode133 media/filters/decoder_selector.cc:133: decrypted_stream_->Stop( DecoderSelector is new in M34. So I ...
6 years, 10 months ago (2014-02-14 01:33:19 UTC) #1
ddorwin
LG. Some questions and nits; also waiting for the new tests. https://codereview.chromium.org/165733002/diff/1/media/filters/decrypting_demuxer_stream.cc File media/filters/decrypting_demuxer_stream.cc (right): ...
6 years, 10 months ago (2014-02-14 01:55:13 UTC) #2
xhwang
PTAL again https://codereview.chromium.org/165733002/diff/1/media/filters/decrypting_demuxer_stream.cc File media/filters/decrypting_demuxer_stream.cc (right): https://codereview.chromium.org/165733002/diff/1/media/filters/decrypting_demuxer_stream.cc#newcode83 media/filters/decrypting_demuxer_stream.cc:83: if (state_ == kDecryptorRequested) { On 2014/02/14 ...
6 years, 10 months ago (2014-02-14 03:00:52 UTC) #3
xhwang
https://codereview.chromium.org/165733002/diff/170001/media/filters/decrypting_demuxer_stream_unittest.cc File media/filters/decrypting_demuxer_stream_unittest.cc (right): https://codereview.chromium.org/165733002/diff/170001/media/filters/decrypting_demuxer_stream_unittest.cc#newcode240 media/filters/decrypting_demuxer_stream_unittest.cc:240: if (is_decryptor_set_) CancelDecrypt() won't be called if the decryptor ...
6 years, 10 months ago (2014-02-14 03:07:09 UTC) #4
ddorwin
lgtm LGTM with nits comments, which can be addressed in another CL. https://codereview.chromium.org/165733002/diff/170001/media/filters/decrypting_demuxer_stream.cc File media/filters/decrypting_demuxer_stream.cc ...
6 years, 10 months ago (2014-02-14 04:17:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/165733002/170001
6 years, 10 months ago (2014-02-14 04:19:40 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 08:45:24 UTC) #7
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=202085
6 years, 10 months ago (2014-02-14 08:45:24 UTC) #8
xhwang
The CQ bit was checked by xhwang@chromium.org
6 years, 10 months ago (2014-02-14 08:46:43 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/165733002/170001
6 years, 10 months ago (2014-02-14 08:47:34 UTC) #10
xhwang
Committed patchset #3 manually as r251277 (tree was closed).
6 years, 10 months ago (2014-02-14 09:27:15 UTC) #11
xhwang
6 years, 10 months ago (2014-02-14 18:47:26 UTC) #12
Message was sent while issue was closed.
Comments addressed in https://codereview.chromium.org/163433004/.

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
File media/filters/decrypting_demuxer_stream.cc (right):

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
media/filters/decrypting_demuxer_stream.cc:119: // Invalidate all weak pointers
so that pending callbacks won't fire.
On 2014/02/14 04:17:59, ddorwin wrote:
> ...so that callbacks won't be fired into this object?

Done.

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
media/filters/decrypting_demuxer_stream.cc:127:
decryptor_->RegisterNewKeyCB(GetDecryptorStreamType(),
On 2014/02/14 04:17:59, ddorwin wrote:
> Per the discussion in PS1, maybe we should remove this.

Added TODO since we also need to clean up other Decrypting* classes.

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
File media/filters/decrypting_demuxer_stream_unittest.cc (right):

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
media/filters/decrypting_demuxer_stream_unittest.cc:53:
ACTION_P2(SetDecryptorIfNotNull, decryptor, is_decryptor_set) {
On 2014/02/14 04:17:59, ddorwin wrote:
> This could probably use a comment. I'm not exactly sure what it's doing or
about
> the logic for is_decryptor_set.
> 
> Is it really setting a decryptor if (what is?) not null? Or is it setting the
> output parameter if something is not null?

Done.

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
media/filters/decrypting_demuxer_stream_unittest.cc:114:
.WillRepeatedly(SaveArg<1>(&key_added_cb_));
On 2014/02/14 04:17:59, ddorwin wrote:
> I wonder if we should just have two expects, the second with the "null" CB.
Or,
> just revert this after removing the CB clearing per the discussion there.

Added TODO.

https://codereview.chromium.org/165733002/diff/170001/media/filters/decryptin...
media/filters/decrypting_demuxer_stream_unittest.cc:254: // Whether a valid
Decryptor is set to the |demuxer_stream_|.
On 2014/02/14 04:17:59, ddorwin wrote:
> ... has been set in the...?

Done.

Powered by Google App Engine
This is Rietveld 408576698