Introduce variables which hold the internal state during decoder
operation so far. Start by adding a "samplerate used by protocol
decoders". This is motivated by the pending Google Trace Event
feature addition.
static GHashTable *pd_binary_visible = NULL;
static GHashTable *pd_channel_maps = NULL;
+uint64_t pd_samplerate = 0;
+
extern struct srd_session *srd_sess;
static int opts_to_gvar(struct srd_decoder *dec, GHashTable *hash,
g_critical("Failed to configure decode session.");
break;
}
+ pd_samplerate = samplerate;
}
if (srd_session_start(srd_sess) != SRD_OK) {
g_critical("Failed to start decode session.");
g_variant_new_uint64(samplerate)) != SRD_OK) {
g_critical("Failed to pass samplerate to decoder.");
}
+ pd_samplerate = samplerate;
}
#endif
break;
/* decode.c */
#ifdef HAVE_SRD
+extern uint64_t pd_samplerate;
int register_pds(gchar **all_pds, char *opt_pd_annotations);
int setup_pd_annotations(char *opt_pd_annotations);
int setup_pd_meta(char *opt_pd_meta);