summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IMediaCodecList.cpp
diff options
context:
space:
mode:
authorRonghua Wu <ronghuawu@google.com>2015-03-26 13:52:57 -0700
committerRonghua Wu <ronghuawu@google.com>2015-04-13 18:01:51 -0700
commit9e6955a19bf77ebf27b770e910efbe1ebf1ceac0 (patch)
tree04fbb621d9f9262bdec827d80f9df998a48f90ff /media/libmedia/IMediaCodecList.cpp
parent5795cb168634680fd5c835849c8fcf48dd6f532b (diff)
downloadframeworks_av-9e6955a19bf77ebf27b770e910efbe1ebf1ceac0.zip
frameworks_av-9e6955a19bf77ebf27b770e910efbe1ebf1ceac0.tar.gz
frameworks_av-9e6955a19bf77ebf27b770e910efbe1ebf1ceac0.tar.bz2
media: handle overrides and measure max codec instance.
Bug: 19620911 Change-Id: I68d5919284700f37ccc6c6b9f96cd87ccdd40e6a
Diffstat (limited to 'media/libmedia/IMediaCodecList.cpp')
-rw-r--r--media/libmedia/IMediaCodecList.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/media/libmedia/IMediaCodecList.cpp b/media/libmedia/IMediaCodecList.cpp
index 80020db..e2df104 100644
--- a/media/libmedia/IMediaCodecList.cpp
+++ b/media/libmedia/IMediaCodecList.cpp
@@ -30,6 +30,7 @@ enum {
CREATE = IBinder::FIRST_CALL_TRANSACTION,
COUNT_CODECS,
GET_CODEC_INFO,
+ GET_GLOBAL_SETTINGS,
FIND_CODEC_BY_TYPE,
FIND_CODEC_BY_NAME,
};
@@ -64,6 +65,19 @@ public:
}
}
+ virtual const sp<AMessage> getGlobalSettings() const
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(IMediaCodecList::getInterfaceDescriptor());
+ remote()->transact(GET_GLOBAL_SETTINGS, data, &reply);
+ status_t err = reply.readInt32();
+ if (err == OK) {
+ return AMessage::FromParcel(reply);
+ } else {
+ return NULL;
+ }
+ }
+
virtual ssize_t findCodecByType(
const char *type, bool encoder, size_t startIndex = 0) const
{
@@ -125,6 +139,20 @@ status_t BnMediaCodecList::onTransact(
}
break;
+ case GET_GLOBAL_SETTINGS:
+ {
+ CHECK_INTERFACE(IMediaCodecList, data, reply);
+ const sp<AMessage> info = getGlobalSettings();
+ if (info != NULL) {
+ reply->writeInt32(OK);
+ info->writeToParcel(reply);
+ } else {
+ reply->writeInt32(-ERANGE);
+ }
+ return NO_ERROR;
+ }
+ break;
+
case FIND_CODEC_BY_TYPE:
{
CHECK_INTERFACE(IMediaCodecList, data, reply);