| #ifndef HIDL_GENERATED_ANDROID_HARDWARE_MEDIA_OMX_V1_0_BSGRAPHICBUFFERSOURCE_H |
| #define HIDL_GENERATED_ANDROID_HARDWARE_MEDIA_OMX_V1_0_BSGRAPHICBUFFERSOURCE_H |
| |
| #include <android-base/macros.h> |
| #include <cutils/trace.h> |
| #include <future> |
| #include <android/hardware/media/omx/1.0/IGraphicBufferSource.h> |
| |
| #include <hidl/HidlPassthroughSupport.h> |
| #include <hidl/TaskRunner.h> |
| namespace android { |
| namespace hardware { |
| namespace media { |
| namespace omx { |
| namespace V1_0 { |
| |
| struct BsGraphicBufferSource : IGraphicBufferSource, ::android::hardware::details::HidlInstrumentor { |
| explicit BsGraphicBufferSource(const ::android::sp<IGraphicBufferSource> impl); |
| |
| /** |
| * The pure class is what this class wraps. |
| */ |
| typedef IGraphicBufferSource Pure; |
| |
| typedef ::android::hardware::details::bs_tag _hidl_tag; |
| |
| // Methods from ::android::hardware::media::omx::V1_0::IGraphicBufferSource follow. |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> configure(const ::android::sp<::android::hardware::media::omx::V1_0::IOmxNode>& omxNode, ::android::hardware::graphics::common::V1_0::Dataspace dataspace) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::configure::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&omxNode); |
| _hidl_args.push_back((void *)&dataspace); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "configure", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::sp<::android::hardware::media::omx::V1_0::IOmxNode> _hidl_wrapped_omxNode; |
| if (omxNode != nullptr && !omxNode->isRemote()) { |
| _hidl_wrapped_omxNode = ::android::hardware::details::wrapPassthrough(omxNode); |
| if (_hidl_wrapped_omxNode == nullptr) { |
| return ::android::hardware::Status::fromExceptionCode( |
| ::android::hardware::Status::EX_TRANSACTION_FAILED, |
| "Cannot wrap passthrough interface."); |
| } |
| } else { |
| _hidl_wrapped_omxNode = omxNode; |
| } |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->configure(_hidl_wrapped_omxNode, dataspace); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "configure", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setSuspend(bool suspend, int64_t timeUs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setSuspend::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&suspend); |
| _hidl_args.push_back((void *)&timeUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setSuspend", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setSuspend(suspend, timeUs); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setSuspend", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setRepeatPreviousFrameDelayUs(int64_t repeatAfterUs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setRepeatPreviousFrameDelayUs::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&repeatAfterUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setRepeatPreviousFrameDelayUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setRepeatPreviousFrameDelayUs(repeatAfterUs); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setRepeatPreviousFrameDelayUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setMaxFps(float maxFps) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setMaxFps::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&maxFps); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setMaxFps", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setMaxFps(maxFps); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setMaxFps", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setTimeLapseConfig(double fps, double captureFps) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setTimeLapseConfig::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&fps); |
| _hidl_args.push_back((void *)&captureFps); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setTimeLapseConfig", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setTimeLapseConfig(fps, captureFps); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setTimeLapseConfig", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setStartTimeUs(int64_t startTimeUs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setStartTimeUs::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&startTimeUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setStartTimeUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setStartTimeUs(startTimeUs); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setStartTimeUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setStopTimeUs(int64_t stopTimeUs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setStopTimeUs::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&stopTimeUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setStopTimeUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setStopTimeUs(stopTimeUs); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setStopTimeUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getStopTimeOffsetUs(getStopTimeOffsetUs_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::getStopTimeOffsetUs::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "getStopTimeOffsetUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getStopTimeOffsetUs([&](const auto &_hidl_out_status, const auto &_hidl_out_stopTimeOffsetUs) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| _hidl_args.push_back((void *)&_hidl_out_stopTimeOffsetUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "getStopTimeOffsetUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_status, _hidl_out_stopTimeOffsetUs); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setColorAspects(const ::android::hardware::media::omx::V1_0::ColorAspects& aspects) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setColorAspects::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&aspects); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setColorAspects", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setColorAspects(aspects); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setColorAspects", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> setTimeOffsetUs(int64_t timeOffsetUs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::setTimeOffsetUs::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&timeOffsetUs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setTimeOffsetUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setTimeOffsetUs(timeOffsetUs); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "setTimeOffsetUs", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::media::omx::V1_0::Status> signalEndOfInputStream() override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::signalEndOfInputStream::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "signalEndOfInputStream", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->signalEndOfInputStream(); |
| |
| ::android::hardware::media::omx::V1_0::Status _hidl_out_status = _hidl_return; |
| (void) _hidl_out_status; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_status); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.media.omx", "1.0", "IGraphicBufferSource", "signalEndOfInputStream", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| |
| // Methods from ::android::hidl::base::V1_0::IBase follow. |
| ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::interfaceChain::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->interfaceChain([&](const auto &_hidl_out_descriptors) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_descriptors); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_descriptors); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::debug::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&fd); |
| _hidl_args.push_back((void *)&options); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->debug(fd, options); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::interfaceDescriptor::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->interfaceDescriptor([&](const auto &_hidl_out_descriptor) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_descriptor); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_descriptor); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::getHashChain::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getHashChain([&](const auto &_hidl_out_hashchain) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_hashchain); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_hashchain); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> setHALInstrumentation() override { |
| configureInstrumentation(); |
| return ::android::hardware::Void(); |
| } |
| |
| ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::linkToDeath::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&recipient); |
| _hidl_args.push_back((void *)&cookie); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->linkToDeath(recipient, cookie); |
| |
| bool _hidl_out_success = _hidl_return; |
| (void) _hidl_out_success; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_success); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> ping() override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::ping::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->ping(); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::getDebugInfo::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getDebugInfo([&](const auto &_hidl_out_info) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_info); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_info); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> notifySyspropsChanged() override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::notifySyspropsChanged::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = addOnewayTask([mImpl = this->mImpl |
| #ifdef __ANDROID_DEBUGGABLE__ |
| , mEnableInstrumentation = this->mEnableInstrumentation, mInstrumentationCallbacks = this->mInstrumentationCallbacks |
| #endif // __ANDROID_DEBUGGABLE__ |
| ] { |
| mImpl->notifySyspropsChanged(); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| }); |
| return _hidl_return; |
| } |
| ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::IGraphicBufferSource::unlinkToDeath::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&recipient); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->unlinkToDeath(recipient); |
| |
| bool _hidl_out_success = _hidl_return; |
| (void) _hidl_out_success; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_success); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| |
| private: |
| const ::android::sp<IGraphicBufferSource> mImpl; |
| ::android::hardware::details::TaskRunner mOnewayQueue; |
| |
| ::android::hardware::Return<void> addOnewayTask(std::function<void(void)>); |
| |
| }; |
| |
| } // namespace V1_0 |
| } // namespace omx |
| } // namespace media |
| } // namespace hardware |
| } // namespace android |
| |
| #endif // HIDL_GENERATED_ANDROID_HARDWARE_MEDIA_OMX_V1_0_BSGRAPHICBUFFERSOURCE_H |