summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-07-21 09:50:48 -0700
committerRonghua Wu <ronghuawu@google.com>2015-07-21 19:04:41 -0700
commit68845c14ebf2c7282800b1abffde38d8e9a57aab (patch)
treec4e924999d0ed48ae4c1a08d44777cbc5b161906 /include
parentf8f669d7a727e4ad5505cd85741f4d50dbaffbf9 (diff)
downloadframeworks_av-68845c14ebf2c7282800b1abffde38d8e9a57aab.zip
frameworks_av-68845c14ebf2c7282800b1abffde38d8e9a57aab.tar.gz
frameworks_av-68845c14ebf2c7282800b1abffde38d8e9a57aab.tar.bz2
libmediaplayerservice: propagate caller pid to MediaCodec.
Bug: 22630317 Change-Id: I0337d74f4ef04bf96f2de83f33d98d0d7da47c12
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaCodec.h14
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);