summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-08-14 01:27:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-14 01:27:16 +0000
commit7f76a81b18ade3158ae27015637074ce08e837b2 (patch)
treeb2927c2cc99053ba118553a0242cf41b664fb5be /media
parentcd06d357ed4fcde991aa55dc97317d97cb287332 (diff)
parent2ee14000a38683220fb250d9e7300e1d71ccdaa0 (diff)
downloadframeworks_av-7f76a81b18ade3158ae27015637074ce08e837b2.zip
frameworks_av-7f76a81b18ade3158ae27015637074ce08e837b2.tar.gz
frameworks_av-7f76a81b18ade3158ae27015637074ce08e837b2.tar.bz2
Merge "Check adaptive playback support via CodecCapabilities" into klp-dev
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/MediaCodecList.cpp5
-rw-r--r--media/libstagefright/OMXCodec.cpp9
2 files changed, 12 insertions, 2 deletions
diff --git a/media/libstagefright/MediaCodecList.cpp b/media/libstagefright/MediaCodecList.cpp
index d24337f..6248e90 100644
--- a/media/libstagefright/MediaCodecList.cpp
+++ b/media/libstagefright/MediaCodecList.cpp
@@ -509,7 +509,8 @@ status_t MediaCodecList::getSupportedTypes(
status_t MediaCodecList::getCodecCapabilities(
size_t index, const char *type,
Vector<ProfileLevel> *profileLevels,
- Vector<uint32_t> *colorFormats) const {
+ Vector<uint32_t> *colorFormats,
+ uint32_t *flags) const {
profileLevels->clear();
colorFormats->clear();
@@ -547,6 +548,8 @@ status_t MediaCodecList::getCodecCapabilities(
colorFormats->push(caps.mColorFormats.itemAt(i));
}
+ *flags = caps.mFlags;
+
return OK;
}
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3de3c28..7b37365 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -4567,7 +4567,7 @@ status_t QueryCodec(
CodecCapabilities *caps) {
if (strncmp(componentName, "OMX.", 4)) {
// Not an OpenMax component but a software codec.
-
+ caps->mFlags = 0;
caps->mComponentName = componentName;
return OK;
}
@@ -4582,8 +4582,15 @@ status_t QueryCodec(
OMXCodec::setComponentRole(omx, node, isEncoder, mime);
+ caps->mFlags = 0;
caps->mComponentName = componentName;
+ if (!isEncoder && !strncmp(mime, "video/", 6) &&
+ omx->storeMetaDataInBuffers(
+ node, 1 /* port index */, OMX_TRUE) == OK) {
+ caps->mFlags |= CodecCapabilities::kFlagSupportsAdaptivePlayback;
+ }
+
OMX_VIDEO_PARAM_PROFILELEVELTYPE param;
InitOMXParams(&param);