mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
1c5a18e82c
Original commit message from CVS: Removal of all glib < 2.8 cruft since GStreamer core now requires glib >= 2.8 * codegen/argtypes.py: remove gstobject cruft from ObjectArg * configure.ac: Require glib >= 2.8.0 * gst/Makefile.am: * gst/pygstobject.c: * gst/pygstobject.h: Remove pygstobject.[ch] * gst/common.h: Don't include removed header file. * gst/gst.override: * gst/gstbin.override: * gst/gstbus.override: * gst/gstelement.override: * gst/gstelementfactory.override: * gst/gstmessage.override: * gst/gstobject.override: * gst/gstpad.override: * gst/interfaces.override: * gst/pygstiterator.c: (pygst_iterator_iter_next): Switch from using pygstobject* functions to using pygobject* functions. * gst/gstmodule.c: (sink_gstobject), (init_gst): Move GstObject sink function here and use standard gobject refcounting.
72 lines
2 KiB
C
72 lines
2 KiB
C
/* -*- Mode: C -*- */
|
|
/* gst-python
|
|
* Copyright (C) 2005 Edward Hervey
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*
|
|
* Author: Edward Hervey <edward@fluendo.com>
|
|
*/
|
|
|
|
%%
|
|
ignore
|
|
gst_object_default_deep_notify
|
|
gst_object_check_uniqueness
|
|
gst_object_replace
|
|
|
|
%%
|
|
override-attr GstObject.__gstrefcount__
|
|
|
|
/* keep this attribute around even after 2.8 for compatibility reasons */
|
|
static PyObject *
|
|
_wrap_gst_object__get___gstrefcount__ (PyGObject * self, void *closure)
|
|
{
|
|
return PyInt_FromLong (GST_OBJECT_REFCOUNT_VALUE (self->obj));
|
|
}
|
|
|
|
%%
|
|
override-slot GstObject.tp_repr
|
|
static PyObject *
|
|
_wrap_gst_object_tp_repr (PyObject * self)
|
|
{
|
|
gchar *repr;
|
|
PyObject *ret;
|
|
GstObject *object = GST_OBJECT (pygobject_get (self));
|
|
|
|
repr = g_strdup_printf ("<%s object (%s) at 0x%lx>",
|
|
self->ob_type->tp_name,
|
|
GST_OBJECT_NAME (object) ? GST_OBJECT_NAME (object) : "unnamed",
|
|
(long) self);
|
|
ret = PyString_FromString (repr);
|
|
g_free (repr);
|
|
return ret;
|
|
}
|
|
|
|
%%
|
|
override-slot GstObject.tp_str
|
|
static PyObject *
|
|
_wrap_gst_object_tp_str (PyObject * self)
|
|
{
|
|
gchar *repr, *path;
|
|
PyObject *ret;
|
|
GstObject *object = GST_OBJECT (pygobject_get (self));
|
|
|
|
path = gst_object_get_path_string (object);
|
|
repr = g_strdup_printf ("%s (%s)", path, self->ob_type->tp_name);
|
|
ret = PyString_FromString (repr);
|
|
g_free (repr);
|
|
g_free (path);
|
|
return ret;
|
|
}
|