#ifndef TRACKNODE_HPP__
#define TRACKNODE_HPP__

#include "nodes/base/base.hpp"
#include <opencv2/opencv.hpp>
#include "common/meta.hpp"
#include "common/data.hpp"
#include "BYTETracker.h"
#include "infer/infer.hpp"

namespace Node
{

class TrackNode : public BaseNode
{
public:
    TrackNode() = delete;
    TrackNode(const std::string& name, int frame_rate, int track_buffer) : BaseNode(name, NODE_TYPE::MID_NODE) 
    {
        track_ = std::make_shared<BYTETracker>(frame_rate, track_buffer);
    }
    virtual ~TrackNode()  { stop(); };
    void work() override;

private:
    std::shared_ptr<BYTETracker> track_ = nullptr;
};

}

#endif