From: Joel Holdsworth Date: Sun, 16 Feb 2014 11:01:30 +0000 (+0000) Subject: Added a reference to the SigSession in DecoderStack X-Git-Tag: pulseview-0.2.0~42 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=bdc5c3b09d09781aa50ae3b128b2a7c6e2a53d5b;p=pulseview.git Added a reference to the SigSession in DecoderStack --- diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 9707d8d2..2c68ef80 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -58,7 +58,9 @@ const int64_t DecoderStack::DecodeChunkLength = 4096; mutex DecoderStack::_global_decode_mutex; -DecoderStack::DecoderStack(const srd_decoder *const dec) : +DecoderStack::DecoderStack(pv::SigSession &session, + const srd_decoder *const dec) : + _session(session), _samples_decoded(0) { _stack.push_back(shared_ptr( diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 339c1e03..6391e6a8 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -45,6 +45,8 @@ class TwoDecoderStack; namespace pv { +class SigSession; + namespace view { class LogicSignal; } @@ -68,7 +70,8 @@ private: static const int64_t DecodeChunkLength; public: - DecoderStack(const srd_decoder *const decoder); + DecoderStack(pv::SigSession &_session, + const srd_decoder *const decoder); virtual ~DecoderStack(); @@ -106,6 +109,7 @@ signals: void new_decode_data(); private: + pv::SigSession &_session; /** * This mutex prevents more than one decode operation occuring diff --git a/pv/sigsession.cpp b/pv/sigsession.cpp index cbb3192d..92118b48 100644 --- a/pv/sigsession.cpp +++ b/pv/sigsession.cpp @@ -215,7 +215,7 @@ bool SigSession::add_decoder(srd_decoder *const dec) // Create the decoder decoder_stack = shared_ptr( - new data::DecoderStack(dec)); + new data::DecoderStack(*this, dec)); // Make a list of all the probes std::vector all_probes;