-#include <pv/data/logic.h>
-#include <pv/data/logicsnapshot.h>
-#include <pv/data/decode/decoder.h>
-#include <pv/data/decode/annotation.h>
-#include <pv/sigsession.h>
-#include <pv/view/logicsignal.h>
+#include <pv/data/logic.hpp>
+#include <pv/data/logicsegment.hpp>
+#include <pv/data/decode/decoder.hpp>
+#include <pv/data/decode/annotation.hpp>
+#include <pv/session.hpp>
+#include <pv/view/logicsignal.hpp>
const int64_t DecoderStack::DecodeChunkLength = 4096;
const unsigned int DecoderStack::DecodeNotifyPeriod = 65536;
const int64_t DecoderStack::DecodeChunkLength = 4096;
const unsigned int DecoderStack::DecodeNotifyPeriod = 65536;
const Row &row, uint64_t start_sample,
uint64_t end_sample) const
{
const Row &row, uint64_t start_sample,
uint64_t end_sample) const
{
(*iter).second.get_annotation_subset(dest,
start_sample, end_sample);
}
QString DecoderStack::error_message()
{
(*iter).second.get_annotation_subset(dest,
start_sample, end_sample);
}
QString DecoderStack::error_message()
{
const Row row(decc, ann_row);
// Add a new empty row data object
const Row row(decc, ann_row);
// Add a new empty row data object
GPOINTER_TO_INT(ll->data))] = row;
}
}
// We get the logic data of the first channel in the list.
// This works because we are currently assuming all
GPOINTER_TO_INT(ll->data))] = row;
}
}
// We get the logic data of the first channel in the list.
// This works because we are currently assuming all
if (dec && !dec->channels().empty() &&
((logic_signal = (*dec->channels().begin()).second)) &&
((data = logic_signal->logic_data())))
if (dec && !dec->channels().empty() &&
((logic_signal = (*dec->channels().begin()).second)) &&
((data = logic_signal->logic_data())))
- // Check we have a snapshot of data
- const deque< shared_ptr<pv::data::LogicSnapshot> > &snapshots =
- data->get_snapshots();
- if (snapshots.empty())
+ // Check we have a segment of data
+ const deque< shared_ptr<pv::data::LogicSegment> > &segments =
+ data->logic_segments();
+ if (segments.empty())
- _start_time = data->get_start_time();
- _samplerate = data->samplerate();
- if (_samplerate == 0.0)
- _samplerate = 1.0;
+ start_time_ = segment_->start_time();
+ samplerate_ = segment_->samplerate();
+ if (samplerate_ == 0.0)
+ samplerate_ = 1.0;
max_sample_count = max(max_sample_count,
(*i).second.get_max_sample());
max_sample_count = max(max_sample_count,
(*i).second.get_max_sample());
- unique_lock<mutex> input_lock(_input_mutex);
- while(!_interrupt && !_frame_complete &&
- _samples_decoded >= _sample_count)
- _input_cond.wait(input_lock);
- return boost::make_optional(!_interrupt &&
- (_samples_decoded < _sample_count || !_frame_complete),
- _sample_count);
+ unique_lock<mutex> input_lock(input_mutex_);
+ while(!interrupt_ && !frame_complete_ &&
+ samples_decoded_ >= sample_count_)
+ input_cond_.wait(input_lock);
+ return boost::make_optional(!interrupt_ &&
+ (samples_decoded_ < sample_count_ || !frame_complete_),
+ sample_count_);
const int64_t chunk_end = min(
i + chunk_sample_count, sample_count);
const int64_t chunk_end = min(
i + chunk_sample_count, sample_count);
if (srd_session_send(session, i, i + sample_count, chunk,
(chunk_end - i) * unit_size) != SRD_OK) {
if (srd_session_send(session, i, i + sample_count, chunk,
(chunk_end - i) * unit_size) != SRD_OK) {
- unique_lock<mutex> input_lock(_input_mutex);
- sample_count = _sample_count = _snapshot->get_sample_count();
+ unique_lock<mutex> input_lock(input_mutex_);
+ sample_count = sample_count_ = segment_->get_sample_count();
srd_pd_output_callback_add(session, SRD_OUTPUT_ANN,
DecoderStack::annotation_callback, this);
srd_pd_output_callback_add(session, SRD_OUTPUT_ANN,
DecoderStack::annotation_callback, this);
- const auto r = d->_class_rows.find(make_pair(decc, a.format()));
- if (r != d->_class_rows.end())
- row_iter = d->_rows.find((*r).second);
+ const auto r = d->class_rows_.find(make_pair(decc, a.format()));
+ if (r != d->class_rows_.end())
+ row_iter = d->rows_.find((*r).second);
qDebug() << "Unexpected annotation: decoder = " << decc <<
", format = " << a.format();
assert(0);
qDebug() << "Unexpected annotation: decoder = " << decc <<
", format = " << a.format();
assert(0);