All pastes #112192 Raw Edit

Anonymous

public c v1 · immutable
·published 2006-08-02 19:28 UTC
rendered paste body
/* File: gstsnapshotcreatorwrapper.c *//* Defines a "gstsnapshotcreator" Python extension module *//* Include the Python API */#include "Python.h"#include "gst/gst.h"extern int snapshotcreator(GstBuffer*);/* Wrapper for the snapshotcreator() function */PyObject *gstsnapshotcreator_snapshotcreator(PyObject *self, PyObject *args){  GstBuffer x;  int g;  if (!PyArg_ParseTuple(args,"O",&x)) {     return NULL;   }   /* Call the C function */  g = snapshotcreator(&x);  return Py_BuildValue("i",g);}/* Method table mapping names to wrappers */static PyMethodDef gstsnapshotcreatormethods[] = {  {"snapshotcreator", gstsnapshotcreator_snapshotcreator, METH_VARARGS},  {NULL, NULL}};/* Module init function */void initgstsnapshotcreator() {  Py_InitModule("gstsnapshotcreator", gstsnapshotcreatormethods);}