From 183e0f72108e400cf4f2253f7d42742d9c72dc4b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 24 Mar 2006 11:07:22 +0000 Subject: [PATCH] configure.ac: Fixes in how we figure out what API to ignore Original commit message from CVS: * configure.ac: Fixes in how we figure out what API to ignore * gst/Makefile.am: * gst/gst-0.10.5.ignore: * gst/gstversion.override.in: Added file for handling API additions for gstreamer 0.10.5 * gst/base.defs: * gst/gst.defs: New API * gst/gstpad.override: Overrides for gst.Pad.query_peer_*() --- ChangeLog | 14 ++++++ common | 2 +- configure.ac | 34 ++++++++++---- gst/Makefile.am | 3 +- gst/base.defs | 41 +++++++++++++++++ gst/gst-0.10.5.ignore | 13 ++++++ gst/gst.defs | 47 +++++++++++++++++++ gst/gstpad.override | 94 ++++++++++++++++++++++++++++++++++++++ gst/gstversion.override.in | 1 + 9 files changed, 238 insertions(+), 11 deletions(-) create mode 100644 gst/gst-0.10.5.ignore diff --git a/ChangeLog b/ChangeLog index 6e2f699a9b..91b8465135 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-03-24 Edward Hervey + + * configure.ac: + Fixes in how we figure out what API to ignore + * gst/Makefile.am: + * gst/gst-0.10.5.ignore: + * gst/gstversion.override.in: + Added file for handling API additions for gstreamer 0.10.5 + * gst/base.defs: + * gst/gst.defs: + New API + * gst/gstpad.override: + Overrides for gst.Pad.query_peer_*() + === release 0.10.3 === 2006-03-21 Jan Schmidt diff --git a/common b/common index f1c7bfd24d..252846b570 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit f1c7bfd24d0fcc4e5113ce3b96b1fac83a9ec560 +Subproject commit 252846b570144570a0aee25b5adefbfac3f5d4eb diff --git a/configure.ac b/configure.ac index 3f4cf8715f..faf1e14983 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,7 @@ AC_SUBST(GST_LIBS) dnl get the installed GStreamer core version GST_MINOR_VERSION=`$PKG_CONFIG --modversion gstreamer-$GST_MAJORMINOR | cut -f 3 -d.` +GST_CVS_VERSION=`$PKG_CONFIG --modversion gstreamer-$GST_MAJORMINOR | cut -f 4 -d.` echo "Building against GStreamer core 0.10.$GST_MINOR_VERSION , ignoring API additions if needed" @@ -73,21 +74,36 @@ dnl The following lines should be updated whenever: dnl _ GST_REQ is up-ed (remove obsolete lines + gst-0.10.MINOR.ignore) dnl _ new core/base is released (add lines + gst-0.10.MINOR.ignore) -if test $GST_MINOR_VERSION -lt "3" +if test $GST_CVS_VERSION -eq "" then - IGNORE_GST_0_10_3="gst-0.10.3.ignore" + if test $GST_MINOR_VERSION -lt "3" + then + IGNORE_GST_0_10_3="gst-0.10.3.ignore" + else + IGNORE_GST_0_10_3="" + fi + + if test $GST_MINOR_VERSION -lt "4" + then + IGNORE_GST_0_10_4="gst-0.10.4.ignore" + else + IGNORE_GST_0_10_4="" + fi + + if test $GST_MINOR_VERSION -lt "5" + then + IGNORE_GST_0_10_5="gst-0.10.5.ignore" + else + IGNORE_GST_0_10_5="" + fi else IGNORE_GST_0_10_3="" + IGNORE_GST_0_10_4="" + IGNORE_GST_0_10_5="" fi AC_SUBST(IGNORE_GST_0_10_3) - -if test $GST_MINOR_VERSION -lt "4" -then - IGNORE_GST_0_10_4="gst-0.10.4.ignore" -else - IGNORE_GST_0_10_4="" -fi AC_SUBST(IGNORE_GST_0_10_4) +AC_SUBST(IGNORE_GST_0_10_5) dnl check for gstreamer-base; uninstalled is selected preferentially PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ, diff --git a/gst/Makefile.am b/gst/Makefile.am index 6218f4121b..8fb1a658e2 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -24,7 +24,8 @@ noinst_HEADERS = common.h pygstvalue.h pygstminiobject.h pygstobject.h pygstexce versioned_overrides = \ gst-0.10.3.ignore \ - gst-0.10.4.ignore + gst-0.10.4.ignore \ + gst-0.10.5.ignore INCLUDES = $(PYTHON_INCLUDES) EXTRA_DIST = $(defs_DATA) $(versioned_overrides) common.h arg-types.py diff --git a/gst/base.defs b/gst/base.defs index 4e37e7dedb..f12c4c0984 100644 --- a/gst/base.defs +++ b/gst/base.defs @@ -162,6 +162,21 @@ (return-type "gint64") ) +(define-method set_qos_enabled + (of-object "GstBaseSink") + (c-name "gst_base_sink_set_qos_enabled") + (return-type "none") + (parameters + '("gboolean" "enabled") + ) +) + +(define-method is_qos_enabled + (of-object "GstBaseSink") + (c-name "gst_base_sink_is_qos_enabled") + (return-type "gboolean") +) + (define-virtual get_caps (of-object "GstBaseSink") (return-type "GstCaps*") @@ -403,6 +418,32 @@ (return-type "gboolean") ) +(define-method update_qos + (of-object "GstBaseTransform") + (c-name "gst_base_transform_update_qos") + (return-type "none") + (parameters + '("gdouble" "proportion") + '("GstClockTimeDiff" "diff") + '("GstClockTime" "timestamp") + ) +) + +(define-method set_qos_enabled + (of-object "GstBaseTransform") + (c-name "gst_base_transform_set_qos_enabled") + (return-type "none") + (parameters + '("gboolean" "enabled") + ) +) + +(define-method is_qos_enabled + (of-object "GstBaseTransform") + (c-name "gst_base_transform_is_qos_enabled") + (return-type "gboolean") +) + (define-virtual transform_caps (of-object "GstBaseTransform") (return-type "GstCaps*") diff --git a/gst/gst-0.10.5.ignore b/gst/gst-0.10.5.ignore new file mode 100644 index 0000000000..10673d5f29 --- /dev/null +++ b/gst/gst-0.10.5.ignore @@ -0,0 +1,13 @@ +%% +ignore + gst_pad_query_peer_position + gst_pad_query_peer_duration + gst_pad_query_peer_convert + gst_base_sink_set_qos_enabled + gst_base_sink_is_qos_enabled + gst_base_transform_update_qos + gst_base_transform_set_qos_enabled + gst_base_transform_is_qos_enabled + gst_pipeline_set_delay + gst_pipeline_get_delay +%% \ No newline at end of file diff --git a/gst/gst.defs b/gst/gst.defs index b03f7811a7..5362f70a8c 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -4054,6 +4054,21 @@ (return-type "none") ) +(define-method set_delay + (of-object "GstPipeline") + (c-name "gst_pipeline_set_delay") + (return-type "none") + (parameters + '("GstClockTime" "delay") + ) +) + +(define-method get_delay + (of-object "GstPipeline") + (c-name "gst_pipeline_get_delay") + (return-type "GstClockTime") +) + (define-method set_auto_flush_bus (of-object "GstPipeline") (c-name "gst_pipeline_set_auto_flush_bus") @@ -6543,6 +6558,38 @@ ) ) +(define-method query_peer_position + (of-object "GstPad") + (c-name "gst_pad_query_peer_position") + (return-type "gboolean") + (parameters + '("GstFormat*" "format") + '("gint64*" "cur") + ) +) + +(define-method query_peer_duration + (of-object "GstPad") + (c-name "gst_pad_query_peer_duration") + (return-type "gboolean") + (parameters + '("GstFormat*" "format") + '("gint64*" "duration") + ) +) + +(define-method query_peer_convert + (of-object "GstPad") + (c-name "gst_pad_query_peer_convert") + (return-type "gboolean") + (parameters + '("GstFormat" "src_format") + '("gint64" "src_val") + '("GstFormat*" "dest_format") + '("gint64*" "dest_val") + ) +) + (define-method remove_many (of-object "GstBin") (c-name "gst_bin_remove_many") diff --git a/gst/gstpad.override b/gst/gstpad.override index 255f222fec..22e39fb657 100644 --- a/gst/gstpad.override +++ b/gst/gstpad.override @@ -1063,3 +1063,97 @@ _wrap_gst_pad_set_caps(PyGObject *self, PyObject *args, PyObject *kwargs) return PyBool_FromLong(ret); } +%% +override gst_pad_query_peer_position args +static PyObject * +_wrap_gst_pad_query_peer_position (PyGObject *self, PyObject *args) +{ + gint64 cur; + gint format; + PyObject *pformat; + PyObject *ret; + + pformat = (PyObject*)PyTuple_GetItem(args, 0); + if (pyg_enum_get_value (GST_TYPE_FORMAT, pformat, &format)) { + PyErr_SetString(PyExc_TypeError, "argument should be a GstFormat"); + return NULL; + } + + if ((gst_pad_query_peer_position(GST_PAD (self->obj), (GstFormat*) &format, &cur))) { + ret = PyList_New(2); + PyList_SetItem(ret, 0, PyLong_FromLongLong(cur)); + PyList_SetItem(ret, 1, pyg_enum_from_gtype (GST_TYPE_FORMAT, format )); + } else { + Py_INCREF(Py_None); + ret = Py_None; + } + + return ret; +} +%% +override gst_pad_query_peer_duration args +static PyObject * +_wrap_gst_pad_query_peer_duration (PyGObject *self, PyObject *args) +{ + gint64 cur; + gint format; + PyObject *pformat; + PyObject *ret; + + pformat = (PyObject*)PyTuple_GetItem(args, 0); + if (pyg_enum_get_value (GST_TYPE_FORMAT, pformat, &format)) { + PyErr_SetString(PyExc_TypeError, "argument should be a GstFormat"); + return NULL; + } + + if ((gst_pad_query_peer_duration(GST_PAD (self->obj), (GstFormat*) &format, &cur))) { + ret = PyList_New(2); + PyList_SetItem(ret, 0, PyLong_FromLongLong(cur)); + PyList_SetItem(ret, 1, pyg_enum_from_gtype (GST_TYPE_FORMAT, format )); + } else { + Py_INCREF(Py_None); + ret = Py_None; + } + + return ret; +} +%% +override gst_pad_query_peer_convert kwargs +static PyObject * +_wrap_gst_pad_query_peer_convert (PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "fromformat", "fromvalue", "destformat", NULL }; + PyObject *pfromformat, *pdestformat; + GstFormat srcformat, destformat; + gint64 fromval, dstval; + PyObject *ret; + + /* Input : src_format, src_val, dst_format */ + /* Returns : dst_format, dst_val OR None */ + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + "0L0:GstPad.query_peer_convert", + kwlist, &pfromformat, &fromval, &pdestformat)) + return NULL; + if (pyg_enum_get_value(GST_TYPE_FORMAT, pfromformat, (gint *) &srcformat)) { + PyErr_SetString(PyExc_TypeError, "argument should be a GstFormat"); + return NULL; + } + if (pyg_enum_get_value(GST_TYPE_FORMAT, pdestformat, (gint *) &destformat)) { + PyErr_SetString(PyExc_TypeError, "argument should be a GstFormat"); + return NULL; + } + + if (!(gst_pad_query_peer_convert (GST_PAD(self->obj), + srcformat, fromval, + &destformat, &dstval))) { + Py_INCREF(Py_None); + return Py_None; + } + + ret = PyList_New(2); + PyList_SetItem(ret, 0, pyg_enum_from_gtype (GST_TYPE_FORMAT, destformat)); + PyList_SetItem(ret, 1, PyLong_FromLongLong(dstval)); + + return ret; +} diff --git a/gst/gstversion.override.in b/gst/gstversion.override.in index c6a970abdd..fd417b8b26 100644 --- a/gst/gstversion.override.in +++ b/gst/gstversion.override.in @@ -2,4 +2,5 @@ include @IGNORE_GST_0_10_3@ @IGNORE_GST_0_10_4@ +@IGNORE_GST_0_10_5@ %%