Decoder::Decoder(const srd_decoder *const dec,
std::map<const srd_probe*,
- boost::shared_ptr<pv::view::Signal> > probes) :
+ boost::shared_ptr<pv::view::Signal> > probes,
+ GHashTable *options) :
_decoder(dec),
_probes(probes),
+ _options(options),
_decoder_inst(NULL)
{
init_decoder();
{
_decode_thread.interrupt();
_decode_thread.join();
+
+ g_hash_table_destroy(_options);
}
const srd_decoder* Decoder::get_decoder() const
}
}
- _decoder_inst = srd_inst_new(_decoder->id, NULL);
- assert(_decoder_inst);
+ _decoder_inst = srd_inst_new(_decoder->id, _options);
+ if(!_decoder_inst) {
+ qDebug() << "Failed to initialise decoder";
+ return;
+ }
_decoder_inst->data_samplerate = _samplerate;
shared_ptr<Annotation> a(new Annotation(pdata));
lock_guard<mutex> lock(d->_annotations_mutex);
d->_annotations.push_back(a);
+
+ d->new_decode_data();
}
} // namespace data