mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/gst.override (_wrap_gst_g_error_tp_str)
Original commit message from CVS: * 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
This commit is contained in:
parent
9305a25204
commit
4c254ffe3f
4 changed files with 49 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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
|
||||
|
|
|
@ -23,10 +23,15 @@ _gstmodule_la_LIBADD = $(GST_LIBS)
|
|||
_gstmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gst
|
||||
nodist__gstmodule_la_SOURCES = gst.c
|
||||
|
||||
CLEANFILES = gst.c
|
||||
EXTRA_DIST = gst.defs gst-types.defs $(GST_OVERRIDES) arg-types.py
|
||||
defs_DATA = \
|
||||
gst.defs \
|
||||
gst-types.defs
|
||||
defsdir = $(pkgdatadir)/2.0/defs
|
||||
|
||||
.defs.c:
|
||||
CLEANFILES = gst.c
|
||||
EXTRA_DIST = $(defs_DATA) $(GST_OVERRIDES) arg-types.py
|
||||
|
||||
gst.c: $(srcdir)/gst.defs $(srcdir)/gst-types.defs $(GST_OVERRIDES)
|
||||
(cd $(srcdir)\
|
||||
&& $(PYGTK_CODEGEN) \
|
||||
--load-types $(srcdir)/arg-types.py \
|
||||
|
|
|
@ -182,6 +182,18 @@
|
|||
(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
|
||||
|
|
|
@ -30,6 +30,7 @@ headers
|
|||
|
||||
#include "pygobject.h"
|
||||
#include <gst/gst.h>
|
||||
#include <gst/gsterror.h>
|
||||
#include <gst/gstqueue.h>
|
||||
#include <gst/gsttypefind.h>
|
||||
|
||||
|
@ -49,6 +50,7 @@ void iterate_bin_all (GstBin *bin);
|
|||
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
|
||||
|
@ -770,3 +772,19 @@ _wrap_gst_type_find_factory_get_caps(PyGObject *self)
|
|||
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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue