mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
9b74a9033a
Original commit message from CVS: * gst/gst.override: removed deprecated wrappers (gst_event_new_any*) * gst/gstbuffer.override: * gst/gstquery.override: * gst/gstmessage.override: * gst/gstevent.override: * gst/pygstminiobject.c: * gst/pygstminiobject.h: Correct wrapping of functions 'creating' mini-objects * gst/gstelement.override: (_wrap_gst_element_get_state): More meaningful exception message * gst/gstpad.override: wrapped gst_pad_alloc_buffer(), gst_pad_pull_range(), gst_pad_get_range(), gst_pad_get_internal_links(), gst_pad_get_internal_links_default(), gst_pad_get_query_types(), gst_pad_get_query_types_default()
57 lines
1.2 KiB
C
57 lines
1.2 KiB
C
/* -*- Mode: C; c-basic-offset: 4 -*- */
|
|
|
|
#ifndef _PYGSTMINIOBJECT_H_
|
|
#define _PYGSTMINIOBJECT_H_
|
|
|
|
#include <Python.h>
|
|
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
|
|
#include "common.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
/* Work around bugs in PyGILState api fixed in 2.4.0a4 */
|
|
#if PY_VERSION_HEX < 0x020400A4
|
|
#define PYGIL_API_IS_BUGGY TRUE
|
|
#else
|
|
#define PYGIL_API_IS_BUGGY FALSE
|
|
#endif
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
GstMiniObject *obj;
|
|
PyObject *inst_dict; /* the instance dictionary -- must be last */
|
|
PyObject *weakreflist; /* list of weak references */
|
|
} PyGstMiniObject;
|
|
|
|
PyObject *
|
|
pygstminiobject_new(GstMiniObject *obj);
|
|
PyObject *
|
|
pygstminiobject_new_noref(GstMiniObject *obj);
|
|
|
|
#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj)
|
|
#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base))
|
|
|
|
void
|
|
pygstminiobject_register_class(PyObject *dict, const gchar *type_name,
|
|
GType gtype, PyTypeObject *type,
|
|
PyObject *bases);
|
|
void
|
|
pygstminiobject_register_wrapper(PyObject *self);
|
|
|
|
void
|
|
pygst_miniobject_init();
|
|
|
|
#ifndef _INSIDE_PYGSTMINIOBJECT_
|
|
|
|
struct _PyGObject_Functions *_PyGObject_API;
|
|
|
|
extern PyTypeObject PyGstMiniObject_Type;
|
|
|
|
#endif /* !_INSIDE_PYGSTMINIOBJECT_ */
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* !_PYGSTMINIOBJECT_H_ */
|