Implement IOmxStore
Separate out MediaCodecsXmlParser and implement IOmxStore and IOMXStore.
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Test: make cts -j123 && cts-tradefed run cts -m \
CtsMediaTestCases -t android.media.cts.MediaCodecListTest
Bug: 37657124
Merged-In: I8c5a3a8fe6defab4f17c8a49bce57452879193dc
Change-Id: I8c5a3a8fe6defab4f17c8a49bce57452879193dc
diff --git a/media/libmedia/IMediaCodecService.cpp b/media/libmedia/IMediaCodecService.cpp
index 2d62419..adfa93d 100644
--- a/media/libmedia/IMediaCodecService.cpp
+++ b/media/libmedia/IMediaCodecService.cpp
@@ -27,7 +27,8 @@
namespace android {
enum {
- GET_OMX = IBinder::FIRST_CALL_TRANSACTION
+ GET_OMX = IBinder::FIRST_CALL_TRANSACTION,
+ GET_OMX_STORE
};
class BpMediaCodecService : public BpInterface<IMediaCodecService>
@@ -45,6 +46,13 @@
return interface_cast<IOMX>(reply.readStrongBinder());
}
+ virtual sp<IOMXStore> getOMXStore() {
+ Parcel data, reply;
+ data.writeInterfaceToken(IMediaCodecService::getInterfaceDescriptor());
+ remote()->transact(GET_OMX_STORE, data, &reply);
+ return interface_cast<IOMXStore>(reply.readStrongBinder());
+ }
+
};
IMPLEMENT_META_INTERFACE(MediaCodecService, "android.media.IMediaCodecService");
@@ -62,6 +70,12 @@
reply->writeStrongBinder(IInterface::asBinder(omx));
return NO_ERROR;
}
+ case GET_OMX_STORE: {
+ CHECK_INTERFACE(IMediaCodecService, data, reply);
+ sp<IOMXStore> omxStore = getOMXStore();
+ reply->writeStrongBinder(IInterface::asBinder(omxStore));
+ return NO_ERROR;
+ }
default:
return BBinder::onTransact(code, data, reply, flags);
}