+2004-03-09 Johan Dahlin <johan@gnome.org>
+
+ * gst/gst.override (_wrap_gst_g_error_tp_str)
+ (_wrap_gst_g_error_tp_str): Impl.
+
+ * gst/gst-types.defs (GError): Add
+
+ * gst/Makefile.am (defs_DATA): Install defs
+
+ * codegen/*: Resync
+
2004-03-05 Johan Dahlin <johan@gnome.org>
* testsuite/element.py: Update to new api
_gstmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gst
nodist__gstmodule_la_SOURCES = gst.c
+defs_DATA = \
+ gst.defs \
+ gst-types.defs
+defsdir = $(pkgdatadir)/2.0/defs
+
CLEANFILES = gst.c
-EXTRA_DIST = gst.defs gst-types.defs $(GST_OVERRIDES) arg-types.py
+EXTRA_DIST = $(defs_DATA) $(GST_OVERRIDES) arg-types.py
-.defs.c:
+gst.c: $(srcdir)/gst.defs $(srcdir)/gst-types.defs $(GST_OVERRIDES)
(cd $(srcdir)\
&& $(PYGTK_CODEGEN) \
--load-types $(srcdir)/arg-types.py \
(release-func "gst_data_unref")
)
+(define-boxed GError
+ (in-module "Gst")
+ (c-name "GError")
+ (gtype-id "GST_TYPE_G_ERROR")
+ (copy-func "g_error_copy")
+ (release-func "g_error_free")
+ (fields
+ '("GQuark" "domain")
+ '("gint" "code")
+ '("gchar*" "message"))
+)
+
;;
;; 0.7 Boxed types
#include "pygobject.h"
#include <gst/gst.h>
+#include <gst/gsterror.h>
#include <gst/gstqueue.h>
#include <gst/gsttypefind.h>
guint add_iterate_bin (GstBin *bin);
void remove_iterate_bin (guint id);
extern gboolean pygst_data_from_pyobject (PyObject *object, GstData **data);
+
%%
include
gstpad-handlers.override
GstCaps *ret = (GstCaps*)gst_type_find_factory_get_caps(GST_TYPE_FIND_FACTORY(self->obj));
return pyg_boxed_new(GST_TYPE_CAPS, ret, TRUE, TRUE);
}
+%%
+override-attr GError.domain
+static PyObject *
+_wrap_gst_g_error__get_domain(PyGObject *self, void *closure)
+{
+ return PyString_FromString(g_quark_to_string(((GError*)self->obj)->domain));
+}
+%%
+override-slot GError.tp_str
+static PyObject *
+_wrap_gst_g_error_tp_str(PyGObject *self)
+{
+ GError *error = (GError*)self->obj;
+ return PyString_FromString(gst_error_get_message (error->domain,
+ error->code));
+}