#include <gst/gst.h>

#include <fstream>
#include <iostream>

#include "config_manager.hpp"
#include "gstnvdsmeta.h"
#include "nvdsmeta_schema.h"

class NvMessageConverter {
   private:
   public:
    gint frame_interval;
    std::string payload_generation_library;
    GstElement *msgconv = NULL;
    std::string msgconv_config_file;
    NvMessageConverter();
    bool create_message_converter();
    ~NvMessageConverter();
    void attach_probe_to_sink_msgconv();
    static GstPadProbeReturn nvmsgconv_probe_cb_sink(GstPad *,
                                                     GstPadProbeInfo *,
                                                     gpointer);
    void attach_probe_to_src_msgconv();
    static GstPadProbeReturn nvmsgconv_probe_cb_src(GstPad *, GstPadProbeInfo *,
                                                    gpointer);
};