media.c2 aidl: apply interface change for IInputSurface
Bug: 315556623
Test: m
Change-Id: I0e74ab8fa70111df69f5ace45fcac5bdc8d1cb2c
diff --git a/media/codec2/hal/aidl/Component.cpp b/media/codec2/hal/aidl/Component.cpp
index 4605af3..4c2d5d3 100644
--- a/media/codec2/hal/aidl/Component.cpp
+++ b/media/codec2/hal/aidl/Component.cpp
@@ -403,6 +403,22 @@
return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
}
+ScopedAStatus Component::connectToInputSurface(
+ const std::shared_ptr<IInputSurface>& inputSurface,
+ std::shared_ptr<IInputSurfaceConnection> *connection) {
+ // TODO
+ (void)inputSurface;
+ (void)connection;
+ return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
+}
+
+ScopedAStatus Component::asInputSink(
+ std::shared_ptr<IInputSink> *sink) {
+ // TODO
+ (void)sink;
+ return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
+}
+
void Component::initListener(const std::shared_ptr<Component>& self) {
if (__builtin_available(android __ANDROID_API_T__, *)) {
std::shared_ptr<C2Component::Listener> c2listener =
diff --git a/media/codec2/hal/aidl/ComponentStore.cpp b/media/codec2/hal/aidl/ComponentStore.cpp
index 58407d1..f0a1490 100644
--- a/media/codec2/hal/aidl/ComponentStore.cpp
+++ b/media/codec2/hal/aidl/ComponentStore.cpp
@@ -273,6 +273,13 @@
return ScopedAStatus::ok();
}
+ScopedAStatus ComponentStore::createInputSurface(
+ std::shared_ptr<IInputSurface> *inputSurface) {
+ // TODO
+ (void)inputSurface;
+ return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
+}
+
void ComponentStore::onInterfaceLoaded(const std::shared_ptr<C2ComponentInterface> &intf) {
// invalidate unsupported struct descriptors if a new interface is loaded as it may have
// exposed new descriptors
diff --git a/media/codec2/hal/aidl/include/codec2/aidl/Component.h b/media/codec2/hal/aidl/include/codec2/aidl/Component.h
index 4a090e9..94b760f 100644
--- a/media/codec2/hal/aidl/include/codec2/aidl/Component.h
+++ b/media/codec2/hal/aidl/include/codec2/aidl/Component.h
@@ -27,6 +27,9 @@
#include <aidl/android/hardware/media/c2/IComponentInterface.h>
#include <aidl/android/hardware/media/c2/IComponentListener.h>
#include <aidl/android/hardware/media/c2/IComponentStore.h>
+#include <aidl/android/hardware/media/c2/IInputSink.h>
+#include <aidl/android/hardware/media/c2/IInputSurface.h>
+#include <aidl/android/hardware/media/c2/IInputSurfaceConnection.h>
#include <C2Component.h>
#include <C2Buffer.h>
@@ -71,6 +74,11 @@
::ndk::ScopedAStatus configureVideoTunnel(
int32_t avSyncHwId,
common::NativeHandle* handle) override;
+ ::ndk::ScopedAStatus connectToInputSurface(
+ const std::shared_ptr<IInputSurface>& inputSurface,
+ std::shared_ptr<IInputSurfaceConnection> *connection) override;
+ ::ndk::ScopedAStatus asInputSink(
+ std::shared_ptr<IInputSink> *sink) override;
protected:
c2_status_t mInit;
diff --git a/media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h b/media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h
index b3c97d5..0698b0f 100644
--- a/media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h
+++ b/media/codec2/hal/aidl/include/codec2/aidl/ComponentStore.h
@@ -23,6 +23,7 @@
#include <aidl/android/hardware/media/bufferpool2/IClientManager.h>
#include <aidl/android/hardware/media/c2/BnComponentStore.h>
+#include <aidl/android/hardware/media/c2/IInputSurface.h>
#include <C2Component.h>
#include <C2Param.h>
@@ -85,6 +86,8 @@
std::shared_ptr<IComponentInterface> *intf) override;
virtual ::ndk::ScopedAStatus listComponents(
std::vector<IComponentStore::ComponentTraits>* traits) override;
+ virtual ::ndk::ScopedAStatus createInputSurface(
+ std::shared_ptr<IInputSurface> *inputSurface) override;
virtual ::ndk::ScopedAStatus getStructDescriptors(
const std::vector<int32_t>& indices,
std::vector<StructDescriptor> *descs) override;