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

Issue 11144036: Update Decryptor interface to support audio decoding. (Closed)

Created:
8 years, 2 months ago by xhwang
Modified:
8 years, 2 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Update Decryptor interface to support audio decoding. We were discussing the use of decryptor_->DeinitializeDecoder(Decryptor::kVideo); - vs - decryptor_->DeinitializeVideoDecoder(); I choose to use parameterized methods so that we have less code (duplication). The non-parameterized methods are cleaner for callers. But I feel the former is slightly better in general. Later on we'll have two Decryptors (ProxyDecryptor will not be a Decryptor anymore): 1) AesDecryptor, which doesn't care the stream type at all, not even for CancelDecrypt(). 2) PpapiDecryptor, which merely passes similar calls to the PluginInstance which then make similar PPP calls. It seems to me that for passing calls it's slightly cleaner to use parameterized methods. Also we have parameterized PPP calls already for the same reason (less functions through multiple layers). So in both cases, using parameterized methods results in less code. It's unfortunate that InitializeXXXDecoder and DecryptAndDecodeXXX are exceptions, due to different types they take/return. BUG=123421 TEST=media_unittest, content_unittest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162768

Patch Set 1 #

Patch Set 2 : Ready for review! #

Patch Set 3 : simplify AudioBuffers #

Total comments: 35

Patch Set 4 : resolve comments #

Total comments: 5

Patch Set 5 : nit #

Patch Set 6 : rebase only #

Patch Set 7 : rebase #

Patch Set 8 : fix compile error on Windows #

Patch Set 9 : remove leftover unretained #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -157 lines) Patch
M media/base/decryptor.h View 1 2 3 4 chunks +62 lines, -30 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 1 chunk +18 lines, -7 lines 0 comments Download
M media/base/mock_filters.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M media/crypto/aes_decryptor.h View 1 1 chunk +11 lines, -7 lines 0 comments Download
M media/crypto/aes_decryptor.cc View 1 2 3 4 5 6 7 4 chunks +22 lines, -6 lines 0 comments Download
M media/crypto/aes_decryptor_unittest.cc View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M media/filters/decrypting_video_decoder.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/decrypting_video_decoder_unittest.cc View 1 2 3 4 5 6 4 chunks +6 lines, -6 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 1 2 3 4 5 6 10 chunks +18 lines, -12 lines 0 comments Download
M webkit/media/crypto/ppapi/clear_key_cdm.cc View 1 2 3 4 5 6 3 chunks +7 lines, -4 lines 0 comments Download
M webkit/media/crypto/ppapi_decryptor.h View 1 2 3 4 5 6 1 chunk +18 lines, -6 lines 0 comments Download
M webkit/media/crypto/ppapi_decryptor.cc View 1 2 3 4 5 6 7 8 6 chunks +96 lines, -24 lines 0 comments Download
M webkit/media/crypto/proxy_decryptor.h View 1 1 chunk +12 lines, -4 lines 0 comments Download
M webkit/media/crypto/proxy_decryptor.cc View 1 2 3 4 5 6 7 6 chunks +24 lines, -6 lines 0 comments Download
M webkit/media/crypto/proxy_decryptor_unittest.cc View 1 12 chunks +38 lines, -35 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
xhwang
Decryptor interface change only. I'll fix header includes and update Decryptor implementations shortly. If you ...
8 years, 2 months ago (2012-10-15 23:47:33 UTC) #1
xhwang
Ready for review. PTAL!
8 years, 2 months ago (2012-10-16 20:05:52 UTC) #2
xhwang
PTAL! http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h#newcode134 media/base/decryptor.h:134: typedef std::list<scoped_refptr<Buffer> > AudioBuffers; One status per decode ...
8 years, 2 months ago (2012-10-17 00:18:59 UTC) #3
ddorwin
LG. Just minor stuff. http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h#newcode146 media/base/decryptor.h:146: // buffer. In this case ...
8 years, 2 months ago (2012-10-17 02:52:33 UTC) #4
ddorwin
a few more nits http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h#newcode178 media/base/decryptor.h:178: // Uninitializes the decoder and ...
8 years, 2 months ago (2012-10-17 07:16:05 UTC) #5
xhwang
PTAL again! http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/11144036/diff/9002/media/base/decryptor.h#newcode146 media/base/decryptor.h:146: // buffer. In this case the second ...
8 years, 2 months ago (2012-10-17 22:29:06 UTC) #6
ddorwin
LGTM. Question unrelated to the code. http://codereview.chromium.org/11144036/diff/9002/webkit/media/crypto/ppapi/clear_key_cdm.cc File webkit/media/crypto/ppapi/clear_key_cdm.cc (right): http://codereview.chromium.org/11144036/diff/9002/webkit/media/crypto/ppapi/clear_key_cdm.cc#newcode216 webkit/media/crypto/ppapi/clear_key_cdm.cc:216: // We don't ...
8 years, 2 months ago (2012-10-17 23:26:30 UTC) #7
scherkus (not reviewing)
lgtm with tiny, tiny nits can you also document in the CL description the motivation ...
8 years, 2 months ago (2012-10-18 02:08:36 UTC) #8
xhwang
For discussion about decryptor_->DeinitializeDecoder(Decryptor::kVideo); - vs - decryptor_->DeinitializeVideoDecoder(); I choose to use parameterized methods merely ...
8 years, 2 months ago (2012-10-18 04:33:16 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/11144036/7008
8 years, 2 months ago (2012-10-18 17:49:38 UTC) #10
commit-bot: I haz the power
8 years, 2 months ago (2012-10-18 20:05:44 UTC) #11
Change committed as 162768

Powered by Google App Engine
This is Rietveld 408576698