diff options
author | Lajos Molnar <lajos@google.com> | 2015-03-05 14:35:41 -0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-03-10 10:36:09 -0700 |
commit | 3f27436a9346f043f52265da1e6a74cde2bffd4d (patch) | |
tree | a7404d2ba96071bea1f02f93f6782214fc1e4cc1 /media/libstagefright/MediaCodecSource.cpp | |
parent | 0655386a0dc15fc31883d2e38917ff0e9db89ae7 (diff) | |
download | frameworks_av-3f27436a9346f043f52265da1e6a74cde2bffd4d.zip frameworks_av-3f27436a9346f043f52265da1e6a74cde2bffd4d.tar.gz frameworks_av-3f27436a9346f043f52265da1e6a74cde2bffd4d.tar.bz2 |
stagefright: don't use ALooperRoster mutex for reply handling
Change replyID-s from uint32_t to an object
Move reply handling into the loopers (to reuse a common mutex)
Bug: 19607784
Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
Diffstat (limited to 'media/libstagefright/MediaCodecSource.cpp')
-rw-r--r-- | media/libstagefright/MediaCodecSource.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp index 1ef4170..b6fa810 100644 --- a/media/libstagefright/MediaCodecSource.cpp +++ b/media/libstagefright/MediaCodecSource.cpp @@ -182,7 +182,7 @@ void MediaCodecSource::Puller::onMessageReceived(const sp<AMessage> &msg) { sp<AMessage> response = new AMessage; response->setInt32("err", err); - uint32_t replyID; + sp<AReplyToken> replyID; CHECK(msg->senderAwaitsResponse(&replyID)); response->postReply(replyID); break; @@ -491,7 +491,7 @@ void MediaCodecSource::signalEOS(status_t err) { if (mStopping && mEncoderReachedEOS) { ALOGI("encoder (%s) stopped", mIsVideo ? "video" : "audio"); // posting reply to everyone that's waiting - List<uint32_t>::iterator it; + List<sp<AReplyToken>>::iterator it; for (it = mStopReplyIDQueue.begin(); it != mStopReplyIDQueue.end(); it++) { (new AMessage)->postReply(*it); @@ -766,7 +766,7 @@ void MediaCodecSource::onMessageReceived(const sp<AMessage> &msg) { } case kWhatStart: { - uint32_t replyID; + sp<AReplyToken> replyID; CHECK(msg->senderAwaitsResponse(&replyID)); sp<RefBase> obj; @@ -782,7 +782,7 @@ void MediaCodecSource::onMessageReceived(const sp<AMessage> &msg) { { ALOGI("encoder (%s) stopping", mIsVideo ? "video" : "audio"); - uint32_t replyID; + sp<AReplyToken> replyID; CHECK(msg->senderAwaitsResponse(&replyID)); if (mEncoderReachedEOS) { |