summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-11-11 00:33:05 -0800
committerJames Dong <jdong@google.com>2010-11-11 14:08:52 -0800
commitd781089731127bd9199d47f53b170895868b8750 (patch)
tree21dab382492824db054b2350128dd5018d19e1e8 /media
parent798a9d2eb1d2421f904ab61f05e4b70a5095d31a (diff)
downloadframeworks_base-d781089731127bd9199d47f53b170895868b8750.zip
frameworks_base-d781089731127bd9199d47f53b170895868b8750.tar.gz
frameworks_base-d781089731127bd9199d47f53b170895868b8750.tar.bz2
Add color format query support to QueryCodecs()
Change-Id: Ic8589649cd09392a1b969a30082b4c9c4e6cc6a7
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/OMXCodec.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 3a5d6af..3d490c9 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -4006,6 +4006,20 @@ status_t QueryCodecs(
caps->mProfileLevels.push(profileLevel);
}
+ // Color format query
+ OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat;
+ InitOMXParams(&portFormat);
+ portFormat.nPortIndex = queryDecoders ? 1 : 0;
+ for (portFormat.nIndex = 0;; ++portFormat.nIndex) {
+ err = omx->getParameter(
+ node, OMX_IndexParamVideoPortFormat,
+ &portFormat, sizeof(portFormat));
+ if (err != OK) {
+ break;
+ }
+ caps->mColorFormats.push(portFormat.eColorFormat);
+ }
+
CHECK_EQ(omx->freeNode(node), OK);
}
}