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

Issue 2446413003: Add cdm::ContentDecryptionModule_9 (Closed)

Created:
4 years, 1 month ago by jrummell
Modified:
3 years, 7 months ago
CC:
cdm-api-reviews_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add cdm::ContentDecryptionModule_9 Changes: - Support host challenge - Remove OnLegacySessionError() - Remove |legacy_destination_url| from OnSessionMessage() - Rename DecryptAndDecodeFrame() to DecryptAndDecodeVideo() - Rename DecryptAndDecodeSamples() to DecryptAndDecodeAudio() BUG=570216

Patch Set 1 #

Total comments: 23

Patch Set 2 : RejectionReason #

Total comments: 10

Patch Set 3 : export again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+422 lines, -42 lines) Patch
M content_decryption_module.h View 1 2 10 chunks +352 lines, -42 lines 0 comments Download
A content_decryption_module_broker.h View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
A content_decryption_module_export.h View 2 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
jrummell
PTAL.
4 years, 1 month ago (2016-10-25 23:20:23 UTC) #2
xhwang
lgtm
4 years, 1 month ago (2016-10-25 23:46:05 UTC) #3
ddorwin
Not LGTM due to path issue. Also, it would be nice if PS1 was a ...
4 years, 1 month ago (2016-10-26 03:54:45 UTC) #5
ddorwin
Comments on exceptions. See also https://bugs.chromium.org/p/chromium/issues/detail?id=570216#c11. https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h File content_decryption_module.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h#newcode98 content_decryption_module.h:98: // The following ...
4 years, 1 month ago (2016-10-26 23:58:50 UTC) #6
tinskip
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h File content_decryption_module.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h#newcode1089 content_decryption_module.h:1089: virtual void SendPlatformChallenge(const char* service_id, I believe keeping the ...
4 years, 1 month ago (2016-10-27 00:32:47 UTC) #8
ddorwin
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h File content_decryption_module.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h#newcode101 content_decryption_module.h:101: enum Error { These are exceptions intended to be ...
4 years, 1 month ago (2016-10-27 00:40:21 UTC) #9
xhwang
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h File content_decryption_module_broker.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h#newcode31 content_decryption_module_broker.h:31: const char** binary_file_paths, In chromium the chat type for ...
4 years, 1 month ago (2016-10-28 06:34:25 UTC) #10
xhwang
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h File content_decryption_module_broker.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h#newcode33 content_decryption_module_broker.h:33: HostResponseCallback response_callback, On 2016/10/28 06:34:25, xhwang wrote: > Can ...
4 years, 1 month ago (2016-10-28 06:53:58 UTC) #11
xhwang
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h File content_decryption_module.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module.h#newcode17 content_decryption_module.h:17: #include "media/cdm/api/content_decryption_module_export.h" On 2016/10/26 03:54:45, ddorwin wrote: > This ...
4 years, 1 month ago (2016-10-28 17:42:02 UTC) #12
xhwang
https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h File content_decryption_module_broker.h (right): https://codereview.chromium.org/2446413003/diff/1/content_decryption_module_broker.h#newcode21 content_decryption_module_broker.h:21: typedef void (*HostResponseCallback)(const uint8_t* response, I am prototyping this ...
4 years, 1 month ago (2016-10-28 18:18:14 UTC) #13
jrummell
Updated with most comments addressed. Not addressed: 1) Can ProcessHostChallenge() be done synchronously (i.e. no ...
4 years, 1 month ago (2016-10-31 21:04:37 UTC) #15
xhwang
https://codereview.chromium.org/2446413003/diff/40001/content_decryption_module.h File content_decryption_module.h (right): https://codereview.chromium.org/2446413003/diff/40001/content_decryption_module.h#newcode40 content_decryption_module.h:40: +ddorwin: Continuing on the comment on #include "content_decryption_module_export.h" This ...
4 years, 1 month ago (2016-10-31 22:43:47 UTC) #16
jrummell
4 years, 1 month ago (2016-11-02 20:10:03 UTC) #17
Updated with cdm_export.h back in the PS.

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
File content_decryption_module.h (right):

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
content_decryption_module.h:40: 
On 2016/10/31 22:43:47, xhwang wrote:
> +ddorwin:
> 
> Continuing on the comment on 
> #include "content_decryption_module_export.h"
> 
> This works, but if the CDM_API defined here and in the *broker.h file ever
> become different it would be confusing (even with the undef at the end). I
still
> like the *_export.h file, but I don't have a strong opinion here.
> 

export.h is back.

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
content_decryption_module.h:114: kTypeError = 50,
On 2016/10/31 22:43:47, xhwang wrote:
> OOC, where is 50 coming from? Is it just another arbitrary value? Should we
> stick with the existing 100 series?

A long time ago new specs would simply add their own errors and specify the
codes with them. The values here matched what DOMException used.

However, several years ago they stopped assigning numbers, and the official
legacy codes only go to 25 (see the link in the comments above this). blink now
uses ExceptionCode which is unrelated to the "code" returned by DOMException
(DOMException maps the code in the constructor).

So these values can be completely independent, and we can use anything we want.
For backwards compatibility I've preserved the previous values. Since we mention
the legacy codes, as long as the value is >25 it is good enough.

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
File content_decryption_module_broker.h (right):

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
content_decryption_module_broker.h:37: typedef std::string::value_type
CdmFilePathCharType;
On 2016/10/31 22:43:47, xhwang wrote:
> Can you use wchar_t and char directly? It's a bit odd to refer to
> wstring/string::value_type without using wstring/string directly.

Done.

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
content_decryption_module_broker.h:37: typedef std::string::value_type
CdmFilePathCharType;
On 2016/10/31 22:43:47, xhwang wrote:
> CdmFilePath is a bit misleading; some paths are not "cdm path". How about just
> FilePathCharType?

Done.

https://codereview.chromium.org/2446413003/diff/40001/content_decryption_modu...
content_decryption_module_broker.h:38: #endif  // defined(OS_WIN)
On 2016/10/31 22:43:47, xhwang wrote:
> s/OS_WIN/WIN32?

Done.

Powered by Google App Engine
This is Rietveld 408576698