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:
Thibault Saunier 2011-08-10 17:13:17 +02:00 committed by Edward Hervey
parent 9c7abba819
commit 3b602c1404
3 changed files with 14 additions and 9 deletions

View file

@ -25,6 +25,8 @@
#include <glib.h>
#include <glib-object.h>
#include <gst/gst.h>
#include "common.h"
G_BEGIN_DECLS
@ -35,6 +37,16 @@ struct _PyGst_Functions {
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_
#if defined(NO_IMPORT_PYGOBJECT)

View file

@ -21,7 +21,9 @@
*/
#define NO_IMPORT_PYGOBJECT
#define _INSIDE_PYGST_
#include "pygstminiobject.h"
#include "pygst.h"
#include <gst/gst.h>
static const gchar pygstminiobject_class_id[] = "PyGstMiniObject::class";

View file

@ -20,15 +20,6 @@ G_BEGIN_DECLS
#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;
#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,