X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.cpp;h=74ad7d362d0b2fe1e93dc31e928202b06689d23c;hb=8d3e0764def48fdf19dc9100c87bbb42da5a9d6d;hp=323f5cc2cd4b45397cf18e1cd59560dc0ef17f33;hpb=f9101a91fc942a28515872ae6c7285973bd54b91;p=pulseview.git diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 323f5cc2..74ad7d36 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -103,7 +103,7 @@ int64_t DecoderStack::samples_decoded() const return _samples_decoded; } -std::vector DecoderStack::get_rows() const +std::vector DecoderStack::get_visible_rows() const { lock_guard lock(_mutex); @@ -112,6 +112,9 @@ std::vector DecoderStack::get_rows() const BOOST_FOREACH (const shared_ptr &dec, _stack) { assert(dec); + if (!dec->shown()) + continue; + const srd_decoder *const decc = dec->decoder(); assert(dec->decoder()); @@ -243,11 +246,17 @@ void DecoderStack::decode_proc(shared_ptr data) assert(data); + // Check we have a snapshot of data const deque< shared_ptr > &snapshots = data->get_snapshots(); if (snapshots.empty()) return; + // Check that all decoders have the required probes + BOOST_FOREACH(const shared_ptr &dec, _stack) + if (!dec->have_required_probes()) + return; + const shared_ptr &snapshot = snapshots.front(); const int64_t sample_count = snapshot->get_sample_count();