diff --git a/ChangeLog b/ChangeLog index e297553480..7f67961035 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-29 Edward Hervey + + * gst/gst.defs: + Update for API changes + * gst/gstquery.override: + wrapper for query_parse_seeking() + 2005-11-24 Edward Hervey * gst/gst.override: diff --git a/common b/common index ea1409191c..33084fbe05 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit ea1409191cc1e71273b2dbdd94e7ab5fc5a60a51 +Subproject commit 33084fbe0531733bc02aa1d9de608206d5553a15 diff --git a/gst/gst.defs b/gst/gst.defs index 5ef4c7bd18..d58bb49520 100644 --- a/gst/gst.defs +++ b/gst/gst.defs @@ -4351,6 +4351,14 @@ ) +(define-function query_new_seeking + (c-name "gst_query_new_seeking") + (return-type "GstQuery*") + (parameters + '("GstFormat" "format") + ) +) + (define-method set_seeking (of-object "GstQuery") (c-name "gst_query_set_seeking") @@ -4363,6 +4371,18 @@ ) ) +(define-method parse_seeking + (of-object "GstQuery") + (c-name "gst_query_parse_seeking") + (return-type "none") + (parameters + '("GstFormat*" "format") + '("gboolean*" "seekable") + '("gint64*" "segment_start") + '("gint64*" "segment_end") + ) +) + (define-method set_formats (of-object "GstQuery") (c-name "gst_query_set_formats") @@ -6576,14 +6596,14 @@ (return-type "none") (parameters '("GValue*" "value") - '("int" "start") - '("int" "end") + '("gint" "start") + '("gint" "end") ) ) (define-function value_get_int_range_min (c-name "gst_value_get_int_range_min") - (return-type "int") + (return-type "gint") (parameters '("const-GValue*" "value") ) @@ -6591,7 +6611,7 @@ (define-function value_get_int_range_max (c-name "gst_value_get_int_range_max") - (return-type "int") + (return-type "gint") (parameters '("const-GValue*" "value") ) @@ -6602,14 +6622,14 @@ (return-type "none") (parameters '("GValue*" "value") - '("double" "start") - '("double" "end") + '("gdouble" "start") + '("gdouble" "end") ) ) (define-function value_get_double_range_min (c-name "gst_value_get_double_range_min") - (return-type "double") + (return-type "gdouble") (parameters '("const-GValue*" "value") ) @@ -6617,7 +6637,7 @@ (define-function value_get_double_range_max (c-name "gst_value_get_double_range_max") - (return-type "double") + (return-type "gdouble") (parameters '("const-GValue*" "value") ) @@ -6645,14 +6665,14 @@ (return-type "none") (parameters '("GValue*" "value") - '("int" "numerator") - '("int" "denominator") + '("gint" "numerator") + '("gint" "denominator") ) ) (define-function value_get_fraction_numerator (c-name "gst_value_get_fraction_numerator") - (return-type "int") + (return-type "gint") (parameters '("const-GValue*" "value") ) @@ -6660,7 +6680,7 @@ (define-function value_get_fraction_denominator (c-name "gst_value_get_fraction_denominator") - (return-type "int") + (return-type "gint") (parameters '("const-GValue*" "value") ) @@ -6701,10 +6721,10 @@ (return-type "none") (parameters '("GValue*" "value") - '("int" "numerator_start") - '("int" "denominator_start") - '("int" "numerator_end") - '("int" "denominator_end") + '("gint" "numerator_start") + '("gint" "denominator_start") + '("gint" "numerator_end") + '("gint" "denominator_end") ) ) @@ -6743,7 +6763,7 @@ (define-function value_compare (c-name "gst_value_compare") - (return-type "int") + (return-type "gint") (parameters '("const-GValue*" "value1") '("const-GValue*" "value2") diff --git a/gst/gstquery.override b/gst/gstquery.override index d761509a2b..d7e035f54b 100644 --- a/gst/gstquery.override +++ b/gst/gstquery.override @@ -118,3 +118,30 @@ _wrap_gst_query_parse_segment (PyGstMiniObject *self) return ret; } +%% +override gst_query_parse_seeking noargs +static PyObject * +_wrap_gst_query_parse_seeking (PyGstMiniObject *self) +{ + PyObject *ret; + GstFormat format; + gboolean seekable; + gint64 segment_start, segment_end; + + if (GST_QUERY_TYPE(self->obj) != GST_QUERY_SEEKING) { + PyErr_SetString(PyExc_TypeError, "Query is not a 'Seeking' query"); + return NULL; + } + + gst_query_parse_seeking (GST_QUERY(self->obj), + &format, &seekable, + &segment_start, &segment_end); + + ret = PyList_New(4); + PyList_SetItem (ret, 0, pyg_enum_from_gtype (GST_TYPE_FORMAT, format)); + PyList_SetItem (ret, 1, PyBool_FromLong (seekable)); + PyList_SetItem (ret, 2, PyLong_FromLongLong(segment_start)); + PyList_SetItem (ret, 3, PyLong_FromLongLong(segment_end)); + + return ret; +}