chromium/cdm.git
3 weeks agoImprove comment on OnQueryOutputProtectionStatus(). master
xhwang@chromium.org [Tue, 1 Jul 2014 18:52:04 +0000 (18:52 +0000)]
Improve comment on OnQueryOutputProtectionStatus().

BUG=390338

Review URL: https://codereview.chromium.org/364673002

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@280856 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

4 weeks agoAdd PROJECT to chromium_deps
sheyang@google.com [Thu, 26 Jun 2014 15:51:55 +0000 (15:51 +0000)]
Add PROJECT to chromium_deps

BUG=374398
R=phajdan.jr@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/332413005

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@280014 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 months agoModify the list of CDM errors.
jrummell@chromium.org [Wed, 28 May 2014 21:14:58 +0000 (21:14 +0000)]
Modify the list of CDM errors.

Removing errors that are unlikely to be used by CDMs.

BUG=358271

Review URL: https://codereview.chromium.org/282323006

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@273356 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 months agoUpdate CDM.h to match the latest EME spec
jrummell@chromium.org [Mon, 12 May 2014 23:16:52 +0000 (23:16 +0000)]
Update CDM.h to match the latest EME spec

Change the CDM_5 definition to:
- include setServerCertificate()
- add OnSessionKeysChange() event
- pass an exception enum instead of a string when reporting an error.

BUG=358271,370251

Review URL: https://codereview.chromium.org/272223003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@269906 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 months agoAdd CDM_5.
jrummell@chromium.org [Thu, 1 May 2014 21:10:58 +0000 (21:10 +0000)]
Add CDM_5.

To provide support for promises, define the next version of the CDM
interface that passes |promise_id| on calls to CreateSession(),
LoadSession(), UpdateSession(), and ReleaseSession(). |promise_id|
should be used when responding using Host::OnResolvePromise(),
Host::OnResolveNewSessionPromise() or Host::OnRejectPromise().

BUG=358271

Review URL: https://codereview.chromium.org/268683006

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@267635 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 months agoAdd support for VP9.
xhwang@chromium.org [Wed, 9 Apr 2014 00:37:47 +0000 (00:37 +0000)]
Add support for VP9.

Since we only adds additional enum values at the end of the enum lists, this
change doesn't affect CDMs that support the existing CDM_4 interface.

BUG=361318

Review URL: https://codereview.chromium.org/228753007

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@262570 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 months agoRemove CDM_1 and CDM_2 interface.
xhwang@chromium.org [Mon, 31 Mar 2014 20:44:46 +0000 (20:44 +0000)]
Remove CDM_1 and CDM_2 interface.

These two interfaces have been deprecated and are no longer in use.

BUG=357709
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/218493008

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@260640 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 months agoMake the default audio format kUnknownAudioFormat.
xhwang@chromium.org [Sat, 8 Feb 2014 05:06:23 +0000 (05:06 +0000)]
Make the default audio format kUnknownAudioFormat.

BUG=169105

Review URL: https://codereview.chromium.org/137213007

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@249939 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 months agoAdd LoadSession() to CDM_4.
xhwang@chromium.org [Wed, 5 Feb 2014 22:19:28 +0000 (22:19 +0000)]
Add LoadSession() to CDM_4.

- CDM_3 is replaced with CDM_4.
- Also note that OnSessionReady() will be deprecated.

BUG=338831
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/130803006

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@249141 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoAdd File IO to ContentDecryptionModule interface.
xhwang@chromium.org [Mon, 16 Dec 2013 23:59:52 +0000 (23:59 +0000)]
Add File IO to ContentDecryptionModule interface.

BUG=324134
TEST=none
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/65363003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@241073 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoAdd cdm-api-reviews@ and feature-media-reviews@ to code review CC list.
ddorwin@chromium.org [Wed, 27 Nov 2013 22:49:58 +0000 (22:49 +0000)]
Add cdm-api-reviews@ and feature-media-reviews@ to code review CC list.

R=xhwang@chromium.org

Review URL: https://codereview.chromium.org/92933003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@237635 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 months agoRemove unused error codes in preparation for supporting new errors.
ddorwin@chromium.org [Wed, 27 Nov 2013 19:54:14 +0000 (19:54 +0000)]
Remove unused error codes in preparation for supporting new errors.

BUG=224786
R=xhwang@chromium.org

Review URL: https://codereview.chromium.org/92423002

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@237618 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months agoUpdate MediaKeySession methods and callbacks names in CDM_3.
xhwang@chromium.org [Wed, 27 Nov 2013 01:56:35 +0000 (01:56 +0000)]
Update MediaKeySession methods and callbacks names in CDM_3.

Detail of renames:

GenerateKeyRequest -> CreateSession
Update -> UpdateSession
Release -> ReleaseSession

SetSessionId -> OnSessionCreated
SendMessage -> OnSessionMessage
SendReady -> OnSessionReady
SendClosed -> OnSessionClosed
SendError -> OnSessionError

BUG=224786
TEST=none
R=ddorwin@chromium.org, jrummell@chromium.org

Review URL: https://codereview.chromium.org/89343002

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@237480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months agoChange CDM_3 Close() to Release()
xhwang@chromium.org [Fri, 22 Nov 2013 17:59:00 +0000 (17:59 +0000)]
Change CDM_3 Close() to Release()

As the EME WD spec has changed the name, update the header to match.
Also make CDM_3 the default, so it can be rolled in with the changes
to support it.

BUG=224786
R=ddorwin@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/79983003

Patch from John Rummell <jrummell@chromium.org>.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@236788 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months agoAdd CDM_3 and Host_3 interfaces.
ddorwin@chromium.org [Wed, 6 Nov 2013 21:03:29 +0000 (21:03 +0000)]
Add CDM_3 and Host_3 interfaces.

These new interfaces are based on the latest EME Working Draft and support
reference_id routing.

Changes:
1) rename AddKey() to Update()
2) rename CancelKeyRequest() to Close().
3) add additional events Ready() and Closed()
4) rename event KeyMessage to Message
5) messages dealing with keys now specify a |reference_id| so that
   responses can be matched with the correct session
6) add SetSessionId().

BUG=224786,308704
R=ddorwin@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/54543010

Patch from John Rummell <jrummell@chromium.org>.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@233357 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months agoDefine CDM_MODULE_VERSION and use it to build the entry point.
ddorwin@chromium.org [Mon, 4 Nov 2013 23:04:09 +0000 (23:04 +0000)]
Define CDM_MODULE_VERSION and use it to build the entry point.

TEST=Existing CDMs still load when Chrome is built with this change.
R=dalecurtis@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/56423004

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@232829 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 months agoDrop kCdmInterfaceVersion_* and kHostInterfaceVersion_*.
xhwang@chromium.org [Wed, 30 Oct 2013 00:30:21 +0000 (00:30 +0000)]
Drop kCdmInterfaceVersion_* and kHostInterfaceVersion_*.

These are now replaced by CDM::kVersion and CDM::Host::kVersion.

BUG=none
TEST=none
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/51623003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@231683 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoSwitch CDM.h to use uint32_t for size types per style guide.
dalecurtis@google.com [Tue, 22 Oct 2013 19:35:07 +0000 (19:35 +0000)]
Switch CDM.h to use uint32_t for size types per style guide.

Style guide now clearly says to use unsigned types for sizes
and counts:
http://dev.chromium.org/developers/coding-style#TOC-Types

Since CDM.h communicates over PPAPI, we use a fixed uint32_t
instead of size_t.

BUG=none
TEST=compiles
R=ddorwin@chromium.org, xhwang@chromium.org

Review URL: https://codereview.chromium.org/26592004

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@230180 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoMake OnDeferredInitializationDone pure virtual.
dalecurtis@google.com [Tue, 22 Oct 2013 19:15:21 +0000 (19:15 +0000)]
Make OnDeferredInitializationDone pure virtual.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@230175 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoAdd API for deferred decoder initialization.
dalecurtis@google.com [Mon, 21 Oct 2013 22:49:12 +0000 (22:49 +0000)]
Add API for deferred decoder initialization.

BUG=309159
TEST=none
R=ddorwin@chromium.org, rkuroiwa@chromium.org, tinskip@google.com

Review URL: https://codereview.chromium.org/29843003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@229946 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoAdd GetPrivateData function to Host_2.
dalecurtis@google.com [Mon, 21 Oct 2013 18:36:34 +0000 (18:36 +0000)]
Add GetPrivateData function to Host_2.

BUG=309163
TEST=compiles
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/30223004

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@229868 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoIntroduce ContentDecryptionModule*::Host.
xhwang@chromium.org [Mon, 21 Oct 2013 18:10:18 +0000 (18:10 +0000)]
Introduce ContentDecryptionModule*::Host.

Currently we have kHostInterfaceVersion_* to track CDM Host versions. This
provides the CDM an option to use a host interface version that is different
than the CDM interface version. However, in most cases, a CDM that implements
CDM_N interface would just like to use Host_N as well. Also, CdmWrapper will
almost always support Host_N when it starts to support CDM_N. Having separate
host interface versions seem redundant in most cases and sometimes confusing.

With this CL, we suggest CDM implementations to always use CDM::Host by
creating Hosts with CDM::Host::kVersion.

That being said, CDM can still ask for a Host with different host version.
For example, a CDM that implements CDM_2 can still ask for a Host with
CDM_1::Host::kVersion and use it as CDM_1:Host. So we are not losing any
flexibility.

BUG=none
TEST=none
R=dalecurtis@chromium.org, ddorwin@chromium.org

Review URL: https://codereview.chromium.org/27031008

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@229863 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoRemove CanChallengePlatform().
dalecurtis@google.com [Fri, 18 Oct 2013 21:39:05 +0000 (21:39 +0000)]
Remove CanChallengePlatform().

BUG=309158
TEST=compiles
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/29933002

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@229474 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoChange kCdmInterfaceVersion to ContentDecryptionModule::kVersion
xhwang@chromium.org [Tue, 15 Oct 2013 17:34:05 +0000 (17:34 +0000)]
Change kCdmInterfaceVersion to ContentDecryptionModule::kVersion

This eliminates an extra global variable and makes supporting multiple CDM
versions (via templates) easier.

After all CDM implementations switched to use CDM::kVersion, we can eliminate all
kCdmInterfaceVersion*.

BUG=306647
TEST=none
R=dalecurtis@chromium.org, ddorwin@chromium.org

Review URL: https://codereview.chromium.org/27036010

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@228715 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoAdd kLinkTypeNetwork to the CDM interface.
dalecurtis@google.com [Mon, 14 Oct 2013 21:10:45 +0000 (21:10 +0000)]
Add kLinkTypeNetwork to the CDM interface.

BUG=272269
TEST=none
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/27237002

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@228525 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoAdds codereview.settings and OWNERS file.
dalecurtis@google.com [Mon, 14 Oct 2013 21:09:43 +0000 (21:09 +0000)]
Adds codereview.settings and OWNERS file.

BUG=none
TEST=none
R=ddorwin@chromium.org

Review URL: https://codereview.chromium.org/27239003

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@228524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoUpdate CDM.h to make v2 the default host.
dalecurtis@google.com [Fri, 4 Oct 2013 19:57:29 +0000 (19:57 +0000)]
Update CDM.h to make v2 the default host.

BUG=270296
TEST=compiles, manual test with wv.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@227062 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 months agoAdd CDM.h support for audio sample formats.
dalecurtis@google.com [Fri, 4 Oct 2013 19:35:03 +0000 (19:35 +0000)]
Add CDM.h support for audio sample formats.

Allows extra interleave and deinterleave steps to be skipped if
possible.

BUG=169105
TEST=compiles.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@227053 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 months agoAdd CDM.h API for output protection.
dalecurtis@google.com [Thu, 12 Sep 2013 18:18:20 +0000 (18:18 +0000)]
Add CDM.h API for output protection.

BUG=259139
TEST=compiles

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@222813 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 months agoUpdate CDM.h with remote attestation support.
dalecurtis@google.com [Tue, 3 Sep 2013 20:53:39 +0000 (20:53 +0000)]
Update CDM.h with remote attestation support.

Adds CanChallengePlatform() and SendPlatformChallenge().

BUG=270296
TEST=compiles
R=ddorwin@chromium.org, dkrahn@google.com, rkuroiwa@google.com, tinskip@google.com, xhwang@chromium.org

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@221019 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

17 months agoUpdate CDM interface to support backward compatibility.
xhwang@google.com [Mon, 11 Feb 2013 21:30:41 +0000 (21:30 +0000)]
Update CDM interface to support backward compatibility.

- Add versioning to cdm::ContentDecryptionModule and cdm::Host.
- CDM needs to call GetCdmHostFunc to get cdm::Host.
- Merge cdm::Allocator into cdm::Host.
- Add Destroy() to cdm::ContentDecryptionModule.

Review URL: https://codereview.chromium.org/12224069

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@181763 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

17 months agoUpdate CDM interface to version 4, adding versioning to CDM Host.
xhwang@google.com [Fri, 8 Feb 2013 02:13:00 +0000 (02:13 +0000)]
Update CDM interface to version 4, adding versioning to CDM Host.

- Add versioning to CDM Host interface.
- Add GetPrivateData() method to CDM Host_1 interface.
- Add CDM HostFactory interface to support multiple CDM versions.
- Update some comments.
Review URL: https://codereview.chromium.org/12207066

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@181408 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 months agoClarify that null termination characters are not included in length parameters.
ddorwin@chromium.org [Fri, 14 Dec 2012 02:26:57 +0000 (02:26 +0000)]
Clarify that null termination characters are not included in length parameters.
Review URL: https://codereview.chromium.org/11573028

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@173055 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 months agoClean up content_decryption_module.h for its new location and add a README.
ddorwin@chromium.org [Thu, 13 Dec 2012 23:30:57 +0000 (23:30 +0000)]
Clean up content_decryption_module.h for its new location and add a README.

Two changes to content_decryption_module.h:
 * Merged in the contents of src/webkit/media/crypto/ppapi/cdm_export.h so content_decryption_module.h can be standalone and there are no include path dependencies. I will delete cdm_export.h along with content_decryption_module.h from Chromium.
 * Update the header guards to match the new SVN location since they can't match all target locations.

Review URL: https://chromiumcodereview.appspot.com/11572022

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@172996 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 months agoCopy content_decryption_module.h out of the main src/ tree so it can be modified...
ddorwin@chromium.org [Thu, 13 Dec 2012 18:46:53 +0000 (18:46 +0000)]
Copy content_decryption_module.h out of the main src/ tree so it can be modified independently of Chromium. This allows third-party CDMs to be built before rolling potentially breaking changes into Chrome. It will be removed from its current location in a separate CL.

git-svn-id: http://src.chromium.org/svn/trunk/deps/cdm@172908 4ff67af0-8c30-449e-8e8b-ad334ec8d88c