+ case SRD_OUTPUT_ANN:
+ /* Annotations are only fed to callbacks. */
+ if ((cb = srd_find_callback(pdo->output_type))) {
+ /* Annotations need converting from PyObject. */
+ if (convert_pyobj(di, data, &pdata->ann_format,
+ (char ***)&pdata->data) != SRD_OK) {
+ /* An error was already logged. */
+ break;
+ }
+ cb(pdata);
+ }
+ break;
+ case SRD_OUTPUT_PROTO:
+ for (l = di->next_di; l; l = l->next) {
+ next_di = l->data;
+ /* TODO: is this needed? */
+ Py_XINCREF(next_di->py_instance);
+ if (!(py_res = PyObject_CallMethod(next_di->py_instance, "decode",
+ "KKO", start_sample, end_sample, data))) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ }
+ Py_XDECREF(py_res);
+ }
+ break;