mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
gst: Move PyGstMiniObject to public API.
Allows it to be reused from 3rd party modules. https://bugzilla.gnome.org/show_bug.cgi?id=656289
This commit is contained in:
parent
9c7abba819
commit
3b602c1404
3 changed files with 14 additions and 9 deletions
12
gst/pygst.h
12
gst/pygst.h
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
@ -35,6 +37,16 @@ struct _PyGst_Functions {
|
||||||
PyObject* (*miniobject_new) (GstMiniObject *obj);
|
PyObject* (*miniobject_new) (GstMiniObject *obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj)
|
||||||
|
#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base))
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
PyObject_HEAD
|
||||||
|
GstMiniObject *obj;
|
||||||
|
PyObject *inst_dict; /* the instance dictionary -- must be last */
|
||||||
|
PyObject *weakreflist; /* list of weak references */
|
||||||
|
} PyGstMiniObject;
|
||||||
|
|
||||||
#ifndef _INSIDE_PYGST_
|
#ifndef _INSIDE_PYGST_
|
||||||
|
|
||||||
#if defined(NO_IMPORT_PYGOBJECT)
|
#if defined(NO_IMPORT_PYGOBJECT)
|
||||||
|
|
|
@ -21,7 +21,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define NO_IMPORT_PYGOBJECT
|
#define NO_IMPORT_PYGOBJECT
|
||||||
|
#define _INSIDE_PYGST_
|
||||||
#include "pygstminiobject.h"
|
#include "pygstminiobject.h"
|
||||||
|
#include "pygst.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
static const gchar pygstminiobject_class_id[] = "PyGstMiniObject::class";
|
static const gchar pygstminiobject_class_id[] = "PyGstMiniObject::class";
|
||||||
|
|
|
@ -20,15 +20,6 @@ G_BEGIN_DECLS
|
||||||
#define PYGIL_API_IS_BUGGY FALSE
|
#define PYGIL_API_IS_BUGGY FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
PyObject_HEAD
|
|
||||||
GstMiniObject *obj;
|
|
||||||
PyObject *inst_dict; /* the instance dictionary -- must be last */
|
|
||||||
PyObject *weakreflist; /* list of weak references */
|
|
||||||
} PyGstMiniObject;
|
|
||||||
|
|
||||||
#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj)
|
|
||||||
#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base))
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pygstminiobject_register_class(PyObject *dict, const gchar *type_name,
|
pygstminiobject_register_class(PyObject *dict, const gchar *type_name,
|
||||||
|
|
Loading…
Reference in a new issue