diff options
author | Chong Zhang <chz@google.com> | 2014-07-12 02:47:22 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-11 16:34:41 +0000 |
commit | e71dcef63a746970d5c11c83207201fe8de02a78 (patch) | |
tree | 4267ac2a10922609f01fe613a06fed23ba6df009 /media | |
parent | 388742df51084f02a362818a884f3bde71b7ef8d (diff) | |
parent | 749dafad09d85f2aaf6902a7ff16b4087e3bc4c7 (diff) | |
download | frameworks_av-e71dcef63a746970d5c11c83207201fe8de02a78.zip frameworks_av-e71dcef63a746970d5c11c83207201fe8de02a78.tar.gz frameworks_av-e71dcef63a746970d5c11c83207201fe8de02a78.tar.bz2 |
Merge "MediaCodec: change onError cb to return CodecException"
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index f286659..24fd7ad 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -664,7 +664,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { cancelPendingDequeueOperations(); if (mFlags & kFlagIsAsync) { - onError(0, omxError); + onError(omxError, 0); } setState(UNINITIALIZED); break; @@ -678,7 +678,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { postActivityNotificationIfPossible(); if (mFlags & kFlagIsAsync) { - onError(0, omxError); + onError(omxError, 0); } setState(UNINITIALIZED); break; @@ -1916,12 +1916,16 @@ void MediaCodec::onOutputBufferAvailable() { } } -void MediaCodec::onError(int32_t actionCode, status_t err) { +void MediaCodec::onError(status_t err, int32_t actionCode, const char *detail) { if (mCallback != NULL) { sp<AMessage> msg = mCallback->dup(); msg->setInt32("callbackID", CB_ERROR); - msg->setInt32("actionCode", actionCode); msg->setInt32("err", err); + msg->setInt32("actionCode", actionCode); + + if (detail != NULL) { + msg->setString("detail", detail); + } msg->post(); } |