From 99aa909d5b806478de252b05b6e52271f5c5a8c5 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 18 Dec 2005 18:15:57 +0000 Subject: [PATCH] gst/gst.override: ignore gst_plugin_get_module, GModule aren't wrapped in pygtk anyway. Original commit message from CVS: * gst/gst.override: ignore gst_plugin_get_module, GModule aren't wrapped in pygtk anyway. wrap gst_clock_get_calibration * gst/gstbus.override: Ignore the following: gst_bus_create_watch, since GSource aren't wrapped in pygtk gst_bus_sync_signal_handler and gst_bus_async_signal_func since these functions are used by the default bus handler anyway. * gst/gstevent.override: wrapped gst_event_parse_buffer_size * gst/libs.defs: Replace all guint8* for gst_dp_ functions by gchar * since they are the same, but at least get generated properly by the code generator. --- ChangeLog | 18 ++++++++++++++++ gst/gst.override | 26 +++++++++++++++++++++++ gst/gstbus.override | 5 +++++ gst/gstevent.override | 28 +++++++++++++++++++++++++ gst/libs.defs | 58 +++++++++++++++++++++++++-------------------------- 5 files changed, 106 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 578899a..dcbae51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2005-12-18 Edward Hervey + * gst/gst.override: + ignore gst_plugin_get_module, GModule aren't wrapped in + pygtk anyway. + wrap gst_clock_get_calibration + * gst/gstbus.override: + Ignore the following: + gst_bus_create_watch, since GSource aren't wrapped in pygtk + gst_bus_sync_signal_handler and gst_bus_async_signal_func since + these functions are used by the default bus handler anyway. + * gst/gstevent.override: + wrapped gst_event_parse_buffer_size + * gst/libs.defs: + Replace all guint8* for gst_dp_ functions by gchar * since they + are the same, but at least get generated properly by the code + generator. + +2005-12-18 Edward Hervey + * gst/gst.defs: gst_object_sink is a method of GstObject const of enums is a stupidity (_element_make_from_uri) diff --git a/gst/gst.override b/gst/gst.override index 6835a15..c3c76e8 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -323,6 +323,7 @@ ignore gst_flow_to_quark gst_implements_interface_cast gst_implements_interface_check + gst_plugin_get_module %% override-slot GstPluginFeature.tp_repr static PyObject * @@ -912,3 +913,28 @@ _wrap_gst_version (PyObject *self) return py_tuple; } +%% +override gst_clock_get_calibration noargs +static PyObject * +_wrap_gst_clock_get_calibration (PyGObject * self) +{ + PyObject *ret; + GstClockTime internal; + GstClockTime external; + GstClockTime rate_num; + GstClockTime rate_denom; + + gst_clock_get_calibration (GST_CLOCK (self->obj), + &internal, + &external, + &rate_num, + &rate_denom); + + ret = PyTuple_New(4); + PyTuple_SetItem(ret, 0, PyLong_FromUnsignedLongLong(internal)); + PyTuple_SetItem(ret, 1, PyLong_FromUnsignedLongLong(external)); + PyTuple_SetItem(ret, 2, PyLong_FromUnsignedLongLong(rate_num)); + PyTuple_SetItem(ret, 3, PyLong_FromUnsignedLongLong(rate_denom)); + + return ret; +} diff --git a/gst/gstbus.override b/gst/gstbus.override index 71ea14f..9ab18a9 100644 --- a/gst/gstbus.override +++ b/gst/gstbus.override @@ -22,6 +22,11 @@ * Author: Edward Hervey */ %% +ignore + gst_bus_create_watch + gst_bus_sync_signal_handler + gst_bus_async_signal_func +%% headers static GstBusSyncReply bus_sync_handler (GstBus *bus, GstMessage *message, gpointer user_data) diff --git a/gst/gstevent.override b/gst/gstevent.override index 3626b21..3a620a4 100644 --- a/gst/gstevent.override +++ b/gst/gstevent.override @@ -156,3 +156,31 @@ _wrap_gst_event_parse_seek (PyGstMiniObject *self) return ret; } +%% +override gst_event_parse_buffer_size noargs +static PyObject * +_wrap_gst_event_parse_buffer_size (PyGstMiniObject *self) +{ + PyObject *ret; + GstFormat format; + gint64 minsize; + gint64 maxsize; + gboolean async; + + if (GST_EVENT_TYPE (self->obj) != GST_EVENT_BUFFERSIZE) { + PyErr_SetString(PyExc_TypeError, "Event is not an 'BufferSize' event"); + return NULL; + } + + gst_event_parse_buffer_size (GST_EVENT (self->obj), + &format, &minsize, + &maxsize, &async); + + ret = PyList_New (4); + PyList_SetItem (ret, 0, pyg_enum_from_gtype (GST_TYPE_FORMAT, format)); + PyList_SetItem (ret, 1, PyLong_FromLongLong (minsize)); + PyList_SetItem (ret, 2, PyLong_FromLongLong (maxsize)); + PyList_SetItem (ret, 3, PyBool_FromLong (async)); + + return ret; +} diff --git a/gst/libs.defs b/gst/libs.defs index 6685687..5762676 100644 --- a/gst/libs.defs +++ b/gst/libs.defs @@ -259,7 +259,7 @@ ) ) -(define-function gst_controller_init +(define-function controller_init (c-name "gst_controller_init") (return-type "gboolean") (parameters @@ -272,111 +272,111 @@ ;; From ../gstreamer/libs/gst/dataprotocol/dataprotocol.h -(define-function gst_dp_header_payload_length +(define-function dp_header_payload_length (c-name "gst_dp_header_payload_length") (return-type "guint32") (parameters - '("const-guint8*" "header") + '("const-gchar*" "header") ) ) -(define-function gst_dp_header_payload_type +(define-function dp_header_payload_type (c-name "gst_dp_header_payload_type") (return-type "GstDPPayloadType") (parameters - '("const-guint8*" "header") + '("const-gchar*" "header") ) ) -(define-function gst_dp_header_from_buffer +(define-function dp_header_from_buffer (c-name "gst_dp_header_from_buffer") (return-type "gboolean") (parameters '("const-GstBuffer*" "buffer") '("GstDPHeaderFlag" "flags") '("guint*" "length") - '("guint8**" "header") + '("gchar**" "header") ) ) -(define-function gst_dp_packet_from_caps +(define-function dp_packet_from_caps (c-name "gst_dp_packet_from_caps") (return-type "gboolean") (parameters '("const-GstCaps*" "caps") '("GstDPHeaderFlag" "flags") '("guint*" "length") - '("guint8**" "header") - '("guint8**" "payload") + '("gchar**" "header") + '("gchar**" "payload") ) ) -(define-function gst_dp_packet_from_event +(define-function dp_packet_from_event (c-name "gst_dp_packet_from_event") (return-type "gboolean") (parameters '("const-GstEvent*" "event") '("GstDPHeaderFlag" "flags") '("guint*" "length") - '("guint8**" "header") - '("guint8**" "payload") + '("gchar**" "header") + '("gchar**" "payload") ) ) -(define-function gst_dp_buffer_from_header +(define-function dp_buffer_from_header (c-name "gst_dp_buffer_from_header") (return-type "GstBuffer*") (parameters '("guint" "header_length") - '("const-guint8*" "header") + '("const-gchar*" "header") ) ) -(define-function gst_dp_caps_from_packet +(define-function dp_caps_from_packet (c-name "gst_dp_caps_from_packet") (return-type "GstCaps*") (parameters '("guint" "header_length") - '("const-guint8*" "header") - '("const-guint8*" "payload") + '("const-gchar*" "header") + '("const-gchar*" "payload") ) ) -(define-function gst_dp_event_from_packet +(define-function dp_event_from_packet (c-name "gst_dp_event_from_packet") (return-type "GstEvent*") (parameters '("guint" "header_length") - '("const-guint8*" "header") - '("const-guint8*" "payload") + '("const-gchar*" "header") + '("const-gchar*" "payload") ) ) -(define-function gst_dp_validate_header +(define-function dp_validate_header (c-name "gst_dp_validate_header") (return-type "gboolean") (parameters '("guint" "header_length") - '("const-guint8*" "header") + '("const-gchar*" "header") ) ) -(define-function gst_dp_validate_payload +(define-function dp_validate_payload (c-name "gst_dp_validate_payload") (return-type "gboolean") (parameters '("guint" "header_length") - '("const-guint8*" "header") - '("const-guint8*" "payload") + '("const-gchar*" "header") + '("const-gchar*" "payload") ) ) -(define-function gst_dp_validate_packet +(define-function dp_validate_packet (c-name "gst_dp_validate_packet") (return-type "gboolean") (parameters '("guint" "header_length") - '("const-guint8*" "header") - '("const-guint8*" "payload") + '("const-gchar*" "header") + '("const-gchar*" "payload") ) ) -- 2.7.4