]> sigrok.org Git - libsigrokflow.git/commitdiff
Use a dummy device for LegacyOutput.
authorMartin Ling <redacted>
Wed, 9 Jan 2019 23:25:43 +0000 (23:25 +0000)
committerMartin Ling <redacted>
Wed, 9 Jan 2019 23:25:43 +0000 (23:25 +0000)
include/libsigrokflow/libsigrokflow.hpp
src/legacy_output.cpp

index e084e35cc39afd857a2841ae3ad668d7c794413d..c27ce789b89e8f0378ab6082b4cbeafd412338e2 100644 (file)
@@ -155,7 +155,6 @@ 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. */
index 95e932025f1764c8b0145df291119638789cd35f..6e32c8bb309fae8a836bca240124d73c0cf7069b 100644 (file)
@@ -58,7 +58,6 @@ LegacyOutput::LegacyOutput(GstBaseSink *gobj) :
 
 Glib::RefPtr<LegacyOutput>LegacyOutput::create(
        shared_ptr<sigrok::OutputFormat> libsigrok_output_format,
-       shared_ptr<sigrok::Device> libsigrok_device,
        map<string, Glib::VariantBase> options)
 {
        auto element = Gst::ElementFactory::create_element("sigrok_legacy_output");
@@ -66,7 +65,8 @@ Glib::RefPtr<LegacyOutput>LegacyOutput::create(
                throw runtime_error("Failed to create element - plugin not registered?");
        auto output = Glib::RefPtr<LegacyOutput>::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;