+ }
+ s = py_str_as_str(pyrepr);
+ Py_DecRef(pyrepr);
+
+ /* Output format for testing is '<ss>-<es> <inst-id>: <repr>\n' */
+ out = g_string_sized_new(128);
+ g_string_printf(out, "%"PRIu64"-%"PRIu64" %s: %s\n",
+ pdata->start_sample, pdata->end_sample,
+ pdata->pdo->di->inst_id, s);
+ g_free(s);
+ if (write(op->outfd, out->str, out->len) == -1)
+ ERR("SRD_OUTPUT_PYTHON callback write failure!");
+ DBG("wrote '%s'", out->str);
+ g_string_free(out, TRUE);
+
+}
+
+static void srd_cb_bin(struct srd_proto_data *pdata, void *cb_data)
+{
+ struct srd_proto_data_binary *pdb;
+ struct output *op;