From ccd08439c7914d86264c7ad81bfd03cf39aaa9f7 Mon Sep 17 00:00:00 2001 From: James Dong Date: Wed, 17 Oct 2012 14:53:16 -0700 Subject: Added some extra failure logging messages o related-to-bug: 7282066 Change-Id: I0896551a45aab61fb571fef19061397ff84321d9 --- media/libstagefright/AwesomePlayer.cpp | 1 + media/libstagefright/OMXCodec.cpp | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'media') diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 0cb378d..685e676 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1504,6 +1504,7 @@ status_t AwesomePlayer::initVideoDecoder(uint32_t flags) { status_t err = mVideoSource->start(); if (err != OK) { + ALOGE("failed to start video source"); mVideoSource.clear(); return err; } diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 07f92c7..70de174 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1689,6 +1689,8 @@ status_t OMXCodec::applyRotation() { if (transform) { err = native_window_set_buffers_transform( mNativeWindow.get(), transform); + ALOGE("native_window_set_buffers_transform failed: %s (%d)", + strerror(-err), -err); } return err; @@ -1703,6 +1705,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() { status_t err = mOMX->getParameter( mNode, OMX_IndexParamPortDefinition, &def, sizeof(def)); if (err != OK) { + CODEC_LOGE("getParameter failed: %d", err); return err; } @@ -3606,6 +3609,7 @@ status_t OMXCodec::start(MetaData *meta) { Mutex::Autolock autoLock(mLock); if (mState != LOADED) { + CODEC_LOGE("called start in the unexpected state: %d", mState); return UNKNOWN_ERROR; } @@ -3639,12 +3643,14 @@ status_t OMXCodec::start(MetaData *meta) { // if supported, the source to use exactly the same number of input // buffers as requested by the encoder. if ((err = init()) != OK) { + CODEC_LOGE("init failed: %d", err); return err; } params->setInt32(kKeyNumBuffers, mPortBuffers[kPortIndexInput].size()); err = mSource->start(params.get()); if (err != OK) { + CODEC_LOGE("source failed to start: %d", err); stopOmxComponent_l(); } return err; @@ -3652,6 +3658,7 @@ status_t OMXCodec::start(MetaData *meta) { // Decoder case if ((err = mSource->start(params.get())) != OK) { + CODEC_LOGE("source failed to start: %d", err); return err; } return init(); -- cgit v1.1