#pragma once #include #include #include #include namespace dmf_node { class PassthroughNode : public Node { public: PassthroughNode() = default; std::string type() const override { return "passthrough"; } std::vector input_ports() const override { return {{"video_in", PortDirection::Input, MediaType::VideoV210}}; } std::vector output_ports() const override { return {{"video_out", PortDirection::Output, MediaType::VideoV210}}; } void configure(const nlohmann::json& /*params*/) override {} void on_add_writer(const std::string& port_id, mxlFlowWriter writer) override; void on_add_reader(const std::string& port_id, mxlFlowReader reader) override; void on_remove_writer(const std::string& port_id) override; void on_remove_reader(const std::string& port_id) override; void process() override; nlohmann::json status() const override; private: std::optional reader_; std::optional writer_; mxlInstance mxl_instance_ = nullptr; uint64_t read_index_ = 0; uint64_t write_index_ = 0; uint64_t grains_processed_ = 0; }; } // namespace dmf_node