From: Martin Ling Date: Wed, 9 Jan 2019 23:25:43 +0000 (+0000) Subject: Use a dummy device for LegacyOutput. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=107a0d0c47ee2e59bed233ceb63ff31fc1e79f97;p=libsigrokflow.git Use a dummy device for LegacyOutput. --- diff --git a/include/libsigrokflow/libsigrokflow.hpp b/include/libsigrokflow/libsigrokflow.hpp index e084e35..c27ce78 100644 --- a/include/libsigrokflow/libsigrokflow.hpp +++ b/include/libsigrokflow/libsigrokflow.hpp @@ -155,7 +155,6 @@ public: /* Create from libsigrok output object. */ static Glib::RefPtr create( shared_ptr libsigrok_output_format, - shared_ptr libsigrok_device, map options = map()); /* Override start. */ diff --git a/src/legacy_output.cpp b/src/legacy_output.cpp index 95e9320..6e32c8b 100644 --- a/src/legacy_output.cpp +++ b/src/legacy_output.cpp @@ -58,7 +58,6 @@ LegacyOutput::LegacyOutput(GstBaseSink *gobj) : Glib::RefPtrLegacyOutput::create( shared_ptr libsigrok_output_format, - shared_ptr libsigrok_device, map options) { auto element = Gst::ElementFactory::create_element("sigrok_legacy_output"); @@ -66,7 +65,8 @@ Glib::RefPtrLegacyOutput::create( throw runtime_error("Failed to create element - plugin not registered?"); auto output = Glib::RefPtr::cast_static(element); output->libsigrok_output_format_ = libsigrok_output_format; - output->libsigrok_device_ = libsigrok_device; + auto context = libsigrok_output_format->parent(); + output->libsigrok_device_ = context->create_user_device("Vendor", "Model", "Version"); output->options_ = options; return output;