From: Martin Ling Date: Mon, 15 Apr 2013 20:23:39 +0000 (+0100) Subject: Update for libsigrok datafeed callback API changes. X-Git-Tag: pulseview-0.1.0~43 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5045f16d20921a6befc0c367a77a1cb838d9278e;p=pulseview.git Update for libsigrok datafeed callback API changes. --- diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index 94867959..9c03b882 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -138,7 +138,7 @@ void SigSession::load_thread_proc(const string name, return; } - sr_session_datafeed_callback_add(data_feed_in_proc); + sr_session_datafeed_callback_add(data_feed_in_proc, NULL); if (sr_session_start() != SR_OK) { error_handler(tr("Failed to start session.")); @@ -161,7 +161,7 @@ void SigSession::sample_thread_proc(struct sr_dev_inst *sdi, assert(error_handler); sr_session_new(); - sr_session_datafeed_callback_add(data_feed_in_proc); + sr_session_datafeed_callback_add(data_feed_in_proc, NULL); if (sr_session_dev_add(sdi) != SR_OK) { error_handler(tr("Failed to use device.")); @@ -387,8 +387,9 @@ void SigSession::data_feed_in(const struct sr_dev_inst *sdi, } void SigSession::data_feed_in_proc(const struct sr_dev_inst *sdi, - const struct sr_datafeed_packet *packet) + const struct sr_datafeed_packet *packet, void *cb_data) { + (void) cb_data; assert(_session); _session->data_feed_in(sdi, packet); } diff --git a/pv/sigsession.h b/pv/sigsession.h index b2dc4676..8520a1e7 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -102,7 +102,7 @@ private: const struct sr_datafeed_packet *packet); static void data_feed_in_proc(const struct sr_dev_inst *sdi, - const struct sr_datafeed_packet *packet); + const struct sr_datafeed_packet *packet, void *cb_data); private: mutable boost::mutex _sampling_mutex;