Loading media/libstagefright/MediaCodec.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -3009,8 +3009,9 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("err", &err)); CHECK(msg->findInt32("actionCode", &actionCode)); ALOGE("Codec reported err %#x, actionCode %d, while in state %d/%s", err, actionCode, mState, stateString(mState).c_str()); ALOGE("Codec reported err %#x/%s, actionCode %d, while in state %d/%s", err, StrMediaError(err).c_str(), actionCode, mState, stateString(mState).c_str()); if (err == DEAD_OBJECT) { mFlags |= kFlagSawMediaServerDie; mFlags &= ~kFlagIsComponentAllocated; Loading media/libstagefright/include/media/stagefright/MediaErrors.h +19 −2 Original line number Diff line number Diff line Loading @@ -163,11 +163,28 @@ static inline bool isCryptoError(status_t err) { || (ERROR_DRM_VENDOR_MIN <= err && err <= ERROR_DRM_VENDOR_MAX); } static inline std::string StrCryptoError(status_t err) { #define STATUS_CASE(STATUS) \ case STATUS: \ return #STATUS static inline std::string StrMediaError(status_t err) { switch(err) { STATUS_CASE(ERROR_ALREADY_CONNECTED); STATUS_CASE(ERROR_NOT_CONNECTED); STATUS_CASE(ERROR_UNKNOWN_HOST); STATUS_CASE(ERROR_CANNOT_CONNECT); STATUS_CASE(ERROR_IO); STATUS_CASE(ERROR_CONNECTION_LOST); STATUS_CASE(ERROR_MALFORMED); STATUS_CASE(ERROR_OUT_OF_RANGE); STATUS_CASE(ERROR_BUFFER_TOO_SMALL); STATUS_CASE(ERROR_UNSUPPORTED); STATUS_CASE(ERROR_END_OF_STREAM); } return statusToString(err); } static inline std::string StrCryptoError(status_t err) { switch (err) { STATUS_CASE(ERROR_DRM_UNKNOWN); STATUS_CASE(ERROR_DRM_NO_LICENSE); Loading Loading @@ -209,10 +226,10 @@ static inline std::string StrCryptoError(status_t err) { STATUS_CASE(ERROR_DRM_STORAGE_READ); STATUS_CASE(ERROR_DRM_STORAGE_WRITE); STATUS_CASE(ERROR_DRM_ZERO_SUBSAMPLES); #undef STATUS_CASE } return statusToString(err); } #undef STATUS_CASE } // namespace android Loading media/ndk/NdkMediaCodec.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -256,8 +256,8 @@ void CodecHandler::onMessageReceived(const sp<AMessage> &msg) { break; } msg->findString("detail", &detail); ALOGE("Codec reported error(0x%x), actionCode(%d), detail(%s)", err, actionCode, detail.c_str()); ALOGE("Codec reported error(0x%x/%s), actionCode(%d), detail(%s)", err, StrMediaError(err).c_str(), actionCode, detail.c_str()); Mutex::Autolock _l(mCodec->mAsyncCallbackLock); if (mCodec->mAsyncCallback.onAsyncError != NULL) { Loading Loading
media/libstagefright/MediaCodec.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -3009,8 +3009,9 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("err", &err)); CHECK(msg->findInt32("actionCode", &actionCode)); ALOGE("Codec reported err %#x, actionCode %d, while in state %d/%s", err, actionCode, mState, stateString(mState).c_str()); ALOGE("Codec reported err %#x/%s, actionCode %d, while in state %d/%s", err, StrMediaError(err).c_str(), actionCode, mState, stateString(mState).c_str()); if (err == DEAD_OBJECT) { mFlags |= kFlagSawMediaServerDie; mFlags &= ~kFlagIsComponentAllocated; Loading
media/libstagefright/include/media/stagefright/MediaErrors.h +19 −2 Original line number Diff line number Diff line Loading @@ -163,11 +163,28 @@ static inline bool isCryptoError(status_t err) { || (ERROR_DRM_VENDOR_MIN <= err && err <= ERROR_DRM_VENDOR_MAX); } static inline std::string StrCryptoError(status_t err) { #define STATUS_CASE(STATUS) \ case STATUS: \ return #STATUS static inline std::string StrMediaError(status_t err) { switch(err) { STATUS_CASE(ERROR_ALREADY_CONNECTED); STATUS_CASE(ERROR_NOT_CONNECTED); STATUS_CASE(ERROR_UNKNOWN_HOST); STATUS_CASE(ERROR_CANNOT_CONNECT); STATUS_CASE(ERROR_IO); STATUS_CASE(ERROR_CONNECTION_LOST); STATUS_CASE(ERROR_MALFORMED); STATUS_CASE(ERROR_OUT_OF_RANGE); STATUS_CASE(ERROR_BUFFER_TOO_SMALL); STATUS_CASE(ERROR_UNSUPPORTED); STATUS_CASE(ERROR_END_OF_STREAM); } return statusToString(err); } static inline std::string StrCryptoError(status_t err) { switch (err) { STATUS_CASE(ERROR_DRM_UNKNOWN); STATUS_CASE(ERROR_DRM_NO_LICENSE); Loading Loading @@ -209,10 +226,10 @@ static inline std::string StrCryptoError(status_t err) { STATUS_CASE(ERROR_DRM_STORAGE_READ); STATUS_CASE(ERROR_DRM_STORAGE_WRITE); STATUS_CASE(ERROR_DRM_ZERO_SUBSAMPLES); #undef STATUS_CASE } return statusToString(err); } #undef STATUS_CASE } // namespace android Loading
media/ndk/NdkMediaCodec.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -256,8 +256,8 @@ void CodecHandler::onMessageReceived(const sp<AMessage> &msg) { break; } msg->findString("detail", &detail); ALOGE("Codec reported error(0x%x), actionCode(%d), detail(%s)", err, actionCode, detail.c_str()); ALOGE("Codec reported error(0x%x/%s), actionCode(%d), detail(%s)", err, StrMediaError(err).c_str(), actionCode, detail.c_str()); Mutex::Autolock _l(mCodec->mAsyncCallbackLock); if (mCodec->mAsyncCallback.onAsyncError != NULL) { Loading