diff options
author | Andreas Huber <andih@google.com> | 2010-10-07 13:48:34 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-10-07 13:48:34 -0700 |
commit | 08478d17a364ec027f6d6ddbac267c2ac073c4e0 (patch) | |
tree | df4bb33ec4ebe86b766b2286a6b2a11054b0037a /media/libstagefright | |
parent | d5df1e5cfcc9e446626692cec72f53e3024fa455 (diff) | |
download | frameworks_base-08478d17a364ec027f6d6ddbac267c2ac073c4e0.zip frameworks_base-08478d17a364ec027f6d6ddbac267c2ac073c4e0.tar.gz frameworks_base-08478d17a364ec027f6d6ddbac267c2ac073c4e0.tar.bz2 |
Some instrumentation of OMXCodec for future investigation and a possibly temporary fix for the green tinge on video playback.
Change-Id: Iee9cd7b0c326bac96382007b4ea077d4368d7d01
related-to-bug: 3051572
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 23 | ||||
-rw-r--r-- | media/libstagefright/colorconversion/SoftwareRenderer.cpp | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 4d69dd3..a5341e3 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -1838,8 +1838,31 @@ void OMXCodec::onEvent(OMX_EVENTTYPE event, OMX_U32 data1, OMX_U32 data2) { case OMX_EventPortSettingsChanged: { + CODEC_LOGV("OMX_EventPortSettingsChanged(port=%ld, data2=0x%08lx)", + data1, data2); + if (data2 == 0 || data2 == OMX_IndexParamPortDefinition) { onPortSettingsChanged(data1); + } else if (data1 == kPortIndexOutput + && data2 == OMX_IndexConfigCommonOutputCrop) { + + OMX_CONFIG_RECTTYPE rect; + rect.nPortIndex = kPortIndexOutput; + InitOMXParams(&rect); + + status_t err = + mOMX->getConfig( + mNode, OMX_IndexConfigCommonOutputCrop, + &rect, sizeof(rect)); + + if (err == OK) { + CODEC_LOGV( + "output crop (%ld, %ld, %ld, %ld)", + rect.nLeft, rect.nTop, rect.nWidth, rect.nHeight); + } else { + CODEC_LOGE("getConfig(OMX_IndexConfigCommonOutputCrop) " + "returned error 0x%08x", err); + } } break; } diff --git a/media/libstagefright/colorconversion/SoftwareRenderer.cpp b/media/libstagefright/colorconversion/SoftwareRenderer.cpp index c204a94..662a84a 100644 --- a/media/libstagefright/colorconversion/SoftwareRenderer.cpp +++ b/media/libstagefright/colorconversion/SoftwareRenderer.cpp @@ -48,6 +48,9 @@ SoftwareRenderer::SoftwareRenderer( LOGI("display = %d x %d, decoded = %d x %d", mDisplayWidth, mDisplayHeight, mDecodedWidth, mDecodedHeight); + mDecodedWidth = mDisplayWidth; + mDecodedHeight = mDisplayHeight; + int halFormat; switch (mColorFormat) { #if HAS_YCBCR420_SP_ADRENO |