From c0b572b89f1529d353a31f62e3f8c74bafd7a661 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 8 Nov 2007 19:56:54 +0000 Subject: [PATCH] gst/: Update API changes for core+base pre-releases Original commit message from CVS: * gst/base.defs: * gst/gst-0.10.15.ignore: * gst/gst.defs: * gst/gst.override: * gst/gstmodule.c: (init_gst): Update API changes for core+base pre-releases --- ChangeLog | 9 +++++++ gst/base.defs | 16 +++++++++++ gst/gst-0.10.15.ignore | 7 +++++ gst/gst.defs | 21 +++++++++++++++ gst/gst.override | 61 +++++++++++++++++++++++++++++++++++++++++- gst/gstmodule.c | 3 +++ 6 files changed, 116 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 609d90bf61d..5d6614c1949 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-11-08 Edward Hervey + + * gst/base.defs: + * gst/gst-0.10.15.ignore: + * gst/gst.defs: + * gst/gst.override: + * gst/gstmodule.c: (init_gst): + Update API changes for core+base pre-releases + 2007-11-05 Johan Dahlin * gstoptionmodule.c: diff --git a/gst/base.defs b/gst/base.defs index 3bf7dcba434..b9f731c5a19 100644 --- a/gst/base.defs +++ b/gst/base.defs @@ -240,6 +240,12 @@ (return-type "GstClockTimeDiff") ) +(define-method get_last_buffer + (of-object "GstBaseSink") + (c-name "gst_base_sink_get_last_buffer") + (return-type "GstBuffer*") +) + (define-method query_latency (of-object "GstBaseSink") (c-name "gst_base_sink_query_latency") @@ -258,6 +264,16 @@ (return-type "GstClockTime") ) +(define-method wait_eos + (of-object "GstBaseSink") + (c-name "gst_base_sink_wait_eos") + (return-type "GstFlowReturn") + (parameters + '("GstClockTime" "time") + '("GstClockTimeDiff*" "jitter") + ) +) + (define-virtual get_caps (of-object "GstBaseSink") (return-type "GstCaps*") diff --git a/gst/gst-0.10.15.ignore b/gst/gst-0.10.15.ignore index 23394e60987..7bd8fc68230 100644 --- a/gst/gst-0.10.15.ignore +++ b/gst/gst-0.10.15.ignore @@ -3,6 +3,13 @@ ignore gst_pad_peer_query gst_registry_add_path gst_structure_get_uint + gst_bus_pop_filtered + gst_bus_timed_pop_filtered + gst_base_sink_get_last_buffer + GstURIHandler__do_get_protocols_full + GstURIHandler__proxy_do_get_protocols_full + GstURIHandler__do_get_type_full + GstURIHandler__proxy_do_get_type_full %% ignore-type GstLFOControlSource diff --git a/gst/gst.defs b/gst/gst.defs index 58cfd15007a..785946edf8a 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -378,6 +378,16 @@ (caller-owns-return #t) ) +(define-method pop_filtered + (of-object "GstBus") + (c-name "gst_bus_pop_filtered") + (return-type "GstMessage*") + (caller-owns-return #t) + (parameters + '("GstMessageType" "types") + ) +) + (define-method timed_pop (of-object "GstBus") (c-name "gst_bus_timed_pop") @@ -388,6 +398,17 @@ ) ) +(define-method timed_pop_filtered + (of-object "GstBus") + (c-name "gst_bus_timed_pop_filtered") + (return-type "GstMessage*") + (caller-owns-return #t) + (parameters + '("GstClockTime" "timeout") + '("GstMessageType" "types") + ) +) + (define-method set_flushing (of-object "GstBus") (c-name "gst_bus_set_flushing") diff --git a/gst/gst.override b/gst/gst.override index c50ef404e10..f33bd45089d 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -284,7 +284,6 @@ ignore-glob *_ref *_unref *_deinit - *_full gst_class_* gst_init* gst_interface_* @@ -1348,6 +1347,66 @@ _wrap_GstURIHandler__proxy_do_get_protocols_full (GType type) return retval; } +%% +override GstURIHandler__do_get_type_full +static PyObject * +_wrap_GstURIHandler__do_get_type_full(PyObject *cls, PyObject *args, PyObject *kwargs) +{ + GstURIHandlerInterface *iface; + static char *kwlist[] = { "self", "type", NULL }; + PyGObject *self; + PyObject *py_type = NULL; + GType type; + guint ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O:GstURIHandler.get_type_full", kwlist, &PyGstURIHandler_Type, &self, &py_type)) + return NULL; + if ((type = pyg_type_from_object(py_type)) == 0) + return NULL; + iface = g_type_interface_peek(g_type_class_peek(pyg_type_from_object(cls)), GST_TYPE_URI_HANDLER); + if (iface->get_type_full) + ret = iface->get_type_full(type); + else { + PyErr_SetString(PyExc_NotImplementedError, "interface method GstURIHandler.get_type_full not implemented"); + return NULL; + } + return PyLong_FromUnsignedLong(ret); +} +%% +override GstURIHandler__do_get_protocols_full +static PyObject * +_wrap_GstURIHandler__do_get_protocols_full(PyObject *cls, PyObject *args, PyObject *kwargs) +{ + GstURIHandlerInterface *iface; + static char *kwlist[] = { "self", "type", NULL }; + PyGObject *self; + PyObject *py_type = NULL; + GType type; + gchar **ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O:GstURIHandler.get_protocols_full", kwlist, &PyGstURIHandler_Type, &self, &py_type)) + return NULL; + if ((type = pyg_type_from_object(py_type)) == 0) + return NULL; + iface = g_type_interface_peek(g_type_class_peek(pyg_type_from_object(cls)), GST_TYPE_URI_HANDLER); + if (iface->get_protocols_full) + ret = iface->get_protocols_full(type); + else { + PyErr_SetString(PyExc_NotImplementedError, "interface method GstURIHandler.get_protocols_full not implemented"); + return NULL; + } + if (ret) { + guint size = g_strv_length(ret); + PyObject *py_ret = PyTuple_New(size); + gint i; + for (i = 0; i < size; i++) + PyTuple_SetItem(py_ret, i, + PyString_FromString(ret[i])); + return py_ret; + } + return PyTuple_New (0); + +} %% override g_error_new kwargs diff --git a/gst/gstmodule.c b/gst/gstmodule.c index 2c8fc28aecb..6e6e1673a33 100644 --- a/gst/gstmodule.c +++ b/gst/gstmodule.c @@ -255,6 +255,9 @@ init_gst (void) PyModule_AddStringConstant (m, "TAG_LICENSE_URI", GST_TAG_LICENSE_URI); #if ((GST_VERSION_MICRO >= 15) || (GST_VERSION_MICRO == 14 && GST_VERSION_NANO > 0)) PyModule_AddStringConstant (m, "TAG_COMPOSER", GST_TAG_COMPOSER); + PyModule_AddStringConstant (m, "TAG_ARTIST_SORTNAME", GST_TAG_ARTIST_SORTNAME); + PyModule_AddStringConstant (m, "TAG_ALBUM_SORTNAME", GST_TAG_ALBUM_SORTNAME); + PyModule_AddStringConstant (m, "TAG_TITLE_SORTNAME", GST_TAG_TITLE_SORTNAME); #endif #endif #endif