+ if ((cb = srd_find_callback(pdo->output_type))) {
+ /* Something registered an interest in this output type. */
+ if (!(pdata = g_try_malloc0(sizeof(struct srd_protocol_data))))
+ return NULL;
+ pdata->start_sample = start_sample;
+ pdata->end_sample = end_sample;
+ pdata->pdo = pdo;
+ if (pdo->output_type == SRD_OUTPUT_ANNOTATION) {
+ /* annotations need converting from PyObject */
+ if (convert_pyobj(di, data, &pdata->annotation_format,
+ (char ***)&pdata->data) != SRD_OK)
+ return NULL;
+ } else {
+ /* annotation_format is unused, data is an opaque blob. */
+ pdata->data = data;
+ }
+ cb(pdata);
+ }
+