X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrokflow%2Flibsigrokflow.hpp;h=2c13cb4be875b77e6d1ef78624c258143589d3c2;hb=6d71d36a6150cc76ac2408a7a41dcd473328e4fa;hp=4f0fcdb78392b1432b43754ff6ea9d13827f2c03;hpb=d75c9a6aab73eec3921cb951c3253afc4269ccb3;p=libsigrokflow.git diff --git a/include/libsigrokflow/libsigrokflow.hpp b/include/libsigrokflow/libsigrokflow.hpp index 4f0fcdb..2c13cb4 100644 --- a/include/libsigrokflow/libsigrokflow.hpp +++ b/include/libsigrokflow/libsigrokflow.hpp @@ -39,18 +39,24 @@ class GstBlock : public Gst::Element { /* Operations specific to sigrok GStreamer blocks go here. */ +protected: + explicit GstBlock(GstElement *gobj); }; class Device : public GstBlock { /* Operations specific to hardware devices go here */ +protected: + explicit Device(GstElement *gobj); }; class CaptureDevice : public Device { /* Operations specific to capture (source) devices go here */ +protected: + explicit CaptureDevice(GstElement *gobj); }; class LegacyCaptureDevice : @@ -66,6 +72,15 @@ public: /* Override state change */ Gst::StateChangeReturn change_state_vfunc(Gst::StateChange transition); + + /* 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 LegacyCaptureDevice(GstElement *gobj); private: shared_ptr _libsigrok_device; Glib::RefPtr _src_pad;