34 lines
744 B
C++
34 lines
744 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "node.h"
|
|
|
|
namespace rk3588 {
|
|
|
|
class RegionEventNode final : public INode {
|
|
public:
|
|
RegionEventNode();
|
|
~RegionEventNode() override;
|
|
|
|
std::string Id() const override;
|
|
std::string Type() const override;
|
|
bool Init(const SimpleJson& config, const NodeContext& ctx) override;
|
|
bool Start() override;
|
|
void Stop() override;
|
|
NodeStatus Process(FramePtr frame) override;
|
|
|
|
private:
|
|
void EnsureBehaviorEvents(Frame& frame);
|
|
void PushToDownstream(const FramePtr& frame);
|
|
|
|
struct Impl;
|
|
std::unique_ptr<Impl> impl_;
|
|
std::string id_;
|
|
std::vector<std::shared_ptr<SpscQueue<FramePtr>>> output_queues_;
|
|
};
|
|
|
|
} // namespace rk3588
|