gst/gst.defs: gst_object_sink is a method of GstObject const of enums is a stupidity...
authorEdward Hervey <bilboed@bilboed.com>
Sun, 18 Dec 2005 17:20:12 +0000 (17:20 +0000)
committerEdward Hervey <bilboed@bilboed.com>
Sun, 18 Dec 2005 17:20:12 +0000 (17:20 +0000)
Original commit message from CVS:
* 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()

ChangeLog
common
gst/gst.defs
gst/gst.override
gst/gststructure.override
gst/gsttaglist.override
gst/interfaces.override

index 3fe2969..578899a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2005-12-18  Edward Hervey  <edward@fluendo.com>
+
+       * 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  <wingo@pobox.com>
 
        * gst/gstpad.override (handle_event_function_exception) 
diff --git a/common b/common
index 4edc214..d1911d4 160000 (submodule)
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 4edc214072fe07d2aade96bc336493425654d7b4
+Subproject commit d1911d4b3d6267f9cd9dfb68fcef2afe4d098092
index 7601641..936cffa 100644 (file)
   )
 )
 
+(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")
   )
 )
 
-(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")
   (c-name "gst_element_make_from_uri")
   (return-type "GstElement*")
   (parameters
-    '("const-GstURIType" "type")
+    '("GstURIType" "type")
     '("const-gchar*" "uri")
     '("const-gchar*" "elementname")
   )
index 13055cd..6835a15 100644 (file)
@@ -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, &micro, &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;
+}
index 883bff1..7aefc59 100644 (file)
@@ -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
index 0df2706..85ae61a 100644 (file)
@@ -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
index e040745..70433a2 100644 (file)
@@ -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;
+}