srd_err("Protocol decoder %s submitted data to non-existent annotation format %d",
di->decoder->name, ann_id);
return SRD_ERR_PYTHON;
}
srd_err("Protocol decoder %s submitted data to non-existent annotation format %d",
di->decoder->name, ann_id);
return SRD_ERR_PYTHON;
}
/* Second element must be a list */
py_tmp = PyList_GetItem(obj, 1);
/* Second element must be a list */
py_tmp = PyList_GetItem(obj, 1);
PyObject *data, *py_res;
struct srd_decoder_instance *di, *next_di;
struct srd_pd_output *pdo;
PyObject *data, *py_res;
struct srd_decoder_instance *di, *next_di;
struct srd_pd_output *pdo;
return NULL;
pdata->start_sample = start_sample;
pdata->end_sample = end_sample;
pdata->pdo = pdo;
switch (pdo->output_type) {
return NULL;
pdata->start_sample = start_sample;
pdata->end_sample = end_sample;
pdata->pdo = pdo;
switch (pdo->output_type) {
/* Annotations are only fed to callbacks. */
if ((cb = srd_find_callback(pdo->output_type))) {
/* Annotations need converting from PyObject. */
/* 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->annotation_format,
+ if (convert_pyobj(di, data, &pdata->ann_format,
- if (!PyArg_ParseTuple(args, "is", &output_type, &protocol_id)) {
+ if (!PyArg_ParseTuple(args, "is", &output_type, &proto_id)) {
- if(PyModule_AddObject(mod, "SRD_OUTPUT_ANNOTATION",
- PyLong_FromLong(SRD_OUTPUT_ANNOTATION)) == -1)
+ if(PyModule_AddObject(mod, "OUTPUT_ANN",
+ PyLong_FromLong(SRD_OUTPUT_ANN)) == -1)
- if(PyModule_AddObject(mod, "SRD_OUTPUT_PROTOCOL",
- PyLong_FromLong(SRD_OUTPUT_PROTOCOL)) == -1)
+ if(PyModule_AddObject(mod, "OUTPUT_PROTO",
+ PyLong_FromLong(SRD_OUTPUT_PROTO)) == -1)