diff options
author | Ronghua Wu <ronghuawu@google.com> | 2015-07-22 16:18:52 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-22 16:18:52 +0000 |
commit | f87d8341df3445fb4931a39deec2ec1d00c30918 (patch) | |
tree | 10eea23f49af99f42753b6a78ca522c123b9d55a /include | |
parent | 8f0547a954b39d5750488be7e060ebe1ebfdf666 (diff) | |
parent | 68845c14ebf2c7282800b1abffde38d8e9a57aab (diff) | |
download | frameworks_av-f87d8341df3445fb4931a39deec2ec1d00c30918.zip frameworks_av-f87d8341df3445fb4931a39deec2ec1d00c30918.tar.gz frameworks_av-f87d8341df3445fb4931a39deec2ec1d00c30918.tar.bz2 |
Merge "libmediaplayerservice: propagate caller pid to MediaCodec." into mnc-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/MediaCodec.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h index b621b9c..c10963d 100644 --- a/include/media/stagefright/MediaCodec.h +++ b/include/media/stagefright/MediaCodec.h @@ -61,11 +61,15 @@ struct MediaCodec : public AHandler { CB_RESOURCE_RECLAIMED = 5, }; + static const pid_t kNoPid = -1; + static sp<MediaCodec> CreateByType( - const sp<ALooper> &looper, const char *mime, bool encoder, status_t *err = NULL); + const sp<ALooper> &looper, const char *mime, bool encoder, status_t *err = NULL, + pid_t pid = kNoPid); static sp<MediaCodec> CreateByComponentName( - const sp<ALooper> &looper, const char *name, status_t *err = NULL); + const sp<ALooper> &looper, const char *name, status_t *err = NULL, + pid_t pid = kNoPid); static sp<PersistentSurface> CreatePersistentInputSurface(); @@ -251,7 +255,7 @@ private: }; struct ResourceManagerServiceProxy : public IBinder::DeathRecipient { - ResourceManagerServiceProxy(); + ResourceManagerServiceProxy(pid_t pid); ~ResourceManagerServiceProxy(); void init(); @@ -271,7 +275,7 @@ private: private: Mutex mLock; sp<IResourceManagerService> mService; - int mPid; + pid_t mPid; }; State mState; @@ -333,7 +337,7 @@ private: bool mHaveInputSurface; bool mHavePendingInputBuffers; - MediaCodec(const sp<ALooper> &looper); + MediaCodec(const sp<ALooper> &looper, pid_t pid); static status_t PostAndAwaitResponse( const sp<AMessage> &msg, sp<AMessage> *response); |