From e3c70bcaeb2a54f7ed0d6909231c6a633d478b3c Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 16 Aug 2005 16:47:45 +0000 Subject: [PATCH] /tmp/cvs3vKuoV Original commit message from CVS: /tmp/cvs3vKuoV --- ChangeLog | 8 ++++++++ common | 2 +- examples/pipeline-tester | 2 +- gst/gst.defs | 5 +++-- gst/gstelement.override | 26 +++++++++++++++++++++++++- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1860d5..956b51e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-08-16 Andy Wingo + + * gst/gst.defs (get_pad_template): Change to operate on elements + and not their classes so it can be wrapped in pygtk 2.6. + + * gst/gstelement.override (_wrap_gst_element_get_pad_template): + New override. + 2005-08-11 Edward Hervey * gst/gst.override: (pygst_debug_log): diff --git a/common b/common index 856fbbf..8ff526a 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 856fbbfa88621ab67df141ead8d4d3df32c5c176 +Subproject commit 8ff526a316f9b576e727b8e32cba0a53cdec07a6 diff --git a/examples/pipeline-tester b/examples/pipeline-tester index 1ee3210..5449247 100755 --- a/examples/pipeline-tester +++ b/examples/pipeline-tester @@ -168,7 +168,7 @@ class Window(gtk.Window): if m: self.selected_pipe = m.get_value(i, 1) pasteable = escape(self.selected_pipe, '\n)(') - l.set_markup('%s' % pasteable) + l.set_markup('%s' % pasteable) else: self.selected_pipe = None l.set_markup('') diff --git a/gst/gst.defs b/gst/gst.defs index 232c6d3..e248d01 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -764,9 +764,10 @@ ) ) +; 9 August 05 - changed to be a method on elements and not classes - wingo (define-method get_pad_template - (of-object "GstElementClass") - (c-name "gst_element_class_get_pad_template") + (of-object "GstElement") + (c-name "gst_element_get_pad_template") (return-type "GstPadTemplate*") (parameters '("const-gchar*" "name") diff --git a/gst/gstelement.override b/gst/gstelement.override index 73f53c0..fcd0cfc 100644 --- a/gst/gstelement.override +++ b/gst/gstelement.override @@ -1,4 +1,4 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- */ +/* -*- Mode: C; c-basic-offset: 8 -*- */ /* gst-python * Copyright (C) 2005 Johan Dahlin * @@ -26,6 +26,30 @@ ignore gst_element_get_property gst_element_set_property %% +override gst_element_get_pad_template args +static PyObject * +_wrap_gst_element_get_pad_template(PyGObject *self, PyObject *args) +{ + PyObject *ret; + gchar *name; + GstPadTemplate *tmpl; + + if (!PyArg_ParseTuple(args, "s:GstElement.get_pad_template", &name)) + return NULL; + + tmpl = gst_element_class_get_pad_template + (GST_ELEMENT_GET_CLASS (self->obj), name); + + if (tmpl) { + ret = pygobject_new (G_OBJECT (tmpl)); + } else { + ret = Py_None; + Py_INCREF (ret); + } + + return ret; +} +%% override gst_element_get_pad_list noargs static PyObject * _wrap_gst_element_get_pad_list(PyGObject *self) -- 2.7.4