fi
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
-dnl Only support 0.6 in 0.1.0. Remove this and enable code below for 0.7.
-GST_MAJORMINOR=0.6
+dnl check for GStreamer
+dnl start with 0.7
+GST_MAJORMINOR=0.7
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
-dnl check for GStreamer
-dnl start with 0.7
-dnl GST_MAJORMINOR=0.7
-dnl PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
-dnl HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
-dnl
dnl try 0.6
-dnl if test "x$HAVE_GSTREAMER" = "xno"; then
-dnl GST_MAJORMINOR=0.6
-dnl PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
-dnl HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
-dnl fi
+if test "x$HAVE_GSTREAMER" = "xno"; then
+ GST_MAJORMINOR=0.6
+ PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ,
+ HAVE_GSTREAMER=yes,HAVE_GSTREAMER=no)
+fi
dnl Give error and exit if we don't have gstreamer
if test "x$HAVE_GSTREAMER" = "xno"; then
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_MAJORMINOR)
+AM_CONDITIONAL(GST_0_6, test $GST_MAJORMINOR = 0.6)
+AM_CONDITIONAL(GST_0_7, test $GST_MAJORMINOR = 0.7)
dnl check for pygtk
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= $PYGTK_REQ)
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.6.h"
+
+GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
+{
+ return gst_props_entry_get_type(entry);
+}
--- /dev/null
+;;
+;; Override normal *_get_type handling via rename
+;;
+
+(define-method get_props_type
+ (of-object "GstPropsEntry")
+ (c-name "gst_props_entry_get_props_type")
+ (return-type "GstPropsType")
+)
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include <gst/gst.h>
+
+GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
--- /dev/null
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+%%
+headers
+#include <Python.h>
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.6.h"
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.7.h"
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
--- /dev/null
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+%%
+headers
+#include <Python.h>
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.7.h"
pygstreamerexecdir = $(pyexecdir)/gstreamer
-# gstreamer binding
-OVERRIDES = gstreamer.override
+GST_OVERRIDES = common.override \
+ 0.6.override \
+ 0.7.override
+GST_DEFS = common.defs \
+ 0.6.defs \
+ 0.7.defs
+GST_CODE = common.c common.h \
+ 0.6.c 0.6.h \
+ 0.7.c 0.7.h
+
+# Ugly hack to pick the proper version code.
+# Just setting to $(GST_MAJORMINOR).{ch} will not work
+if GST_0_6
+VERSOURCES = 0.6.c 0.6.h
+endif
+if GST_0_7
+VERSOURCES = 0.7.c 0.7.h
+endif
pyexec_LTLIBRARIES = _gstreamermodule.la
-_gstreamermodule_la_SOURCES = gstreamermodule.c gstreamer-fixes.c gstreamer-fixes.h
+_gstreamermodule_la_SOURCES = \
+ gstreamermodule.c \
+ common.c common.h \
+ $(VERSOURCES)
_gstreamermodule_la_CFLAGS = $(GST_CFLAGS)
_gstreamermodule_la_LIBADD = $(GST_LIBS)
_gstreamermodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gstreamer
nodist__gstreamermodule_la_SOURCES = gstreamer.c
-CLEANFILES = gstreamer.c gstreamer-base.defs gstreamer.defs
-EXTRA_DIST = gstreamer-extra.defs $(OVERRIDES) gstreamer-arg-types.py
-gstreamer.c: gstreamer.defs $(OVERRIDES)
+
+CLEANFILES = gstreamer.c core.defs gstreamer.defs gstreamer.override
+EXTRA_DIST = $(GST_OVERRIDES) $(GST_DEFS) $(GST_CODE) arg-types.py
+
+gstreamer.c: gstreamer.defs gstreamer.override
GST_EXCLUDE_INCLUDES=\
$(GST_INCLUDEDIR)/gst/gstatomic_impl.h \
$(GST_INCLUDEDIR)/gst/gstcompat.h
GST_INCLUDES=$(filter-out $(GST_EXCLUDE_INCLUDES),$(wildcard $(GST_INCLUDEDIR)/gst/*.h))
-gstreamer-base.defs: $(GST_INCLUDES)
- $(PYTHON) $(PYGTK_H2DEF) $(GST_INCLUDES) > gstreamer-base.defs
+gstreamer.override: common.override $(GST_MAJORMINOR).override
+ cat $+ > $@
-gstreamer.defs: gstreamer-base.defs gstreamer-extra.defs $(top_srcdir)/gstreamer/gstreamer-arg-types.py
- cat gstreamer-base.defs $(srcdir)/gstreamer-extra.defs > gstreamer.defs
+core.defs: $(GST_INCLUDES)
+ $(PYTHON) $(PYGTK_H2DEF) $(GST_INCLUDES) > $@
-.defs.c:
+gstreamer.defs: core.defs common.defs $(GST_MAJORMINOR).defs
+ cat $+ > $@
+
+gstreamer.c: gstreamer.defs arg-types.py gstreamer.override
$(PYGTK_CODEGEN) \
- --load-types $(srcdir)/gstreamer-arg-types.py \
- --override $(srcdir)/$*.override \
- --prefix py$* $*.defs > gen-$*.c \
- && cp gen-$*.c $*.c \
- && rm -f gen-$*.c
-
-# --register $(PYGTK_DEFSDIR)/pango-types.defs
-# --register $(PYGTK_DEFSDIR)/gdk-types.defs
-# --register $(PYGTK_DEFSDIR)/gtk-types.defs
-# --register $(top_srcdir)/bonobo/bonobo-types.defs
-# --register $(top_srcdir)/bonobo/bonoboui-types.defs
+ --load-types $(srcdir)/arg-types.py \
+ --override $(srcdir)/gstreamer.override \
+ --prefix pygstreamer gstreamer.defs > gen-gstreamer.c \
+ && cp gen-gstreamer.c gstreamer.c \
+ && rm -f gen-gstreamer.c
+
+# --register $(PYGTK_DEFSDIR)/gtk-types.defs
+# --register $(top_srcdir)/blah/blah-types.defs
#include "pygobject.h"
#include <gst/gst.h>
-#include "gstreamer-fixes.h"
+#include "common.h"
void iterate_bin_all(GstBin *bin) {
g_return_if_fail(bin != NULL);
void remove_iterate_bin(guint id) {
g_source_remove(id);
}
-
-GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
-{
- return gst_props_entry_get_type(entry);
-}
)
;;
-;; Override normal *_get_type handling via rename
-;;
-
-(define-method get_props_type
- (of-object "GstPropsEntry")
- (c-name "gst_props_entry_get_props_type")
- (return-type "GstPropsType")
-)
-
-;;
;; Access GstProps properties list
;;
;; Element constructor override; uses a nonexistant make_element
;; which is defined in gstreamer.overrides
;;
+
(define-function gst_element_factory_make_element
(is-constructor-of "GstElement")
(c-name "gst_element_factory_make_element")
void iterate_bin_all(GstBin *bin);
guint add_iterate_bin(GstBin *bin);
void remove_iterate_bin(guint id);
-GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
#include "pygobject.h"
#include <gst/gst.h>
-#include "gstreamer-fixes.h"
+#include "common.h"
typedef struct {
PyGObject *pad;
pygobject_register_wrapper((PyObject *)self);
return 0;
}
+%%
+override gst_version
+
+static PyObject *
+_wrap_gst_version(PyGObject *self)
+{
+ guint major, minor, micro;
+
+ gst_version(&major, &minor, µ);
+
+ return Py_BuildValue("(iii)", major, minor, micro);
+}
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.6.h"
+
+GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
+{
+ return gst_props_entry_get_type(entry);
+}
--- /dev/null
+;;
+;; Override normal *_get_type handling via rename
+;;
+
+(define-method get_props_type
+ (of-object "GstPropsEntry")
+ (c-name "gst_props_entry_get_props_type")
+ (return-type "GstPropsType")
+)
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include <gst/gst.h>
+
+GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
--- /dev/null
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+%%
+headers
+#include <Python.h>
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.6.h"
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.7.h"
--- /dev/null
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
--- /dev/null
+/* -*- Mode: C; c-basic-offset: 4 -*- */
+/* gst-python
+ * Copyright (C) 2002 David I. Lehn
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David I. Lehn <dlehn@users.sourceforge.net>
+ */
+%%
+headers
+#include <Python.h>
+
+#include "pygobject.h"
+#include <gst/gst.h>
+
+#include "0.7.h"
pygstreamerexecdir = $(pyexecdir)/gstreamer
-# gstreamer binding
-OVERRIDES = gstreamer.override
+GST_OVERRIDES = common.override \
+ 0.6.override \
+ 0.7.override
+GST_DEFS = common.defs \
+ 0.6.defs \
+ 0.7.defs
+GST_CODE = common.c common.h \
+ 0.6.c 0.6.h \
+ 0.7.c 0.7.h
+
+# Ugly hack to pick the proper version code.
+# Just setting to $(GST_MAJORMINOR).{ch} will not work
+if GST_0_6
+VERSOURCES = 0.6.c 0.6.h
+endif
+if GST_0_7
+VERSOURCES = 0.7.c 0.7.h
+endif
pyexec_LTLIBRARIES = _gstreamermodule.la
-_gstreamermodule_la_SOURCES = gstreamermodule.c gstreamer-fixes.c gstreamer-fixes.h
+_gstreamermodule_la_SOURCES = \
+ gstreamermodule.c \
+ common.c common.h \
+ $(VERSOURCES)
_gstreamermodule_la_CFLAGS = $(GST_CFLAGS)
_gstreamermodule_la_LIBADD = $(GST_LIBS)
_gstreamermodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gstreamer
nodist__gstreamermodule_la_SOURCES = gstreamer.c
-CLEANFILES = gstreamer.c gstreamer-base.defs gstreamer.defs
-EXTRA_DIST = gstreamer-extra.defs $(OVERRIDES) gstreamer-arg-types.py
-gstreamer.c: gstreamer.defs $(OVERRIDES)
+
+CLEANFILES = gstreamer.c core.defs gstreamer.defs gstreamer.override
+EXTRA_DIST = $(GST_OVERRIDES) $(GST_DEFS) $(GST_CODE) arg-types.py
+
+gstreamer.c: gstreamer.defs gstreamer.override
GST_EXCLUDE_INCLUDES=\
$(GST_INCLUDEDIR)/gst/gstatomic_impl.h \
$(GST_INCLUDEDIR)/gst/gstcompat.h
GST_INCLUDES=$(filter-out $(GST_EXCLUDE_INCLUDES),$(wildcard $(GST_INCLUDEDIR)/gst/*.h))
-gstreamer-base.defs: $(GST_INCLUDES)
- $(PYTHON) $(PYGTK_H2DEF) $(GST_INCLUDES) > gstreamer-base.defs
+gstreamer.override: common.override $(GST_MAJORMINOR).override
+ cat $+ > $@
-gstreamer.defs: gstreamer-base.defs gstreamer-extra.defs $(top_srcdir)/gstreamer/gstreamer-arg-types.py
- cat gstreamer-base.defs $(srcdir)/gstreamer-extra.defs > gstreamer.defs
+core.defs: $(GST_INCLUDES)
+ $(PYTHON) $(PYGTK_H2DEF) $(GST_INCLUDES) > $@
-.defs.c:
+gstreamer.defs: core.defs common.defs $(GST_MAJORMINOR).defs
+ cat $+ > $@
+
+gstreamer.c: gstreamer.defs arg-types.py gstreamer.override
$(PYGTK_CODEGEN) \
- --load-types $(srcdir)/gstreamer-arg-types.py \
- --override $(srcdir)/$*.override \
- --prefix py$* $*.defs > gen-$*.c \
- && cp gen-$*.c $*.c \
- && rm -f gen-$*.c
-
-# --register $(PYGTK_DEFSDIR)/pango-types.defs
-# --register $(PYGTK_DEFSDIR)/gdk-types.defs
-# --register $(PYGTK_DEFSDIR)/gtk-types.defs
-# --register $(top_srcdir)/bonobo/bonobo-types.defs
-# --register $(top_srcdir)/bonobo/bonoboui-types.defs
+ --load-types $(srcdir)/arg-types.py \
+ --override $(srcdir)/gstreamer.override \
+ --prefix pygstreamer gstreamer.defs > gen-gstreamer.c \
+ && cp gen-gstreamer.c gstreamer.c \
+ && rm -f gen-gstreamer.c
+
+# --register $(PYGTK_DEFSDIR)/gtk-types.defs
+# --register $(top_srcdir)/blah/blah-types.defs
#include "pygobject.h"
#include <gst/gst.h>
-#include "gstreamer-fixes.h"
+#include "common.h"
void iterate_bin_all(GstBin *bin) {
g_return_if_fail(bin != NULL);
void remove_iterate_bin(guint id) {
g_source_remove(id);
}
-
-GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry)
-{
- return gst_props_entry_get_type(entry);
-}
)
;;
-;; Override normal *_get_type handling via rename
-;;
-
-(define-method get_props_type
- (of-object "GstPropsEntry")
- (c-name "gst_props_entry_get_props_type")
- (return-type "GstPropsType")
-)
-
-;;
;; Access GstProps properties list
;;
;; Element constructor override; uses a nonexistant make_element
;; which is defined in gstreamer.overrides
;;
+
(define-function gst_element_factory_make_element
(is-constructor-of "GstElement")
(c-name "gst_element_factory_make_element")
void iterate_bin_all(GstBin *bin);
guint add_iterate_bin(GstBin *bin);
void remove_iterate_bin(guint id);
-GstPropsType gst_props_entry_get_props_type(GstPropsEntry *entry);
#include "pygobject.h"
#include <gst/gst.h>
-#include "gstreamer-fixes.h"
+#include "common.h"
typedef struct {
PyGObject *pad;
pygobject_register_wrapper((PyObject *)self);
return 0;
}
+%%
+override gst_version
+
+static PyObject *
+_wrap_gst_version(PyGObject *self)
+{
+ guint major, minor, micro;
+
+ gst_version(&major, &minor, µ);
+
+ return Py_BuildValue("(iii)", major, minor, micro);
+}