mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
parent
3e73bfc4b2
commit
0238e12e01
10 changed files with 17 additions and 29 deletions
|
@ -25,7 +25,7 @@ headers
|
|||
#endif
|
||||
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include "common.h"
|
||||
#include "pygst.h"
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <gst/audio/audio.h>
|
||||
#include <gst/audio/gstbaseaudiosink.h>
|
||||
#include <gst/audio/gstbaseaudiosrc.h>
|
||||
#include "pygst.h"
|
||||
|
||||
void pyaudio_register_classes (PyObject *d);
|
||||
void pyaudio_add_constants(PyObject *module, const gchar *strip_prefix);
|
||||
|
@ -42,6 +43,7 @@ initaudio (void)
|
|||
PyObject *m, *d;
|
||||
|
||||
init_pygobject ();
|
||||
pygst_init();
|
||||
|
||||
m = Py_InitModule ("audio", pyaudio_functions);
|
||||
d = PyModule_GetDict (m);
|
||||
|
|
|
@ -27,7 +27,7 @@ headers
|
|||
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
|
||||
#include "common.h"
|
||||
#include "pygst.h"
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
/* include this first, before NO_IMPORT_PYGOBJECT is defined */
|
||||
#include <pygobject.h>
|
||||
#include <gst/gst.h>
|
||||
#include "pygst.h"
|
||||
|
||||
void pyinterfaces_register_classes (PyObject *d);
|
||||
void pyinterfaces_add_constants(PyObject *module, const gchar *strip_prefix);
|
||||
|
@ -39,6 +40,7 @@ initinterfaces (void)
|
|||
PyObject *m, *d;
|
||||
|
||||
init_pygobject ();
|
||||
pygst_init();
|
||||
|
||||
m = Py_InitModule ("interfaces", pyinterfaces_functions);
|
||||
d = PyModule_GetDict (m);
|
||||
|
|
|
@ -25,7 +25,7 @@ headers
|
|||
#endif
|
||||
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include "common.h"
|
||||
#include "pygst.h"
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
@ -84,6 +84,7 @@ import gst.Object as PyGstObject_Type
|
|||
import gst.Structure as PyGstStructure_Type
|
||||
import gst.Element as PyGstElement_Type
|
||||
import gst.Message as PyGstMessage_Type
|
||||
import gst.MiniObject as PyGstMiniObject_Type
|
||||
%%
|
||||
include
|
||||
gstversion.override
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <pygobject.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/pbutils/pbutils.h>
|
||||
#include "pygst.h"
|
||||
|
||||
void pypbutils_register_classes (PyObject *d);
|
||||
void pypbutils_add_constants(PyObject *module, const gchar *strip_prefix);
|
||||
|
@ -43,29 +44,7 @@ initpbutils (void)
|
|||
init_pygobject ();
|
||||
|
||||
/* Make sure gst module is loaded and ready */
|
||||
gst = PyImport_ImportModule("gst");
|
||||
if (!gst) {
|
||||
if (PyErr_Occurred())
|
||||
{
|
||||
PyObject *type, *value, *traceback;
|
||||
PyObject *py_orig_exc;
|
||||
PyErr_Fetch(&type, &value, &traceback);
|
||||
py_orig_exc = PyObject_Repr(value);
|
||||
Py_XDECREF(type);
|
||||
Py_XDECREF(value);
|
||||
Py_XDECREF(traceback);
|
||||
PyErr_Format(PyExc_ImportError,
|
||||
"could not import gst (error was: %s)",
|
||||
PyString_AsString(py_orig_exc));
|
||||
Py_DECREF(py_orig_exc);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_ImportError,
|
||||
"could not import gst (no error given)");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
gst = pygst_init();
|
||||
gst_pb_utils_init ();
|
||||
|
||||
m = Py_InitModule ("pbutils", pypbutils_functions);
|
||||
|
|
|
@ -25,7 +25,7 @@ headers
|
|||
#endif
|
||||
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include "common.h"
|
||||
#include "pygst.h"
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <pygobject.h>
|
||||
#include <gst/gst.h>
|
||||
#include <gst/tag/tag.h>
|
||||
#include "pygst.h"
|
||||
|
||||
void pytag_register_classes (PyObject *d);
|
||||
void pytag_add_constants(PyObject *module, const gchar *strip_prefix);
|
||||
|
@ -40,6 +41,7 @@ inittag (void)
|
|||
PyObject *m, *d;
|
||||
|
||||
init_pygobject ();
|
||||
pygst_init ();
|
||||
/* Initialize tag library */
|
||||
gst_tag_register_musicbrainz_tags ();
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ headers
|
|||
#endif
|
||||
|
||||
#define NO_IMPORT_PYGOBJECT
|
||||
#include "common.h"
|
||||
#include "pygst.h"
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <gst/video/video.h>
|
||||
#include <gst/video/gstvideosink.h>
|
||||
#include <gst/video/gstvideofilter.h>
|
||||
#include "pygst.h"
|
||||
|
||||
void pyvideo_register_classes (PyObject *d);
|
||||
void pyvideo_add_constants(PyObject *module, const gchar *strip_prefix);
|
||||
|
@ -39,9 +40,10 @@ GST_DEBUG_CATEGORY (pygst_debug); /* for python code */
|
|||
DL_EXPORT(void)
|
||||
initvideo (void)
|
||||
{
|
||||
PyObject *m, *d;
|
||||
PyObject *m, *d, *gst;
|
||||
|
||||
init_pygobject ();
|
||||
gst = pygst_init ();
|
||||
|
||||
m = Py_InitModule ("video", pyvideo_functions);
|
||||
d = PyModule_GetDict (m);
|
||||
|
|
Loading…
Reference in a new issue