diff --git a/ChangeLog b/ChangeLog index 3fe2969ba3..578899a2c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +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) + * gst/gst.override: + Ignore more functions that have no place in bindings or have better + python equivalents (list filtering for example) + Wrapped gst_version() and gst_type_find_factory_get_list() + * gst/gststructure.override: + More ignores + * gst/gsttaglist.override: + ignore gst_is_tag_list. + * gst/interfaces.override: + wrap gst_mixer_options_get_values() + 2005-12-16 Andy Wingo * gst/gstpad.override (handle_event_function_exception) diff --git a/common b/common index 4edc214072..d1911d4b3d 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4 +Subproject commit d1911d4b3d6267f9cd9dfb68fcef2afe4d098092 diff --git a/gst/gst.defs b/gst/gst.defs index 760164105d..936cffaef7 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -3087,6 +3087,12 @@ ) ) +(define-method sink + (of-object "GstObject") + (c-name "gst_object_sink") + (return-type "none") +) + (define-function object_default_deep_notify (c-name "gst_object_default_deep_notify") (return-type "none") @@ -3114,14 +3120,6 @@ ) ) -(define-function object_sink - (c-name "gst_object_sink") - (return-type "none") - (parameters - '("gpointer" "object") - ) -) - (define-function object_replace (c-name "gst_object_replace") (return-type "none") @@ -6003,7 +6001,7 @@ (c-name "gst_element_make_from_uri") (return-type "GstElement*") (parameters - '("const-GstURIType" "type") + '("GstURIType" "type") '("const-gchar*" "uri") '("const-gchar*" "elementname") ) diff --git a/gst/gst.override b/gst/gst.override index 13055cd55d..6835a15e2f 100644 --- a/gst/gst.override +++ b/gst/gst.override @@ -317,6 +317,12 @@ ignore gst_util_set_value_from_string gst_print_element_args gst_atomic_int_set + gst_caps_replace + gst_mini_object_replace + gst_filter_run + gst_flow_to_quark + gst_implements_interface_cast + gst_implements_interface_check %% override-slot GstPluginFeature.tp_repr static PyObject * @@ -867,3 +873,42 @@ _wrap_GST_TIME_ARGS(PyObject *self, PyObject *args, PyObject *kwargs) g_free(ret); return string; } +%% +override gst_type_find_factory_get_list noargs +static PyObject * +_wrap_gst_type_find_factory_get_list (PyObject *self) +{ + GList *l, *list; + PyObject *py_list; + int i = 0; + + list = gst_type_find_factory_get_list (); + + py_list = PyList_New(g_list_length(list)); + for (l = list; l ; l = g_list_next(l), i++) { + GstTypeFindFactory *fact = (GstTypeFindFactory*) l->data; + + PyList_SetItem(py_list, i, + pygstobject_new (G_OBJECT (fact))); + } + g_list_free (list); + + return py_list; +} +%% +override gst_version noargs +static PyObject * +_wrap_gst_version (PyObject *self) +{ + guint major, minor, micro, nano; + PyObject *py_tuple; + + gst_version (&major, &minor, µ, &nano); + py_tuple = PyTuple_New(4); + PyTuple_SetItem(py_tuple, 0, PyInt_FromLong(major)); + PyTuple_SetItem(py_tuple, 1, PyInt_FromLong(minor)); + PyTuple_SetItem(py_tuple, 2, PyInt_FromLong(micro)); + PyTuple_SetItem(py_tuple, 3, PyInt_FromLong(nano)); + + return py_tuple; +} diff --git a/gst/gststructure.override b/gst/gststructure.override index 883bff11a5..7aefc59680 100644 --- a/gst/gststructure.override +++ b/gst/gststructure.override @@ -30,11 +30,15 @@ ignore gst_structure_get_string gst_structure_get_value gst_structure_get_enum + gst_structure_get_fraction gst_structure_set gst_structure_get_name_id gst_structure_id_get_value gst_structure_id_set_value gst_structure_set_parent_refcount + gst_structure_remove_fields + gst_structure_map_in_place + gst_structure_fixate_field_nearest_fraction %% override gst_structure_new kwargs static int diff --git a/gst/gsttaglist.override b/gst/gsttaglist.override index 0df270661a..85ae61ac2b 100644 --- a/gst/gsttaglist.override +++ b/gst/gsttaglist.override @@ -32,6 +32,7 @@ ignore gst_tag_list_get gst_tag_list_remove_tag gst_tag_list_foreach + gst_is_tag_list %% define GstTagList.keys noargs static void diff --git a/gst/interfaces.override b/gst/interfaces.override index e0407457c1..70433a2e47 100644 --- a/gst/interfaces.override +++ b/gst/interfaces.override @@ -138,3 +138,25 @@ _wrap_gst_color_balance_list_channels(PyGObject *self) return py_list; } +%% +override gst_mixer_options_get_values noargs +static PyObject * +_wrap_gst_mixer_options_get_values (PyGObject *self) +{ + GList *l, *list; + PyObject *py_list; + + g_return_val_if_fail (GST_IS_MIXER_OPTIONS (self->obj), PyList_New(0)); + + list = gst_mixer_options_get_values (GST_MIXER_OPTIONS (self->obj)); + + py_list = PyList_New(0); + for (l = list; l; l = l->next) { + gchar *value = (gchar *) l->data; + PyObject *py_string = PyString_FromString(g_strdup(value)); + PyList_Append(py_list, py_string); + Py_DECREF (py_string); + } + + return py_list; +}