+ // Create the decoder instance
+ srd_decoder_inst *const decoder_inst = srd_inst_new(
+ session, _decoder->id, _options);
+ if(!decoder_inst) {
+ _error_message = tr("Failed to initialise decoder");
+ return;
+ }
+
+ decoder_inst->data_samplerate = _samplerate;
+
+ // Setup the probes
+ GHashTable *const probes = g_hash_table_new_full(g_str_hash,
+ g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+
+ for(map<const srd_probe*, shared_ptr<view::LogicSignal> >::
+ const_iterator i = _probes.begin();
+ i != _probes.end(); i++)
+ {
+ shared_ptr<view::Signal> signal((*i).second);
+ GVariant *const gvar = g_variant_new_int32(
+ signal->probe()->index);
+ g_variant_ref_sink(gvar);
+ g_hash_table_insert(probes, (*i).first->id, gvar);
+ }
+
+ srd_inst_probe_set_all(decoder_inst, probes);
+
+ // Start the session
+ srd_session_start(session);
+