#include <pv/data/logicsnapshot.hpp>
#include <pv/data/decode/decoder.hpp>
#include <pv/data/decode/annotation.hpp>
-#include <pv/sigsession.hpp>
+#include <pv/session.hpp>
#include <pv/view/logicsignal.hpp>
using std::lock_guard;
mutex DecoderStack::global_decode_mutex_;
-DecoderStack::DecoderStack(pv::SigSession &session,
+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)
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_);
// 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();
// Get the samplerate and start time
- start_time_ = data->get_start_time();
+ start_time_ = snapshot_->start_time();
samplerate_ = data->samplerate();
if (samplerate_ == 0.0)
samplerate_ = 1.0;
assert(decc);
auto row_iter = d->rows_.end();
-
+
// Try looking up the sub-row of this class
const auto r = d->class_rows_.find(make_pair(decc, a.format()));
if (r != d->class_rows_.end())