/*
* This file is part of the libsigrokflow project.
*
+ * Copyright (C) 2018 Martin Ling <martin-sigrok@earth.li>
* Copyright (C) 2018 Uwe Hermann <uwe@hermann-uwe.de>
*
* This program is free software: you can redistribute it and/or modify
#include <gstreamermm/private/element_p.h>
#include <gstreamermm/private/basesink_p.h>
#include <libsigrokcxx/libsigrokcxx.hpp>
+#include <libsigrokdecode/libsigrokdecode.h>
namespace Srf
{
map<string, Glib::VariantBase> _options;
};
+class LegacyDecoder :
+ public Sink
+{
+public:
+ static Glib::RefPtr<LegacyDecoder> create(
+ struct srd_session *libsigrokdecode_session, uint64_t unitsize);
+
+ /* Retrieve libsigrokdecode session */
+ struct srd_session *libsigrokdecode_session();
+
+ /* Override start */
+ bool start_vfunc();
+
+ /* Override render */
+ Gst::FlowReturn render_vfunc(const Glib::RefPtr<Gst::Buffer> &buffer);
+
+ /* Override stop */
+ bool stop_vfunc();
+
+ /* Gst class init */
+ static void class_init(Gst::ElementClass<LegacyDecoder> *klass);
+
+ /* Register class with plugin */
+ static bool register_element(Glib::RefPtr<Gst::Plugin> plugin);
+
+ /* Constructor used by element factory */
+ explicit LegacyDecoder(GstBaseSink *gobj);
+private:
+ struct srd_session *_session;
+ uint64_t _abs_ss;
+ uint64_t _unitsize;
+};
}
#endif