]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decoderstack.cpp
DecoderStack: Emancipate from SignalData
[pulseview.git] / pv / data / decoderstack.cpp
index c179b24a85701f548468ae244019444700af21e8..bb2818bb79aab0d2c336a0045d5e0a0eb3c2a5a6 100644 (file)
@@ -62,6 +62,8 @@ mutex DecoderStack::global_decode_mutex_;
 DecoderStack::DecoderStack(pv::Session &session,
        const srd_decoder *const dec) :
        session_(session),
+       start_time_(0),
+       samplerate_(0),
        sample_count_(0),
        frame_complete_(false),
        samples_decoded_(0)
@@ -112,6 +114,16 @@ void DecoderStack::remove(int index)
        stack_.erase(iter);
 }
 
+double DecoderStack::samplerate() const
+{
+       return samplerate_;
+}
+
+double DecoderStack::start_time() const
+{
+       return start_time_;
+}
+
 int64_t DecoderStack::samples_decoded() const
 {
        lock_guard<mutex> decode_lock(output_mutex_);
@@ -245,7 +257,7 @@ void DecoderStack::begin_decode()
 
        // Check we have a snapshot of data
        const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =
-               data->get_snapshots();
+               data->logic_snapshots();
        if (snapshots.empty())
                return;
        snapshot_ = snapshots.front();