2006-10-20 Edward Hervey <edward@fluendo.com>
+ * configure.ac:
+ * gst/Makefile.am:
+ * gst/gst-0.10.11.ignore:
+ * gst/gstversion.override.in:
+ Added ignore files for 0.10.11 gstreamer core
+ * gst/base.defs:
+ Updated API for base libs
+ * gst/gst.defs:
+ Updated API for core
+ * gst/gst.override:
+ remove #ifdef for methods which weren't available in versions of pygtk
+ we don't support anymore.
+ * gst/gstbase.override:
+ Added overrides for GstBaseSink::get_times() virtual method
+ * gst/gstbin.override:
+ Added override for GstBin::handle_message() virtual method
+
+2006-10-20 Edward Hervey <edward@fluendo.com>
+
* examples/Makefile.am:
Remove gst123 and vorbisplay.py from sources, and add decodebin.py
IGNORE_GST_0_10_10=""
fi
+ if test $GST_MINOR_VERSION -lt "11"
+ then
+ IGNORE_GST_0_10_11="gst-0.10.11.ignore"
+ else
+ IGNORE_GST_0_10_11=""
+ fi
+
else
IGNORE_GST_0_10_3=""
IGNORE_GST_0_10_4=""
IGNORE_GST_0_10_6=""
IGNORE_GST_0_10_7=""
IGNORE_GST_0_10_10=""
+ IGNORE_GST_0_10_11=""
fi
AC_SUBST(IGNORE_GST_0_10_3)
AC_SUBST(IGNORE_GST_0_10_4)
AC_SUBST(IGNORE_GST_0_10_6)
AC_SUBST(IGNORE_GST_0_10_7)
AC_SUBST(IGNORE_GST_0_10_10)
+AC_SUBST(IGNORE_GST_0_10_11)
dnl check for gstreamer-base; uninstalled is selected preferentially
PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQ,
gst-0.10.5.ignore \
gst-0.10.6.ignore \
gst-0.10.7.ignore \
- gst-0.10.10.ignore
+ gst-0.10.10.ignore \
+ gst-0.10.11.ignore
INCLUDES = $(PYTHON_INCLUDES)
EXTRA_DIST = $(defs_DATA) $(versioned_overrides) common.h arg-types.py
(return-type "GType")
)
+(define-method wait_preroll
+ (of-object "GstBaseSink")
+ (c-name "gst_base_sink_wait_preroll")
+ (return-type "GstFlowReturn")
+)
(define-method set_sync
(of-object "GstBaseSink")
(return-type "GType")
)
+(define-method wait_playing
+ (of-object "GstBaseSrc")
+ (c-name "gst_base_src_wait_playing")
+ (return-type "GstFlowReturn")
+)
+
(define-method set_live
(of-object "GstBaseSrc")
(c-name "gst_base_src_set_live")
(return-type "GType")
)
-(define-function gst_collect_pads_new
+(define-function collect_pads_new
(c-name "gst_collect_pads_new")
(is-constructor-of "GstCollectPads")
(return-type "GstCollectPads*")
--- /dev/null
+%%
+ignore
+ gst_message_parse_buffering
+ gst_message_new_buffering
+ gst_base_sink_wait_preroll
+ gst_base_src_wait_playing
+ gst_tag_list_is_empty
+%%
'("gdouble" "rate")
'("GstFormat" "format")
'("GstSeekFlags" "flags")
- '("GstSeekType" "cur_type")
- '("gint64" "cur")
+ '("GstSeekType" "start_type")
+ '("gint64" "start")
'("GstSeekType" "stop_type")
'("gint64" "stop")
)
'("gdouble*" "rate")
'("GstFormat*" "format")
'("GstSeekFlags*" "flags")
- '("GstSeekType*" "cur_type")
- '("gint64*" "cur")
+ '("GstSeekType*" "start_type")
+ '("gint64*" "start")
'("GstSeekType*" "stop_type")
'("gint64*" "stop")
)
)
)
+(define-function gst_message_new_buffering
+ (c-name "gst_message_new_buffering")
+ (return-type "GstMessage*")
+ (parameters
+ '("GstObject*" "src")
+ '("gint" "percent")
+ )
+)
+
(define-function message_new_state_changed
(c-name "gst_message_new_state_changed")
(return-type "GstMessage*")
)
)
+(define-method parse_buffering
+ (of-object "GstMessage")
+ (c-name "gst_message_parse_buffering")
+ (return-type "none")
+ (parameters
+ '("gint*" "percent")
+ )
+)
+
(define-method parse_state_changed
(of-object "GstMessage")
(c-name "gst_message_parse_state_changed")
(define-method save_thyself
(of-object "GstObject")
(c-name "gst_object_save_thyself")
- (return-type "xmlNodePtr")
+ (return-type "GstXmlNodePtr")
(parameters
- '("xmlNodePtr" "parent")
+ '("GstXmlNodePtr" "parent")
)
)
(c-name "gst_object_restore_thyself")
(return-type "none")
(parameters
- '("xmlNodePtr" "self")
+ '("GstXmlNodePtr" "self")
)
)
(parameters
'("GstObject*" "object")
'("const-gchar*" "name")
- '("xmlNodePtr" "self")
+ '("GstXmlNodePtr" "self")
)
)
(define-virtual save_thyself
(of-object "GstObject")
- (return-type "xmlNodePtr")
+ (return-type "GstXmlNodePtr")
(parameters
- '("xmlNodePtr" "parent")
+ '("GstXmlNodePtr" "parent")
)
)
(of-object "GstObject")
(return-type "none")
(parameters
- '("xmlNodePtr" "self")
+ '("GstXmlNodePtr" "self")
)
)
(c-name "gst_pad_load_and_link")
(return-type "none")
(parameters
- '("xmlNodePtr" "self")
+ '("GstXmlNodePtr" "self")
'("GstObject*" "parent")
)
)
'("gdouble" "rate")
'("GstFormat" "format")
'("GstSeekFlags" "flags")
- '("GstSeekType" "cur_type")
- '("gint64" "cur")
+ '("GstSeekType" "start_type")
+ '("gint64" "start")
'("GstSeekType" "stop_type")
'("gint64" "stop")
'("gboolean*" "update")
(caller-owns-return #t)
)
+(define-method is_empty
+ (of-object "GstTagList")
+ (c-name "gst_tag_list_is_empty")
+ (return-type "gboolean")
+)
+
(define-method insert
(of-object "GstTagList")
(c-name "gst_tag_list_insert")
return TRUE;
}
-#ifdef pyg_register_class_init
PyTypeObject PyGstPadTemplate_Type;
static int
add_templates (gpointer gclass, PyObject *templates)
return 0;
}
-#endif
static PyObject *
pygst_debug_log (PyObject *pyobject, PyObject *string, GstDebugLevel level,
%%
init
{
-/* FIXME: new in pygtk-2.6 */
-#ifdef pyg_register_class_init
pyg_register_class_init (GST_TYPE_ELEMENT, _pygst_element_init);
-#endif
if (!pygst_value_init())
return;
gst_controller_init(NULL, NULL);
return py_ret;
}
+%%
+override GstBaseSink__proxy_do_get_times
+static void
+_wrap_GstBaseSink__proxy_do_get_times (GstBaseSink * self,
+ GstBuffer *buffer,
+ GstClockTime * start,
+ GstClockTime * end)
+{
+ PyGILState_STATE __py_state;
+ PyObject *py_args;
+ PyObject *py_self;
+ PyObject *py_method;
+ PyObject *py_ret;
+
+ __py_state = pyg_gil_state_ensure();
+
+ py_self = pygobject_new((GObject *) self);
+ if (!py_self) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ return;
+ }
+
+ py_args = Py_BuildValue ("(N)",
+ pygstminiobject_new((GstMiniObject *)buffer));
+
+ py_method = PyObject_GetAttrString(py_self, "do_get_times");
+
+ Py_DECREF(py_self);
+
+ if (!py_method) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ goto beach;
+ }
+
+ py_ret = PyObject_CallObject(py_method, py_args);
+
+ Py_DECREF(py_method);
+
+ if (!py_ret) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ goto beach;
+ }
+
+ /*
+ If the method returned a numeric, the return value will be TRUE.
+ For ANY other case, we don't set size and the return value is FALSE.
+ */
+
+ if ((PyTuple_Check(py_ret)) && (PyTuple_Size (py_ret) == 2))
+ PyArg_ParseTuple (py_ret, "KK", start, end);
+
+ Py_DECREF (py_ret);
+ beach:
+ Py_DECREF (py_args);
+ pyg_gil_state_release(__py_state);
+ return;
+}
+%%
+override GstBaseSink__do_get_times kwargs
+static PyObject *
+_wrap_GstBaseSink__do_get_times (PyObject *cls, PyObject *args, PyObject *kwargs)
+{
+ gpointer klass;
+ static char *kwlist[] = { "self", "buffer", NULL };
+ PyGObject *self;
+ PyGstMiniObject *py_buffer;
+ GstClockTime start = 0;
+ GstClockTime end = 0;
+ PyObject *py_ret;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!:GstBaseSink.get_times",
+ kwlist, &PyGstBaseSink_Type, &self,
+ &PyGstBuffer_Type, &py_buffer))
+ return NULL;
+ klass = g_type_class_ref(pyg_type_from_object(cls));
+ if (GST_BASE_SINK_CLASS(klass)->get_times)
+ GST_BASE_SINK_CLASS(klass)->get_times(GST_BASE_SINK(self->obj),
+ GST_BUFFER(py_buffer->obj),
+ &start, &end);
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "virtual method GstBaseSink.get_times not implemented");
+ g_type_class_unref(klass);
+ return NULL;
+ }
+ g_type_class_unref(klass);
+
+ py_ret = PyTuple_New(2);
+ PyTuple_SetItem(py_ret, 0, PyLong_FromUnsignedLongLong(start));
+ PyTuple_SetItem(py_ret, 1, PyLong_FromUnsignedLongLong(end));
+
+ return py_ret;
+}
{
return _wrap_gst_bin_iterate_elements(self);
}
+%%
+override GstBin__do_handle_message kwargs
+static PyObject *
+_wrap_GstBin__do_handle_message(PyObject *cls, PyObject *args, PyObject *kwargs)
+{
+ gpointer klass;
+ static char *kwlist[] = { "self", "message", NULL };
+ PyGObject *self;
+ PyGstMiniObject *message;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!:GstBin.handle_message", kwlist, &PyGstBin_Type, &self, &PyGstMessage_Type, &message))
+ return NULL;
+ klass = g_type_class_ref(pyg_type_from_object(cls));
+ if (GST_BIN_CLASS(klass)->handle_message) {
+ gst_mini_object_ref (message->obj);
+ GST_BIN_CLASS(klass)->handle_message(GST_BIN(self->obj), GST_MESSAGE(message->obj));
+ } else {
+ PyErr_SetString(PyExc_NotImplementedError, "virtual method GstBin.handle_message not implemented");
+ g_type_class_unref(klass);
+ return NULL;
+ }
+ g_type_class_unref(klass);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
@IGNORE_GST_0_10_6@
@IGNORE_GST_0_10_7@
@IGNORE_GST_0_10_10@
+@IGNORE_GST_0_10_11@
%%