X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrokflow%2Flibsigrokflow.hpp;h=5e8f48346793209a1ad32b61bdaffb71d0d08d9a;hb=92d521e768ce580d32f9ea7154d69a935222e48c;hp=cbae5c7e1adc371d7d5e57749b882e5114d900c7;hpb=f1eaad84b65e3d8d6704a199a51e8bb43b63ea82;p=libsigrokflow.git diff --git a/include/libsigrokflow/libsigrokflow.hpp b/include/libsigrokflow/libsigrokflow.hpp index cbae5c7..5e8f483 100644 --- a/include/libsigrokflow/libsigrokflow.hpp +++ b/include/libsigrokflow/libsigrokflow.hpp @@ -96,6 +96,45 @@ private: void _run(); }; +class LegacyInput : + public Gst::Element +{ +public: + /* Create from libsigrok input */ + static Glib::RefPtr create( + shared_ptr format, + map options = map()); + + /* Override start */ + bool start_vfunc(); + + /* Chain function */ + Gst::FlowReturn chain(const Glib::RefPtr &pad, + const Glib::RefPtr &buf); + + /* Override stop */ + bool stop_vfunc(); + + /* Gst class init */ + static void class_init(Gst::ElementClass *klass); + + /* Register class with plugin */ + static bool register_element(Glib::RefPtr plugin); + + /* Construcor used by element factory */ + explicit LegacyInput(GstElement *gobj); +private: + shared_ptr _libsigrok_input_format; + shared_ptr _libsigrok_input; + shared_ptr _session; + map _options; + Glib::RefPtr _sink_pad; + Glib::RefPtr _src_pad; + + void _datafeed_callback(shared_ptr device, + shared_ptr packet); +}; + class LegacyOutput : public Sink {