X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.cpp;h=f0bdd6bd4f6e3556a3777e7cabfea49d06b2acc6;hb=a007f5ad25bad88cf62443d5471449ce8a6f5f29;hp=7bd5e6e6c2431d4e182fbfe051aa2dc08357a577;hpb=7aa09b00585d5214cd91e77f1f1611e69f93d711;p=pulseview.git diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 7bd5e6e6..f0bdd6bd 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -141,8 +141,16 @@ void DecoderStack::begin_decode() data); } -void DecoderStack::clear_snapshots() +void DecoderStack::clear() { + _annotations.clear(); +} + +uint64_t DecoderStack::get_max_sample_count() const +{ + if (_annotations.empty()) + return 0; + return _annotations.back()->end_sample(); } void DecoderStack::decode_proc(shared_ptr data)