SR_VAR_OPT_PKG([SRF_PKGLIBS], [srf_deps_avail])
SR_ARG_OPT_PKG([libsigrokcxx], [LIBSIGROKCXX], , [libsigrokcxx >= 0.5.1])
+SR_ARG_OPT_PKG([libsigrokdecode], [LIBSIGROKDECODE], , [libsigrokdecode >= 0.5.1])
AC_LANG([C++])
SR_ARG_ENABLE_WARNINGS([SRF_WXXFLAGS], [-Wall], [-Wall -Wextra])
#ifdef HAVE_LIBSIGROKCXX
#include <libsigrokcxx/libsigrokcxx.hpp>
#endif
+#ifdef HAVE_LIBSIGROKDECODE
#include <libsigrokdecode/libsigrokdecode.h>
+#endif
namespace Srf
{
};
#endif
+#ifdef HAVE_LIBSIGROKDECODE
class LegacyDecoder :
public Sink
{
uint64_t _abs_ss;
uint64_t _unitsize;
};
+#endif
}
#endif
*/
#include <config.h>
-#include <libsigrokflow/libsigrokflow.hpp>
-
-#include <libsigrokdecode/libsigrokdecode.h>
-
#include <iostream>
+#include <libsigrokflow/libsigrokflow.hpp>
namespace Srf
{
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) :
}
#endif
+#ifdef HAVE_LIBSIGROKDECODE
void LegacyDecoder::class_init(Gst::ElementClass<LegacyDecoder> *klass)
{
klass->set_metadata("sigrok legacy decoder",
srd_session_terminate_reset(_session);
return true;
}
+#endif
}