? event_new_custom.diff
? examples/.gstfile.py.swp
? gst/.gst.c.swp
? gst/.gstelement.override.swp
? gst/.gstevent.override.swp
? gst/.interfaces.c.swp
? gst/.interfaces.defs.swp
? gst/.interfaces.override.swp
Index: gst/gstevent.override
===================================================================
RCS file: /cvs/gstreamer/gst-python/gst/gstevent.override,v
retrieving revision 1.17
diff -u -r1.17 gstevent.override
--- gst/gstevent.override	8 Jun 2007 15:16:08 -0000	1.17
+++ gst/gstevent.override	22 Jun 2007 16:27:06 -0000
@@ -180,3 +180,35 @@
      
      return PyLong_FromUnsignedLongLong(ctime);
 }
+
+%%
+override gst_event_new_custom kwargs
+static PyObject *
+_wrap_gst_event_new_custom (PyGstMiniObject * self, PyObject * args, 
+                            PyObject * kwargs)
+{
+    static char *kwlist[] = { "type", "structure", NULL };
+    PyObject *py_type = NULL, *py_structure, *py_ret;
+    GstEvent *ret;
+    GstStructure *structure = NULL;
+    GstEventType type;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"OO:event_new_custom", kwlist, &py_type, &py_structure))
+        return NULL;
+    if (pyg_enum_get_value(GST_TYPE_EVENT_TYPE, py_type, (gint *)&type))
+        return NULL;
+    if (pyg_boxed_check(py_structure, GST_TYPE_STRUCTURE))
+        structure = pyg_boxed_get(py_structure, GstStructure);
+    else {
+        PyErr_SetString(PyExc_TypeError, "structure should be a GstStructure");
+        return NULL;
+    }
+    pyg_begin_allow_threads;
+    ret = gst_event_new_custom(type, gst_structure_copy(structure));
+    pyg_end_allow_threads;
+    py_ret = pygstminiobject_new((GstMiniObject *)ret);
+    if (ret != NULL)
+       gst_mini_object_unref((GstMiniObject *)ret);
+    return py_ret;
+}
+
