diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-27 16:34:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-27 16:34:15 -0700 |
commit | bf8ecd7c7ecfb3579a91b43d95e7fa0d8a0d63be (patch) | |
tree | 108b6aeaf84e8d520b6d01546a60f78a91fe464e /media | |
parent | 29418e98731b4a5f94d9ac5f4a0df9d5d21bca55 (diff) | |
parent | 813a875286e8a1633d345b60c0f84bb0da87fc66 (diff) | |
download | frameworks_base-bf8ecd7c7ecfb3579a91b43d95e7fa0d8a0d63be.zip frameworks_base-bf8ecd7c7ecfb3579a91b43d95e7fa0d8a0d63be.tar.gz frameworks_base-bf8ecd7c7ecfb3579a91b43d95e7fa0d8a0d63be.tar.bz2 |
Merge change 22991 into eclair
* changes:
Apparently setting the preferred role of the OMX component is now required on this platform.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 38b5e5b..91db766 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -499,15 +499,25 @@ void OMXCodec::setVideoOutputFormat( // Enabling this code appears to be the right thing(tm), but,... // the TI decoder then loses the ability to output YUV420 and only outputs // YCbYCr (16bit) + #if 1 - if (!strcmp("OMX.TI.Video.Decoder", mComponentName) - && !strcasecmp("video/avc", mime)) { + if (!strcmp("OMX.TI.Video.Decoder", mComponentName)) { OMX_PARAM_COMPONENTROLETYPE role; role.nSize = sizeof(role); role.nVersion.s.nVersionMajor = 1; role.nVersion.s.nVersionMinor = 1; - strncpy((char *)role.cRole, "video_decoder.avc", - OMX_MAX_STRINGNAME_SIZE - 1); + + if (!strcasecmp("video/avc", mime)) { + strncpy((char *)role.cRole, "video_decoder.avc", + OMX_MAX_STRINGNAME_SIZE - 1); + } else if (!strcasecmp("video/mp4v-es", mime)) { + strncpy((char *)role.cRole, "video_decoder.mpeg4", + OMX_MAX_STRINGNAME_SIZE - 1); + } else if (!strcasecmp("video/3gpp", mime)) { + strncpy((char *)role.cRole, "video_decoder.h263", + OMX_MAX_STRINGNAME_SIZE - 1); + } + role.cRole[OMX_MAX_STRINGNAME_SIZE - 1] = '\0'; status_t err = mOMX->set_parameter( |