summaryrefslogtreecommitdiffstats
path: root/src/hid_core/irsensor/processor_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hid_core/irsensor/processor_base.h')
-rw-r--r--src/hid_core/irsensor/processor_base.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/hid_core/irsensor/processor_base.h b/src/hid_core/irsensor/processor_base.h
new file mode 100644
index 000000000..48beeafba
--- /dev/null
+++ b/src/hid_core/irsensor/processor_base.h
@@ -0,0 +1,33 @@
+// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
+
+#include "common/common_types.h"
+#include "hid_core/irsensor/irs_types.h"
+
+namespace Service::IRS {
+class ProcessorBase {
+public:
+ explicit ProcessorBase();
+ virtual ~ProcessorBase();
+
+ virtual void StartProcessor() = 0;
+ virtual void SuspendProcessor() = 0;
+ virtual void StopProcessor() = 0;
+
+ bool IsProcessorActive() const;
+
+protected:
+ /// Returns the number of bytes the image uses
+ std::size_t GetDataSize(Core::IrSensor::ImageTransferProcessorFormat format) const;
+
+ /// Returns the width of the image
+ std::size_t GetDataWidth(Core::IrSensor::ImageTransferProcessorFormat format) const;
+
+ /// Returns the height of the image
+ std::size_t GetDataHeight(Core::IrSensor::ImageTransferProcessorFormat format) const;
+
+ bool is_active{false};
+};
+} // namespace Service::IRS