diff options
author | Jeff Tinker <jtinker@google.com> | 2013-04-02 13:08:05 -0700 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2013-04-03 12:20:53 -0700 |
commit | 0cb126a34fe32f81c830858102471e7be2ce85b1 (patch) | |
tree | a20999e4b89a78375a1b69cb3a0bef96fab74362 /media/libmediaplayerservice/Drm.h | |
parent | 8856c8b8777d0e0de11b2de863a336b001024e29 (diff) | |
download | frameworks_av-0cb126a34fe32f81c830858102471e7be2ce85b1.zip frameworks_av-0cb126a34fe32f81c830858102471e7be2ce85b1.tar.gz frameworks_av-0cb126a34fe32f81c830858102471e7be2ce85b1.tar.bz2 |
Implement async event callout from drm plugin to Java app
Change-Id: I007f147d693664e777b8758be2bb8a4c7ec0236b
Diffstat (limited to 'media/libmediaplayerservice/Drm.h')
-rw-r--r-- | media/libmediaplayerservice/Drm.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/Drm.h b/media/libmediaplayerservice/Drm.h index f24921e..3da8ad4 100644 --- a/media/libmediaplayerservice/Drm.h +++ b/media/libmediaplayerservice/Drm.h @@ -21,6 +21,7 @@ #include "SharedLibrary.h" #include <media/IDrm.h> +#include <media/IDrmClient.h> #include <utils/threads.h> namespace android { @@ -28,7 +29,7 @@ namespace android { struct DrmFactory; struct DrmPlugin; -struct Drm : public BnDrm { +struct Drm : public BnDrm, public DrmPluginListener { Drm(); virtual ~Drm(); @@ -108,10 +109,21 @@ struct Drm : public BnDrm { Vector<uint8_t> const &signature, bool &match); + virtual status_t setListener(const sp<IDrmClient>& listener); + + virtual void sendEvent(DrmPlugin::EventType eventType, int extra, + Vector<uint8_t> const *sessionId, + Vector<uint8_t> const *data); + private: mutable Mutex mLock; status_t mInitCheck; + + sp<IDrmClient> mListener; + mutable Mutex mEventLock; + mutable Mutex mNotifyLock; + sp<SharedLibrary> mLibrary; DrmFactory *mFactory; DrmPlugin *mPlugin; |