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

Issue 10822026: Implement "Key Presence" step in "Encrypted Block Encounted" algorithm in EME. (Closed)

Created:
8 years, 5 months ago by xhwang
Modified:
8 years, 4 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, darin-cc_chromium.org, fgalligan1
Visibility:
Public.

Description

Implement "Key Presence" step in "Encrypted Block Encounted" algorithm in EME. See related spec here: http://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html#algorithms-enrypted-block If the AesDecryptor cannot find the decryption for the encrypted buffer, it returns a kNoKey. In ProxyDecryptor, if the input cannot be decrypted due to kNoKey, the ProxyDecryptor will cache the encrypted buffers and callbacks and fire a needkey event. When some key is added (AddKey called) later, it will try to decrypt these buffers again. The callbacks will be fired on the same thread where Decrypt() was called originally. BUG=125401, 125753 TEST=media_unittest, media layout_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149952

Patch Set 1 #

Total comments: 8

Patch Set 2 : Use message_loop_proxy. #

Total comments: 5

Patch Set 3 : Add unit test. #

Total comments: 12

Patch Set 4 : Resolve comments and rebase #

Patch Set 5 : Fix broken ChunkDemuxerTest due to null MessageLoop::Current() #

Total comments: 1

Patch Set 6 : Add Stop() to ProxyDecryptor to abort decrypt cb during tearing down. #

Patch Set 7 : Protect is_shutting_down_ w/ lock and issue Decryptor::Stop() from FFVD. #

Patch Set 8 : Rebase #

Total comments: 10

Patch Set 9 : Resolve comments. #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -29 lines) Patch
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M media/base/decryptor.h View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -2 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M media/crypto/aes_decryptor.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M media/crypto/aes_decryptor.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M media/crypto/aes_decryptor_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +11 lines, -0 lines 0 comments Download
M media/filters/chunk_demuxer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -10 lines 0 comments Download
M media/filters/chunk_demuxer_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_video_decoder.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -1 line 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
M webkit/media/crypto/ppapi_decryptor.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M webkit/media/crypto/ppapi_decryptor.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/media/crypto/proxy_decryptor.h View 1 2 3 4 5 6 7 8 9 3 chunks +30 lines, -7 lines 0 comments Download
M webkit/media/crypto/proxy_decryptor.cc View 1 2 3 4 5 6 7 8 9 6 chunks +136 lines, -7 lines 0 comments Download
A webkit/media/crypto/proxy_decryptor_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +229 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
xhwang
Hello scherkus and ddorwin, This CL replaces the original "kTryAgain" CL to implement the "resume ...
8 years, 5 months ago (2012-07-25 22:40:02 UTC) #1
scherkus (not reviewing)
http://codereview.chromium.org/10822026/diff/1/webkit/media/crypto/proxy_decryptor.cc File webkit/media/crypto/proxy_decryptor.cc (right): http://codereview.chromium.org/10822026/diff/1/webkit/media/crypto/proxy_decryptor.cc#newcode111 webkit/media/crypto/proxy_decryptor.cc:111: std::swap(pending_decrypt_closures_, closures_to_run); so if I queue a bunch of ...
8 years, 5 months ago (2012-07-26 00:13:50 UTC) #2
xhwang
http://codereview.chromium.org/10822026/diff/1/webkit/media/crypto/proxy_decryptor.cc File webkit/media/crypto/proxy_decryptor.cc (right): http://codereview.chromium.org/10822026/diff/1/webkit/media/crypto/proxy_decryptor.cc#newcode111 webkit/media/crypto/proxy_decryptor.cc:111: std::swap(pending_decrypt_closures_, closures_to_run); On 2012/07/26 00:13:50, scherkus wrote: > so ...
8 years, 5 months ago (2012-07-26 00:53:00 UTC) #3
scherkus (not reviewing)
based on our discussion I forget -- where you planning on writing tests in this ...
8 years, 5 months ago (2012-07-26 02:06:38 UTC) #4
xhwang
Hello scherkus and ddorwin, I added unit tests too. PTAL! xhwang http://codereview.chromium.org/10822026/diff/4001/webkit/media/crypto/proxy_decryptor.cc File webkit/media/crypto/proxy_decryptor.cc (right): ...
8 years, 4 months ago (2012-07-26 22:16:03 UTC) #5
scherkus (not reviewing)
http://codereview.chromium.org/10822026/diff/4001/webkit/media/crypto/proxy_decryptor.h File webkit/media/crypto/proxy_decryptor.h (right): http://codereview.chromium.org/10822026/diff/4001/webkit/media/crypto/proxy_decryptor.h#newcode92 webkit/media/crypto/proxy_decryptor.h:92: base::Lock pending_decrypt_closures_lock_; On 2012/07/26 22:16:04, xhwang wrote: > On ...
8 years, 4 months ago (2012-07-28 23:07:19 UTC) #6
scherkus (not reviewing)
http://codereview.chromium.org/10822026/diff/14001/webkit/media/crypto/proxy_decryptor_unittest.cc File webkit/media/crypto/proxy_decryptor_unittest.cc (right): http://codereview.chromium.org/10822026/diff/14001/webkit/media/crypto/proxy_decryptor_unittest.cc#newcode197 webkit/media/crypto/proxy_decryptor_unittest.cc:197: StopMessageLoop(); this method name is misleading as it only ...
8 years, 4 months ago (2012-07-28 23:08:03 UTC) #7
xhwang
Resolved most comments from scherkus@. PTAL! Sorry, I accidentally rebased :/. Hopefully this will not ...
8 years, 4 months ago (2012-07-30 19:58:09 UTC) #8
xhwang
+acolwell for changes in media/filters/chunk*, PTAL! http://codereview.chromium.org/10822026/diff/14004/media/filters/chunk_demuxer_unittest.cc File media/filters/chunk_demuxer_unittest.cc (right): http://codereview.chromium.org/10822026/diff/14004/media/filters/chunk_demuxer_unittest.cc#newcode673 media/filters/chunk_demuxer_unittest.cc:673: MessageLoop message_loop_; In ...
8 years, 4 months ago (2012-07-30 20:48:25 UTC) #9
xhwang
FYI, I still need to figure out how to make the tear down process working ...
8 years, 4 months ago (2012-07-30 22:50:01 UTC) #10
xhwang
On 2012/07/30 22:50:01, xhwang wrote: > FYI, I still need to figure out how to ...
8 years, 4 months ago (2012-07-31 16:11:14 UTC) #11
xhwang
On 2012/07/31 16:11:14, xhwang wrote: > On 2012/07/30 22:50:01, xhwang wrote: > > FYI, I ...
8 years, 4 months ago (2012-08-01 16:25:07 UTC) #12
scherkus (not reviewing)
lgtm w/ nits http://codereview.chromium.org/10822026/diff/17005/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/10822026/diff/17005/media/base/decryptor.h#newcode81 media/base/decryptor.h:81: // Stops the decryptor and fires ...
8 years, 4 months ago (2012-08-02 18:05:31 UTC) #13
xhwang
http://codereview.chromium.org/10822026/diff/17005/media/base/decryptor.h File media/base/decryptor.h (right): http://codereview.chromium.org/10822026/diff/17005/media/base/decryptor.h#newcode81 media/base/decryptor.h:81: // Stops the decryptor and fires any pending DecryptCB ...
8 years, 4 months ago (2012-08-03 20:08:10 UTC) #14
xhwang
piman@, could you please do an OWNERS review on this? It's just adding a test. ...
8 years, 4 months ago (2012-08-03 20:09:36 UTC) #15
piman
lgtm
8 years, 4 months ago (2012-08-03 20:11:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xhwang@chromium.org/10822026/21003
8 years, 4 months ago (2012-08-03 20:12:42 UTC) #17
commit-bot: I haz the power
8 years, 4 months ago (2012-08-03 22:39:31 UTC) #18
Change committed as 149952

Powered by Google App Engine
This is Rietveld 408576698