From b58b311ac79c273f38750a4cb2f7c6c5e60c6b84 Mon Sep 17 00:00:00 2001 From: Pawin Vongmasa Date: Mon, 25 Feb 2019 23:08:14 -0800 Subject: [PATCH] Add asInputSink() to IComponent By making IComponent present itself as an IInputSink, the wrapper code can be made to execute in the same process as the IComponent instance, hence reducing an IPC hop in the case where an InputSurface comes from a different process. Test: make cts -j123 && cts-tradefed run cts-dev -m \ CtsMediaTestCases --compatibility:module-arg \ CtsMediaTestCases:include-annotation:\ android.platform.test.annotations.RequiresDevice Bug: 126296132 Change-Id: I61409ccfa9a9d6b152e2c9363ff119302ce8ae1a --- current.txt | 2 +- media/c2/1.0/IComponent.hal | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/current.txt b/current.txt index caadefe7aa..8bb4440790 100644 --- a/current.txt +++ b/current.txt @@ -492,7 +492,7 @@ dd1ec219f5d2e2b33c6c0bcb92e63bbedb36f7c716413462848f6b6ae74fc864 android.hardwar aee53b2865b4f7939fb3df6fae758d9750c14f93dd454b479fc74aa7978fda4f android.hardware.media.bufferpool@2.0::IConnection 0bf3758eeeb05767830ea87041214be80968c4679fb73577ac5b3091841ee71f android.hardware.media.bufferpool@2.0::IObserver 82255e252ae215382473ad2e5ac7a2814a439a24f0092551aad7a2f89c6e9546 android.hardware.media.bufferpool@2.0::types -fd4725732511b8ae124b868fd0b2090386663dffc5e67dfd0d0b4a0b49c335db android.hardware.media.c2@1.0::IComponent +277161ea99236a0858e9fcc021c357db03be2de500acf5701d125e73e3e8071a android.hardware.media.c2@1.0::IComponent 389d06e4a4ecf60f828a260045b0c327a5ae883ee0856a3c054556dd22b1f450 android.hardware.media.c2@1.0::IComponentInterface 5ee0c02265c5505ade189796bef46697df4e0563e3544bb0c934855b34694b07 android.hardware.media.c2@1.0::IComponentListener 43d70bcdc63b3d042bac3c3297f5d941dfabbd08f3ceb96b6016cc14f6e34ba3 android.hardware.media.c2@1.0::IComponentStore diff --git a/media/c2/1.0/IComponent.hal b/media/c2/1.0/IComponent.hal index 7fd551fc2b..abd14482bd 100644 --- a/media/c2/1.0/IComponent.hal +++ b/media/c2/1.0/IComponent.hal @@ -22,6 +22,7 @@ import android.hardware.media.omx@1.0::IGraphicBufferSource; import IConfigurable; import IComponentInterface; import IComponentListener; +import IInputSink; import IInputSurface; import IInputSurfaceConnection; @@ -355,11 +356,19 @@ interface IComponent { * Returns the @ref IComponentInterface instance associated to this * component. * - * An @p IConfigurable instance for the component can be obtained by calling + * An @ref IConfigurable instance for the component can be obtained by calling * IComponentInterface::getConfigurable() on the returned @p intf. * * @return intf `IComponentInterface` instance. This must not be null. */ getInterface() generates (IComponentInterface intf); + + /** + * Returns an @ref IInputSink instance that has the component as the + * underlying implementation. + * + * @return sink `IInputSink` instance. + */ + asInputSink() generates (IInputSink sink); };