Mass change to support compiling for both 0.6 and 0.7. Common support is now in common.{defs,override,c,h}. Specifi...

Original commit message from CVS:
Mass change to support compiling for both 0.6 and 0.7.  Common support is now
in common.{defs,override,c,h}.  Specific version support is in
{0.6,0.7}.{defs,override,c,h}.  The common and version specific files are
merged and/or used as needed.

common.override: add gst_version
This commit is contained in:
David I. Lehn 2003-10-10 04:21:21 +00:00
parent 26c22b53d6
commit 171bc6bfa9
29 changed files with 456 additions and 91 deletions

View file

@ -40,23 +40,18 @@ else
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
@ -66,6 +61,8 @@ fi
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)

30
gst/0.6.c Normal file
View file

@ -0,0 +1,30 @@
/* 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);
}

9
gst/0.6.defs Normal file
View file

@ -0,0 +1,9 @@
;;
;; 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")
)

24
gst/0.6.h Normal file
View file

@ -0,0 +1,24 @@
/* 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);

29
gst/0.6.override Normal file
View file

@ -0,0 +1,29 @@
/* -*- 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"

25
gst/0.7.c Normal file
View file

@ -0,0 +1,25 @@
/* 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"

0
gst/0.7.defs Normal file
View file

20
gst/0.7.h Normal file
View file

@ -0,0 +1,20 @@
/* 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>
*/

29
gst/0.7.override Normal file
View file

@ -0,0 +1,29 @@
/* -*- 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"

View file

@ -6,40 +6,61 @@ pygstreamer_PYTHON = __init__.py
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
--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)/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
# --register $(PYGTK_DEFSDIR)/gtk-types.defs
# --register $(top_srcdir)/blah/blah-types.defs

View file

@ -22,7 +22,7 @@
#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);
@ -62,8 +62,3 @@ guint add_iterate_bin(GstBin *bin) {
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);
}

View file

@ -38,16 +38,6 @@
(gtype-id "GST_TYPE_PROPS_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
;;
@ -109,6 +99,7 @@
;; 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")

View file

@ -28,4 +28,3 @@
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);

View file

@ -26,7 +26,7 @@ headers
#include "pygobject.h"
#include <gst/gst.h>
#include "gstreamer-fixes.h"
#include "common.h"
typedef struct {
PyGObject *pad;
@ -516,3 +516,15 @@ _wrap_gst_element_factory_make_element(PyGObject *self, PyObject *args, PyObject
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, &micro);
return Py_BuildValue("(iii)", major, minor, micro);
}

30
gstreamer/0.6.c Normal file
View file

@ -0,0 +1,30 @@
/* 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);
}

9
gstreamer/0.6.defs Normal file
View file

@ -0,0 +1,9 @@
;;
;; 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")
)

24
gstreamer/0.6.h Normal file
View file

@ -0,0 +1,24 @@
/* 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);

29
gstreamer/0.6.override Normal file
View file

@ -0,0 +1,29 @@
/* -*- 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"

25
gstreamer/0.7.c Normal file
View file

@ -0,0 +1,25 @@
/* 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"

0
gstreamer/0.7.defs Normal file
View file

20
gstreamer/0.7.h Normal file
View file

@ -0,0 +1,20 @@
/* 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>
*/

29
gstreamer/0.7.override Normal file
View file

@ -0,0 +1,29 @@
/* -*- 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"

View file

@ -6,40 +6,61 @@ pygstreamer_PYTHON = __init__.py
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
--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)/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
# --register $(PYGTK_DEFSDIR)/gtk-types.defs
# --register $(top_srcdir)/blah/blah-types.defs

View file

@ -22,7 +22,7 @@
#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);
@ -62,8 +62,3 @@ guint add_iterate_bin(GstBin *bin) {
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);
}

View file

@ -38,16 +38,6 @@
(gtype-id "GST_TYPE_PROPS_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
;;
@ -109,6 +99,7 @@
;; 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")

View file

@ -28,4 +28,3 @@
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);

View file

@ -26,7 +26,7 @@ headers
#include "pygobject.h"
#include <gst/gst.h>
#include "gstreamer-fixes.h"
#include "common.h"
typedef struct {
PyGObject *pad;
@ -516,3 +516,15 @@ _wrap_gst_element_factory_make_element(PyGObject *self, PyObject *args, PyObject
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, &micro);
return Py_BuildValue("(iii)", major, minor, micro);
}