diff options
author | Jeff Tinker <jtinker@google.com> | 2015-04-10 04:10:59 -0700 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2015-04-10 04:10:59 -0700 |
commit | 1849570240443d1f75775c205fa658f7070849c6 (patch) | |
tree | 86ad28892b0e8b49c8666ad39e340234c610e709 /include | |
parent | 2fb25c873e1a7f346bd8c7c072a85ca6a74b0e95 (diff) | |
download | frameworks_av-1849570240443d1f75775c205fa658f7070849c6.zip frameworks_av-1849570240443d1f75775c205fa658f7070849c6.tar.gz frameworks_av-1849570240443d1f75775c205fa658f7070849c6.tar.bz2 |
Add a method to associate MediaDrm session with MediaCrypto
Previously, to associate a MediaDrm session with MediaCrypto,
the MediaDrm sessionId was passed as initData to the MediaCrypto
constructor. This is not ideal for two reasons: it's pretty
obscure and you can't change the association without tearing
down the MediaCodec/MediaCrypto and starting all over. Use
cases like key rotation require being able to update the
MediaDrm session post-construction. This CL addresses both of
these issues.
bug: 19570317
Change-Id: Ieb32d04d61742fc1dee2105dd904690d44c46c7b
Diffstat (limited to 'include')
-rw-r--r-- | include/media/ICrypto.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/ICrypto.h b/include/media/ICrypto.h index ac2b3ba..aa04dbe 100644 --- a/include/media/ICrypto.h +++ b/include/media/ICrypto.h @@ -44,6 +44,8 @@ struct ICrypto : public IInterface { virtual void notifyResolution(uint32_t width, uint32_t height) = 0; + virtual status_t setMediaDrmSession(const Vector<uint8_t> &sessionId) = 0; + virtual ssize_t decrypt( bool secure, const uint8_t key[16], @@ -62,6 +64,9 @@ struct BnCrypto : public BnInterface<ICrypto> { virtual status_t onTransact( uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags = 0); +private: + void readVector(const Parcel &data, Vector<uint8_t> &vector) const; + void writeVector(Parcel *reply, Vector<uint8_t> const &vector) const; }; } // namespace android |