summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2011-07-24 12:59:35 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-24 12:59:35 -0700
commit726e4527b7a750e688fec4c1e7c5f7b9a33d1623 (patch)
tree06c12073a7c0919361b092d1f9a5537982077d4c
parent348a3aca420da133b2283ee12216e8e0f939e88d (diff)
parentd35924d9928f29dcee6f5666b5bbd084640c7b34 (diff)
downloadframeworks_av-726e4527b7a750e688fec4c1e7c5f7b9a33d1623.zip
frameworks_av-726e4527b7a750e688fec4c1e7c5f7b9a33d1623.tar.gz
frameworks_av-726e4527b7a750e688fec4c1e7c5f7b9a33d1623.tar.bz2
Merge "QueryCodecs() signature change"
-rw-r--r--cmds/stagefright/stagefright.cpp2
-rw-r--r--include/media/stagefright/OMXCodec.h7
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp7
3 files changed, 15 insertions, 1 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index b42f1c5..34f0a64 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -803,9 +803,9 @@ int main(int argc, char **argv) {
printf("type '%s':\n", kMimeTypes[k]);
Vector<CodecCapabilities> results;
+ // will retrieve hardware and software codecs
CHECK_EQ(QueryCodecs(omx, kMimeTypes[k],
true, // queryDecoders
- false, // hwCodecOnly
&results), (status_t)OK);
for (size_t i = 0; i < results.size(); ++i) {
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 20fcde5..93933d9 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -348,6 +348,8 @@ struct CodecCapabilities {
// that encode content of the given type.
// profile and level indications only make sense for h.263, mpeg4 and avc
// video.
+// If hwCodecOnly==true, only returns hardware-based components, software and
+// hardware otherwise.
// The profile/level values correspond to
// OMX_VIDEO_H263PROFILETYPE, OMX_VIDEO_MPEG4PROFILETYPE,
// OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263LEVELTYPE, OMX_VIDEO_MPEG4LEVELTYPE
@@ -358,6 +360,11 @@ status_t QueryCodecs(
const char *mimeType, bool queryDecoders, bool hwCodecOnly,
Vector<CodecCapabilities> *results);
+status_t QueryCodecs(
+ const sp<IOMX> &omx,
+ const char *mimeType, bool queryDecoders,
+ Vector<CodecCapabilities> *results);
+
} // namespace android
#endif // OMX_CODEC_H_
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 7bcbdcf..0a6f0bd 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -4415,6 +4415,13 @@ status_t QueryCodecs(
return OK;
}
+status_t QueryCodecs(
+ const sp<IOMX> &omx,
+ const char *mimeType, bool queryDecoders,
+ Vector<CodecCapabilities> *results) {
+ return QueryCodecs(omx, mimeType, queryDecoders, false /*hwCodecOnly*/, results);
+}
+
void OMXCodec::restorePatchedDataPointer(BufferInfo *info) {
CHECK(mIsEncoder && (mQuirks & kAvoidMemcopyInputRecordingFrames));
CHECK(mOMXLivesLocally);