ACodec: Reduce the TWOmxNode wrapper in GraphicBufferSource
The wrapper of TWOmxNode introduced the extra binder calls to its
creator and got the chance to send back the same request to the original
requester. To avoid the redundant binder transactions, the patch simply
remove the wrapper by using the internal HAL interface.
Bug: 173502220
Bug: 173661647
Test: Trace recording without redundant binder calls in emptyBuffer
Merged-In: I77ac10d12a15c4b07a37ac7e644400dba85a03a9
Change-Id: I77ac10d12a15c4b07a37ac7e644400dba85a03a9
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index bc84d78..edbd99e 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -7035,10 +7035,9 @@
return err;
}
- using hardware::media::omx::V1_0::utils::TWOmxNode;
err = statusFromBinderStatus(
mCodec->mGraphicBufferSource->configure(
- new TWOmxNode(mCodec->mOMXNode),
+ mCodec->mOMXNode->getHalInterface<IOmxNode>(),
static_cast<hardware::graphics::common::V1_0::Dataspace>(dataSpace)));
if (err != OK) {
ALOGE("[%s] Unable to configure for node (err %d)",