+ if (decode_thread_.joinable()) {
+ interrupt_ = true;
+ input_cond_.notify_one();
+ decode_thread_.join();
+ }
+
+ clear();
+
+ // Check that all decoders have the required channels
+ for (const shared_ptr<decode::Decoder> &dec : stack_)
+ if (!dec->have_required_channels()) {
+ error_message_ = tr("One or more required channels "
+ "have not been specified");
+ return;
+ }
+
+ // Add classes
+ for (const shared_ptr<decode::Decoder> &dec : stack_)
+ {
+ assert(dec);
+ 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_[Row(decc)] = decode::RowData();
+
+ // 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);
+
+ const Row row(decc, ann_row);