summaryrefslogtreecommitdiffstats
path: root/media/ndk/NdkMediaCodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/ndk/NdkMediaCodec.cpp')
-rw-r--r--media/ndk/NdkMediaCodec.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/media/ndk/NdkMediaCodec.cpp b/media/ndk/NdkMediaCodec.cpp
index ed00b72..80c1c2f 100644
--- a/media/ndk/NdkMediaCodec.cpp
+++ b/media/ndk/NdkMediaCodec.cpp
@@ -116,7 +116,7 @@ void CodecHandler::onMessageReceived(const sp<AMessage> &msg) {
case kWhatStopActivityNotifications:
{
- uint32_t replyID;
+ sp<AReplyToken> replyID;
msg->senderAwaitsResponse(&replyID);
mCodec->mGeneration++;
@@ -136,7 +136,7 @@ void CodecHandler::onMessageReceived(const sp<AMessage> &msg) {
static void requestActivityNotification(AMediaCodec *codec) {
- (new AMessage(kWhatRequestActivityNotifications, codec->mHandler->id()))->post();
+ (new AMessage(kWhatRequestActivityNotifications, codec->mHandler))->post();
}
extern "C" {
@@ -219,7 +219,7 @@ media_status_t AMediaCodec_start(AMediaCodec *mData) {
if (ret != OK) {
return translate_error(ret);
}
- mData->mActivityNotification = new AMessage(kWhatActivityNotify, mData->mHandler->id());
+ mData->mActivityNotification = new AMessage(kWhatActivityNotify, mData->mHandler);
mData->mActivityNotification->setInt32("generation", mData->mGeneration);
requestActivityNotification(mData);
return AMEDIA_OK;
@@ -229,7 +229,7 @@ EXPORT
media_status_t AMediaCodec_stop(AMediaCodec *mData) {
media_status_t ret = translate_error(mData->mCodec->stop());
- sp<AMessage> msg = new AMessage(kWhatStopActivityNotifications, mData->mHandler->id());
+ sp<AMessage> msg = new AMessage(kWhatStopActivityNotifications, mData->mHandler);
sp<AMessage> response;
msg->postAndAwaitResponse(&response);
mData->mActivityNotification.clear();
@@ -352,7 +352,8 @@ media_status_t AMediaCodec_releaseOutputBufferAtTime(
}
//EXPORT
-media_status_t AMediaCodec_setNotificationCallback(AMediaCodec *mData, OnCodecEvent callback, void *userdata) {
+media_status_t AMediaCodec_setNotificationCallback(AMediaCodec *mData, OnCodecEvent callback,
+ void *userdata) {
mData->mCallback = callback;
mData->mCallbackUserData = userdata;
return AMEDIA_OK;