diff options
author | Andreas Huber <andih@google.com> | 2010-10-10 11:16:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-10-10 11:16:01 -0700 |
commit | 79e0ac144ca9bb771e2c6b1954c882da12a4bea8 (patch) | |
tree | 6c2597e62ec99a3dcbb9f80d884dd87f1f1cf6e3 /media/libstagefright/OMXCodec.cpp | |
parent | 2b37ced30f89437c804c3945b901019b86d210ae (diff) | |
parent | 712a002fa3a507158c9ae3435b843edd3a69d7e8 (diff) | |
download | frameworks_av-79e0ac144ca9bb771e2c6b1954c882da12a4bea8.zip frameworks_av-79e0ac144ca9bb771e2c6b1954c882da12a4bea8.tar.gz frameworks_av-79e0ac144ca9bb771e2c6b1954c882da12a4bea8.tar.bz2 |
am 45bd1159: am 02654f01: Merge "On this particular device the hardware video decoder spits out buffers that don\'t actually contain our video data, so we cannot use them to restore the video frame after suspend/resume." into gingerbread
Merge commit '45bd1159fa34b51ba077e0cde760d171ca092552'
* commit '45bd1159fa34b51ba077e0cde760d171ca092552':
On this particular device the hardware video decoder spits out buffers that don't actually contain our video data, so we cannot use them to restore the video frame after suspend/resume.
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a5341e3..5e4195e 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -356,7 +356,8 @@ static int CompareSoftwareCodecsFirst( } // static -uint32_t OMXCodec::getComponentQuirks(const char *componentName) { +uint32_t OMXCodec::getComponentQuirks( + const char *componentName, bool isEncoder) { uint32_t quirks = 0; if (!strcmp(componentName, "OMX.Nvidia.amr.decoder") || @@ -421,6 +422,13 @@ uint32_t OMXCodec::getComponentQuirks(const char *componentName) { quirks |= kInputBufferSizesAreBogus; } + if (!strncmp(componentName, "OMX.SEC.", 8) && !isEncoder) { + // These output buffers contain no video data, just some + // opaque information that allows the overlay to display their + // contents. + quirks |= kOutputBuffersAreUnreadable; + } + return quirks; } @@ -507,7 +515,7 @@ sp<MediaSource> OMXCodec::Create( LOGV("Successfully allocated OMX node '%s'", componentName); sp<OMXCodec> codec = new OMXCodec( - omx, node, getComponentQuirks(componentName), + omx, node, getComponentQuirks(componentName, createEncoder), createEncoder, mime, componentName, source); @@ -1772,6 +1780,10 @@ void OMXCodec::on_message(const omx_message &msg) { buffer->meta_data()->setInt32(kKeyIsCodecConfig, true); } + if (mQuirks & kOutputBuffersAreUnreadable) { + buffer->meta_data()->setInt32(kKeyIsUnreadable, true); + } + buffer->meta_data()->setPointer( kKeyPlatformPrivate, msg.u.extended_buffer_data.platform_private); |