mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
sink GstObject, much like GtkObject
Original commit message from CVS: sink GstObject, much like GtkObject
This commit is contained in:
parent
2e23effc15
commit
b9f4f5e5f7
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-11-23 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
|
* gst/gstmodule.c: sink GstObject, much like GtkObject
|
||||||
|
|
||||||
2004-11-23 Johan Dahlin <johan@gnome.org>
|
2004-11-23 Johan Dahlin <johan@gnome.org>
|
||||||
|
|
||||||
* examples/gst/play.py:
|
* examples/gst/play.py:
|
||||||
|
|
|
@ -62,6 +62,15 @@ python_do_pending_calls(gpointer data)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sink_gstobject(GObject *object)
|
||||||
|
{
|
||||||
|
if (GST_OBJECT_FLOATING(object)) {
|
||||||
|
g_object_ref(object);
|
||||||
|
gst_object_sink(GST_OBJECT(object));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DL_EXPORT(void)
|
DL_EXPORT(void)
|
||||||
init_gst (void)
|
init_gst (void)
|
||||||
{
|
{
|
||||||
|
@ -71,6 +80,7 @@ init_gst (void)
|
||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
init_pygobject ();
|
init_pygobject ();
|
||||||
|
|
||||||
/* pull in arguments */
|
/* pull in arguments */
|
||||||
av = PySys_GetObject ("argv");
|
av = PySys_GetObject ("argv");
|
||||||
if (av != NULL) {
|
if (av != NULL) {
|
||||||
|
@ -103,6 +113,8 @@ init_gst (void)
|
||||||
g_free (argv);
|
g_free (argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pygobject_register_sinkfunc(GST_TYPE_OBJECT, sink_gstobject);
|
||||||
|
|
||||||
m = Py_InitModule ("_gst", pygst_functions);
|
m = Py_InitModule ("_gst", pygst_functions);
|
||||||
d = PyModule_GetDict (m);
|
d = PyModule_GetDict (m);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue