X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecoder.cpp;fp=pv%2Fdata%2Fdecoder.cpp;h=9e7145f34fe4ffd2c715f141d9701dfb4b0b7a38;hp=133fcd19d44b1f9a0c9fec43b94283a418628cf9;hb=f00fc2a9e1cc85888a732de9f981f50ce957e5f1;hpb=2ec05cc6cdb6b34f99e9dc82d123d3d0b41d6690 diff --git a/pv/data/decoder.cpp b/pv/data/decoder.cpp index 133fcd19..9e7145f3 100644 --- a/pv/data/decoder.cpp +++ b/pv/data/decoder.cpp @@ -149,11 +149,7 @@ void Decoder::decode_proc(shared_ptr data) srd_session_new(&session); assert(session); - srd_session_config_set(session, SRD_CONF_NUM_PROBES, - g_variant_new_uint64(_probes.size())); - srd_session_config_set(session, SRD_CONF_UNITSIZE, - g_variant_new_uint64(snapshot->unit_size())); - srd_session_config_set(session, SRD_CONF_SAMPLERATE, + srd_session_metadata_set(session, SRD_CONF_SAMPLERATE, g_variant_new_uint64((uint64_t)_samplerate)); srd_pd_output_callback_add(session, SRD_OUTPUT_ANN, @@ -167,8 +163,6 @@ void Decoder::decode_proc(shared_ptr data) 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); @@ -199,8 +193,8 @@ void Decoder::decode_proc(shared_ptr data) i + DecodeChunkLength, sample_count); snapshot->get_samples(chunk, i, chunk_end); - if (srd_session_send(session, i, chunk, chunk_end - i) != - SRD_OK) { + if (srd_session_send(session, i, i + sample_count, + chunk, chunk_end - i) != SRD_OK) { _error_message = tr("Failed to initialise decoder"); break; }