X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fmain.cpp;h=ab9435b129bbdad2dbb258a84423af71e3bdce11;hb=7dc59fc4a38b6032158d2551cd3c449fe5e87e62;hp=080ef64376e5fe69d66dcbfc5402f909cb6debc1;hpb=1060e9b5f80cde2c6b6cb18ded1fdbe0862c7796;p=libsigrokflow.git diff --git a/src/main.cpp b/src/main.cpp index 080ef64..ab9435b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,11 +19,8 @@ */ #include -#include - -#include - #include +#include namespace Srf { @@ -50,11 +47,13 @@ void init() sigc::ptr_fun(&LegacyOutput::register_element), "0.01", "GPL", "sigrok", "libsigrokflow", "http://sigrok.org"); #endif +#ifdef HAVE_LIBSIGROKDECODE Gst::Plugin::register_static(GST_VERSION_MAJOR, GST_VERSION_MINOR, "sigrok_legacy_decoder", "Wrapper for protocol decoders using legacy libsigrokdecode APIs", sigc::ptr_fun(&LegacyDecoder::register_element), "0.01", "GPL", "sigrok", "libsigrokflow", "http://sigrok.org"); +#endif } Sink::Sink(GstBaseSink *gobj) : @@ -350,6 +349,7 @@ bool LegacyOutput::stop_vfunc() } #endif +#ifdef HAVE_LIBSIGROKDECODE void LegacyDecoder::class_init(Gst::ElementClass *klass) { klass->set_metadata("sigrok legacy decoder", @@ -418,5 +418,6 @@ bool LegacyDecoder::stop_vfunc() srd_session_terminate_reset(_session); return true; } +#endif }