+ lock_guard<mutex> lock(output_mutex_);
+
+ vector<Row> rows;
+
+ for (const shared_ptr<decode::Decoder> &dec : stack_) {
+ assert(dec);
+ if (!dec->shown())
+ continue;
+
+ const srd_decoder *const decc = dec->decoder();
+ assert(dec->decoder());
+
+ // Add a row for the decoder if it doesn't have a row list
+ if (!decc->annotation_rows)
+ rows.emplace_back(decc);
+
+ // Add the decoder rows
+ for (const GSList *l = decc->annotation_rows; l; l = l->next) {
+ const srd_decoder_annotation_row *const ann_row =
+ (srd_decoder_annotation_row *)l->data;
+ assert(ann_row);
+ rows.emplace_back(decc, ann_row);
+ }
+ }
+
+ return rows;
+}
+
+void DecoderStack::get_annotation_subset(
+ std::vector<pv::data::decode::Annotation> &dest,
+ const Row &row, uint64_t start_sample,
+ uint64_t end_sample) const
+{
+ lock_guard<mutex> lock(output_mutex_);
+
+ const auto iter = rows_.find(row);
+ if (iter != rows_.end())
+ (*iter).second.get_annotation_subset(dest,
+ start_sample, end_sample);