1 /* 2 * This file is auto-generated. DO NOT MODIFY. 3 * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash d4c3897135ef9475dee2021ac39a41ae79c7690e -t --stability vintf --min_sdk_version 30 -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/media/bufferpool/aidl/android.hardware.media.bufferpool2_interface/2/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging/android/hardware/media/c2/IComponent.cpp.d -h out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/media/c2/aidl/android.hardware.media.c2-V1-ndk-source/gen/staging -Iframeworks/native/aidl/gui -Iframeworks/base/core/java -Nhardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1 hardware/interfaces/media/c2/aidl/aidl_api/android.hardware.media.c2/1/android/hardware/media/c2/IComponent.aidl 4 * 5 * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..). 6 * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER 7 * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE. 8 */ 9 #pragma once 10 11 #include <cstdint> 12 #include <memory> 13 #include <optional> 14 #include <string> 15 #include <vector> 16 #include <android/binder_interface_utils.h> 17 #include <android/binder_parcelable_utils.h> 18 #include <android/binder_to_string.h> 19 #include <aidl/android/hardware/common/NativeHandle.h> 20 #include <aidl/android/hardware/media/c2/IComponent.h> 21 #include <aidl/android/hardware/media/c2/IComponentInterface.h> 22 #include <aidl/android/hardware/media/c2/IConfigurable.h> 23 #include <aidl/android/hardware/media/c2/IGraphicBufferAllocator.h> 24 #include <aidl/android/hardware/media/c2/IInputSink.h> 25 #include <aidl/android/hardware/media/c2/IInputSurface.h> 26 #include <aidl/android/hardware/media/c2/IInputSurfaceConnection.h> 27 #include <aidl/android/hardware/media/c2/IPooledGraphicBufferAllocator.h> 28 #include <aidl/android/hardware/media/c2/WorkBundle.h> 29 #ifdef BINDER_STABILITY_SUPPORT 30 #include <android/binder_stability.h> 31 #endif // BINDER_STABILITY_SUPPORT 32 33 namespace aidl::android::hardware::common { 34 class NativeHandle; 35 } // namespace aidl::android::hardware::common 36 namespace aidl::android::hardware::media::c2 { 37 class IComponentInterface; 38 class IConfigurable; 39 class IGraphicBufferAllocator; 40 class IInputSink; 41 class IInputSurface; 42 class IInputSurfaceConnection; 43 class IPooledGraphicBufferAllocator; 44 class WorkBundle; 45 } // namespace aidl::android::hardware::media::c2 46 namespace aidl { 47 namespace android { 48 namespace hardware { 49 namespace media { 50 namespace c2 { 51 class IComponentDelegator; 52 53 class IComponent : public ::ndk::ICInterface { 54 public: 55 typedef IComponentDelegator DefaultDelegator; 56 static const char* descriptor; 57 IComponent(); 58 virtual ~IComponent(); 59 60 class BlockPool { 61 public: 62 typedef std::false_type fixed_size; 63 static const char* descriptor; 64 65 int64_t blockPoolId = 0L; 66 std::shared_ptr<::aidl::android::hardware::media::c2::IConfigurable> configurable; 67 68 binder_status_t readFromParcel(const AParcel* parcel); 69 binder_status_t writeToParcel(AParcel* parcel) const; 70 71 inline bool operator==(const BlockPool& _rhs) const { 72 return std::tie(blockPoolId, configurable) == std::tie(_rhs.blockPoolId, _rhs.configurable); 73 } 74 inline bool operator<(const BlockPool& _rhs) const { 75 return std::tie(blockPoolId, configurable) < std::tie(_rhs.blockPoolId, _rhs.configurable); 76 } 77 inline bool operator!=(const BlockPool& _rhs) const { 78 return !(*this == _rhs); 79 } 80 inline bool operator>(const BlockPool& _rhs) const { 81 return _rhs < *this; 82 } 83 inline bool operator>=(const BlockPool& _rhs) const { 84 return !(*this < _rhs); 85 } 86 inline bool operator<=(const BlockPool& _rhs) const { 87 return !(_rhs < *this); 88 } 89 90 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()91 inline std::string toString() const { 92 std::ostringstream _aidl_os; 93 _aidl_os << "BlockPool{"; 94 _aidl_os << "blockPoolId: " << ::android::internal::ToString(blockPoolId); 95 _aidl_os << ", configurable: " << ::android::internal::ToString(configurable); 96 _aidl_os << "}"; 97 return _aidl_os.str(); 98 } 99 }; 100 class GbAllocator { 101 public: 102 typedef std::false_type fixed_size; 103 static const char* descriptor; 104 105 ::ndk::ScopedFileDescriptor waitableFd; 106 std::shared_ptr<::aidl::android::hardware::media::c2::IGraphicBufferAllocator> igba; 107 108 binder_status_t readFromParcel(const AParcel* parcel); 109 binder_status_t writeToParcel(AParcel* parcel) const; 110 111 inline bool operator==(const GbAllocator& _rhs) const { 112 return std::tie(waitableFd, igba) == std::tie(_rhs.waitableFd, _rhs.igba); 113 } 114 inline bool operator<(const GbAllocator& _rhs) const { 115 return std::tie(waitableFd, igba) < std::tie(_rhs.waitableFd, _rhs.igba); 116 } 117 inline bool operator!=(const GbAllocator& _rhs) const { 118 return !(*this == _rhs); 119 } 120 inline bool operator>(const GbAllocator& _rhs) const { 121 return _rhs < *this; 122 } 123 inline bool operator>=(const GbAllocator& _rhs) const { 124 return !(*this < _rhs); 125 } 126 inline bool operator<=(const GbAllocator& _rhs) const { 127 return !(_rhs < *this); 128 } 129 130 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()131 inline std::string toString() const { 132 std::ostringstream _aidl_os; 133 _aidl_os << "GbAllocator{"; 134 _aidl_os << "waitableFd: " << ::android::internal::ToString(waitableFd); 135 _aidl_os << ", igba: " << ::android::internal::ToString(igba); 136 _aidl_os << "}"; 137 return _aidl_os.str(); 138 } 139 }; 140 class PooledGbAllocator { 141 public: 142 typedef std::false_type fixed_size; 143 static const char* descriptor; 144 145 ::ndk::ScopedFileDescriptor waitableFd; 146 int64_t receiverId = 0L; 147 std::shared_ptr<::aidl::android::hardware::media::c2::IPooledGraphicBufferAllocator> ipgba; 148 149 binder_status_t readFromParcel(const AParcel* parcel); 150 binder_status_t writeToParcel(AParcel* parcel) const; 151 152 inline bool operator==(const PooledGbAllocator& _rhs) const { 153 return std::tie(waitableFd, receiverId, ipgba) == std::tie(_rhs.waitableFd, _rhs.receiverId, _rhs.ipgba); 154 } 155 inline bool operator<(const PooledGbAllocator& _rhs) const { 156 return std::tie(waitableFd, receiverId, ipgba) < std::tie(_rhs.waitableFd, _rhs.receiverId, _rhs.ipgba); 157 } 158 inline bool operator!=(const PooledGbAllocator& _rhs) const { 159 return !(*this == _rhs); 160 } 161 inline bool operator>(const PooledGbAllocator& _rhs) const { 162 return _rhs < *this; 163 } 164 inline bool operator>=(const PooledGbAllocator& _rhs) const { 165 return !(*this < _rhs); 166 } 167 inline bool operator<=(const PooledGbAllocator& _rhs) const { 168 return !(_rhs < *this); 169 } 170 171 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()172 inline std::string toString() const { 173 std::ostringstream _aidl_os; 174 _aidl_os << "PooledGbAllocator{"; 175 _aidl_os << "waitableFd: " << ::android::internal::ToString(waitableFd); 176 _aidl_os << ", receiverId: " << ::android::internal::ToString(receiverId); 177 _aidl_os << ", ipgba: " << ::android::internal::ToString(ipgba); 178 _aidl_os << "}"; 179 return _aidl_os.str(); 180 } 181 }; 182 class BlockPoolAllocator { 183 public: 184 typedef std::false_type fixed_size; 185 static const char* descriptor; 186 187 int32_t allocatorId = 0; 188 std::optional<::aidl::android::hardware::media::c2::IComponent::GbAllocator> gbAllocator; 189 std::optional<::aidl::android::hardware::media::c2::IComponent::PooledGbAllocator> pooledGbAllocator; 190 191 binder_status_t readFromParcel(const AParcel* parcel); 192 binder_status_t writeToParcel(AParcel* parcel) const; 193 194 inline bool operator==(const BlockPoolAllocator& _rhs) const { 195 return std::tie(allocatorId, gbAllocator, pooledGbAllocator) == std::tie(_rhs.allocatorId, _rhs.gbAllocator, _rhs.pooledGbAllocator); 196 } 197 inline bool operator<(const BlockPoolAllocator& _rhs) const { 198 return std::tie(allocatorId, gbAllocator, pooledGbAllocator) < std::tie(_rhs.allocatorId, _rhs.gbAllocator, _rhs.pooledGbAllocator); 199 } 200 inline bool operator!=(const BlockPoolAllocator& _rhs) const { 201 return !(*this == _rhs); 202 } 203 inline bool operator>(const BlockPoolAllocator& _rhs) const { 204 return _rhs < *this; 205 } 206 inline bool operator>=(const BlockPoolAllocator& _rhs) const { 207 return !(*this < _rhs); 208 } 209 inline bool operator<=(const BlockPoolAllocator& _rhs) const { 210 return !(_rhs < *this); 211 } 212 213 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()214 inline std::string toString() const { 215 std::ostringstream _aidl_os; 216 _aidl_os << "BlockPoolAllocator{"; 217 _aidl_os << "allocatorId: " << ::android::internal::ToString(allocatorId); 218 _aidl_os << ", gbAllocator: " << ::android::internal::ToString(gbAllocator); 219 _aidl_os << ", pooledGbAllocator: " << ::android::internal::ToString(pooledGbAllocator); 220 _aidl_os << "}"; 221 return _aidl_os.str(); 222 } 223 }; 224 static inline const int32_t version = 1; 225 static inline const std::string hash = "d4c3897135ef9475dee2021ac39a41ae79c7690e"; 226 static constexpr uint32_t TRANSACTION_configureVideoTunnel = FIRST_CALL_TRANSACTION + 0; 227 static constexpr uint32_t TRANSACTION_createBlockPool = FIRST_CALL_TRANSACTION + 1; 228 static constexpr uint32_t TRANSACTION_destroyBlockPool = FIRST_CALL_TRANSACTION + 2; 229 static constexpr uint32_t TRANSACTION_drain = FIRST_CALL_TRANSACTION + 3; 230 static constexpr uint32_t TRANSACTION_flush = FIRST_CALL_TRANSACTION + 4; 231 static constexpr uint32_t TRANSACTION_getInterface = FIRST_CALL_TRANSACTION + 5; 232 static constexpr uint32_t TRANSACTION_queue = FIRST_CALL_TRANSACTION + 6; 233 static constexpr uint32_t TRANSACTION_release = FIRST_CALL_TRANSACTION + 7; 234 static constexpr uint32_t TRANSACTION_reset = FIRST_CALL_TRANSACTION + 8; 235 static constexpr uint32_t TRANSACTION_start = FIRST_CALL_TRANSACTION + 9; 236 static constexpr uint32_t TRANSACTION_stop = FIRST_CALL_TRANSACTION + 10; 237 static constexpr uint32_t TRANSACTION_connectToInputSurface = FIRST_CALL_TRANSACTION + 11; 238 static constexpr uint32_t TRANSACTION_asInputSink = FIRST_CALL_TRANSACTION + 12; 239 240 static std::shared_ptr<IComponent> fromBinder(const ::ndk::SpAIBinder& binder); 241 static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IComponent>& instance); 242 static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IComponent>* instance); 243 static bool setDefaultImpl(const std::shared_ptr<IComponent>& impl); 244 static const std::shared_ptr<IComponent>& getDefaultImpl(); 245 virtual ::ndk::ScopedAStatus configureVideoTunnel(int32_t in_avSyncHwId, ::aidl::android::hardware::common::NativeHandle* _aidl_return) = 0; 246 virtual ::ndk::ScopedAStatus createBlockPool(const ::aidl::android::hardware::media::c2::IComponent::BlockPoolAllocator& in_allocator, ::aidl::android::hardware::media::c2::IComponent::BlockPool* _aidl_return) = 0; 247 virtual ::ndk::ScopedAStatus destroyBlockPool(int64_t in_blockPoolId) = 0; 248 virtual ::ndk::ScopedAStatus drain(bool in_withEos) = 0; 249 virtual ::ndk::ScopedAStatus flush(::aidl::android::hardware::media::c2::WorkBundle* _aidl_return) = 0; 250 virtual ::ndk::ScopedAStatus getInterface(std::shared_ptr<::aidl::android::hardware::media::c2::IComponentInterface>* _aidl_return) = 0; 251 virtual ::ndk::ScopedAStatus queue(const ::aidl::android::hardware::media::c2::WorkBundle& in_workBundle) = 0; 252 virtual ::ndk::ScopedAStatus release() = 0; 253 virtual ::ndk::ScopedAStatus reset() = 0; 254 virtual ::ndk::ScopedAStatus start() = 0; 255 virtual ::ndk::ScopedAStatus stop() = 0; 256 virtual ::ndk::ScopedAStatus connectToInputSurface(const std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurface>& in_inputSurface, std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurfaceConnection>* _aidl_return) = 0; 257 virtual ::ndk::ScopedAStatus asInputSink(std::shared_ptr<::aidl::android::hardware::media::c2::IInputSink>* _aidl_return) = 0; 258 virtual ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) = 0; 259 virtual ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) = 0; 260 private: 261 static std::shared_ptr<IComponent> default_impl; 262 }; 263 class IComponentDefault : public IComponent { 264 public: 265 ::ndk::ScopedAStatus configureVideoTunnel(int32_t in_avSyncHwId, ::aidl::android::hardware::common::NativeHandle* _aidl_return) override; 266 ::ndk::ScopedAStatus createBlockPool(const ::aidl::android::hardware::media::c2::IComponent::BlockPoolAllocator& in_allocator, ::aidl::android::hardware::media::c2::IComponent::BlockPool* _aidl_return) override; 267 ::ndk::ScopedAStatus destroyBlockPool(int64_t in_blockPoolId) override; 268 ::ndk::ScopedAStatus drain(bool in_withEos) override; 269 ::ndk::ScopedAStatus flush(::aidl::android::hardware::media::c2::WorkBundle* _aidl_return) override; 270 ::ndk::ScopedAStatus getInterface(std::shared_ptr<::aidl::android::hardware::media::c2::IComponentInterface>* _aidl_return) override; 271 ::ndk::ScopedAStatus queue(const ::aidl::android::hardware::media::c2::WorkBundle& in_workBundle) override; 272 ::ndk::ScopedAStatus release() override; 273 ::ndk::ScopedAStatus reset() override; 274 ::ndk::ScopedAStatus start() override; 275 ::ndk::ScopedAStatus stop() override; 276 ::ndk::ScopedAStatus connectToInputSurface(const std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurface>& in_inputSurface, std::shared_ptr<::aidl::android::hardware::media::c2::IInputSurfaceConnection>* _aidl_return) override; 277 ::ndk::ScopedAStatus asInputSink(std::shared_ptr<::aidl::android::hardware::media::c2::IInputSink>* _aidl_return) override; 278 ::ndk::ScopedAStatus getInterfaceVersion(int32_t* _aidl_return) override; 279 ::ndk::ScopedAStatus getInterfaceHash(std::string* _aidl_return) override; 280 ::ndk::SpAIBinder asBinder() override; 281 bool isRemote() override; 282 }; 283 } // namespace c2 284 } // namespace media 285 } // namespace hardware 286 } // namespace android 287 } // namespace aidl 288