summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/foundation/ALooperRoster.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/stagefright/foundation/ALooperRoster.h')
-rw-r--r--include/media/stagefright/foundation/ALooperRoster.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/media/stagefright/foundation/ALooperRoster.h b/include/media/stagefright/foundation/ALooperRoster.h
index c1bd4ed..2e5fd73 100644
--- a/include/media/stagefright/foundation/ALooperRoster.h
+++ b/include/media/stagefright/foundation/ALooperRoster.h
@@ -31,9 +31,14 @@ struct ALooperRoster {
void unregisterHandler(ALooper::handler_id handlerID);
- void postMessage(const sp<AMessage> &msg, int64_t delayUs = 0);
+ status_t postMessage(const sp<AMessage> &msg, int64_t delayUs = 0);
void deliverMessage(const sp<AMessage> &msg);
+ status_t postAndAwaitResponse(
+ const sp<AMessage> &msg, sp<AMessage> *response);
+
+ void postReply(uint32_t replyID, const sp<AMessage> &reply);
+
sp<ALooper> findLooper(ALooper::handler_id handlerID);
private:
@@ -45,6 +50,12 @@ private:
Mutex mLock;
KeyedVector<ALooper::handler_id, HandlerInfo> mHandlers;
ALooper::handler_id mNextHandlerID;
+ uint32_t mNextReplyID;
+ Condition mRepliesCondition;
+
+ KeyedVector<uint32_t, sp<AMessage> > mReplies;
+
+ status_t postMessage_l(const sp<AMessage> &msg, int64_t delayUs);
DISALLOW_EVIL_CONSTRUCTORS(ALooperRoster);
};