- for (i = 0; annotations[i]; i++)
- printf("\"%s\" ", annotations[i]);
+ /* Show only the longest annotation. */
+ printf("\"%s\" ", pda->ann_text[0]);
+ printf("\n");
+ fflush(stdout);
+}
+
+void show_pd_meta(struct srd_proto_data *pdata, void *cb_data)
+{
+
+ /* 'cb_data' is not used in this specific callback. */
+ (void)cb_data;
+
+ if (!g_hash_table_lookup_extended(pd_meta_visible,
+ pdata->pdo->di->decoder->id, NULL, NULL))
+ /* Not in the list of PDs whose meta output we're showing. */
+ return;
+
+ if (opt_loglevel > SR_LOG_WARN)
+ printf("%"PRIu64"-%"PRIu64" ", pdata->start_sample, pdata->end_sample);
+ printf("%s: ", pdata->pdo->proto_id);
+ printf("%s: %s", pdata->pdo->meta_name, g_variant_print(pdata->data, FALSE));