+class LegacyOutput :
+ public Sink
+{
+public:
+ /* Create from libsigrok output object. */
+ static Glib::RefPtr<LegacyOutput> create(
+ shared_ptr<sigrok::OutputFormat> libsigrok_output_format,
+ shared_ptr<sigrok::Device> libsigrok_device,
+ map<string, Glib::VariantBase> options = map<string, Glib::VariantBase>());
+
+ /* 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<LegacyOutput> *klass);
+
+ /* Register class with plugin. */
+ static bool register_element(Glib::RefPtr<Gst::Plugin> plugin);
+
+ /* Constructor used by element factory. */
+ explicit LegacyOutput(GstBaseSink *gobj);
+
+private:
+ shared_ptr<sigrok::OutputFormat> libsigrok_output_format_;
+ shared_ptr<sigrok::Device> libsigrok_device_;
+ shared_ptr<sigrok::Output> libsigrok_output_;
+ map<string, Glib::VariantBase> options_;
+};
+#endif
+
+#ifdef HAVE_LIBSIGROKDECODE
+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 unitsite_;
+};
+#endif