Commit 212df272 authored by Johan Dahlin's avatar Johan Dahlin

gstreamer/: All over the place, more rename work (gstreamer -> gst)

Original commit message from CVS:
* gstreamer/: All over the place, more rename work (gstreamer -> gst)
parent a37dede0
2004-02-27 Johan Dahlin <johan@gnome.org>
* gstreamer/: All over the place, more rename work (gstreamer -> gst)
* examples/gstreamer/filesrc.py,player.py: New examples
* gstreamer/gstreamer.override: Add a dict like interface to GstTagList
......
......@@ -4,13 +4,8 @@ else
SUBDIRS_DOCS =
endif
if GST_0_6
INTERFACESDIR =
PLAYDIR =
else
INTERFACESDIR = gstinterfaces
PLAYDIR = gstplay
endif
UNCONDDIRS = gstreamer pkgconfig examples testsuite
SUBDIRS = \
......
......@@ -3,7 +3,7 @@
DIE=0
package=gst-python
srcfile=gstreamer/gstreamermodule.c
srcfile=gstreamer/gstmodule.c
# a quick cvs co if necessary to alleviate the pain - may remove this
# when developers get a clue ;)
......
......@@ -6,7 +6,7 @@ AC_CANONICAL_TARGET
AS_VERSION(gst-python, GST_PYTHON_VERSION, 0, 1, 0, 1)
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
AC_CONFIG_SRCDIR([gstreamer/gstreamermodule.c])
AC_CONFIG_SRCDIR([gstreamer/gstmodule.c])
AM_CONFIG_HEADER(config.h)
dnl Add parameters for aclocal
......@@ -16,7 +16,7 @@ dnl required versions of other packages
AC_SUBST(PYGTK_REQ, 2.0.0)
AC_SUBST(GLIB_REQ, 2.0.0)
AC_SUBST(GTK_REQ, 2.0.0)
AC_SUBST(GST_REQ, 0.6.0)
AC_SUBST(GST_REQ, 0.7.5)
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
......@@ -41,26 +41,15 @@ fi
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
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 try 0.6
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_MSG_ERROR(you need gstreamer development packages installed !)
fi
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)
......@@ -93,28 +82,23 @@ if test "x$GST_INCLUDEDIR" = "x"; then
fi
AC_SUBST(GST_INCLUDEDIR)
if test "x$GST_MAJORMINOR" != "x0.6"; then
AC_MSG_CHECKING(for GStreamer interfaces include dir)
PKG_CHECK_MODULES(GST_INTERFACES, gstreamer-interfaces-$GST_MAJORMINOR)
GST_INTERFACES_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-interfaces-$GST_MAJORMINOR`
AC_MSG_RESULT($GST_INTERFACES_INCLUDEDIR)
if test "x$GST_INTERFACES_INCLUDEDIR" = "x"; then
AC_MSG_ERROR(no GStreamer interfaces include dir found)
fi
AC_SUBST(GST_INTERFACES_INCLUDEDIR)
AC_MSG_CHECKING(for GStreamer interfaces include dir)
PKG_CHECK_MODULES(GST_INTERFACES, gstreamer-interfaces-$GST_MAJORMINOR)
GST_INTERFACES_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-interfaces-$GST_MAJORMINOR`
AC_MSG_RESULT($GST_INTERFACES_INCLUDEDIR)
if test "x$GST_INTERFACES_INCLUDEDIR" = "x"; then
AC_MSG_ERROR(no GStreamer interfaces include dir found)
fi
if test "x$GST_MAJORMINOR" != "x0.6"; then
AC_MSG_CHECKING(for GStreamer play include dir)
PKG_CHECK_MODULES(GST_PLAY, gstreamer-play-$GST_MAJORMINOR)
GST_PLAY_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-play-$GST_MAJORMINOR`
AC_MSG_RESULT($GST_PLAY_INCLUDEDIR)
if test "x$GST_PLAY_INCLUDEDIR" = "x"; then
AC_MSG_ERROR(no GStreamer play include dir found)
fi
AC_SUBST(GST_PLAY_INCLUDEDIR)
AC_SUBST(GST_INTERFACES_INCLUDEDIR)
AC_MSG_CHECKING(for GStreamer play include dir)
PKG_CHECK_MODULES(GST_PLAY, gstreamer-play-$GST_MAJORMINOR)
GST_PLAY_INCLUDEDIR=`$PKG_CONFIG --variable=includedir gstreamer-play-$GST_MAJORMINOR`
AC_MSG_RESULT($GST_PLAY_INCLUDEDIR)
if test "x$GST_PLAY_INCLUDEDIR" = "x"; then
AC_MSG_ERROR(no GStreamer play include dir found)
fi
AC_SUBST(GST_PLAY_INCLUDEDIR)
AC_CHECK_PROG(HAVE_XMLTO, xmlto, true, false)
AC_CHECK_PROG(HAVE_XMLCATALOG, xmlcatalog, true, false)
......
......@@ -7,8 +7,5 @@ Makefile.in
*.py[co]
.libs
.deps
gstreamer.c
gstreamer-base.defs
gstreamer.defs
gstreamer.override
h2def.defs
gst.c
gst.defs
......@@ -13,31 +13,26 @@ pygstreamer_PYTHON = gstreamer.py
pygstexecdir = $(pkgpyexecdir)
GST_OVERRIDES = \
gstreamer.override \
gstpad-handlers.override
GST_OVERRIDES = gst.override gstpad-handlers.override
pygstexec_LTLIBRARIES = _gstmodule.la
_gstmodule_la_SOURCES = \
gstreamermodule.c \
gst-types.c \
$(VERSOURCES)
_gstmodule_la_SOURCES = gstmodule.c gst-types.c
_gstmodule_la_CFLAGS = $(GST_CFLAGS) -fno-strict-aliasing
_gstmodule_la_LIBADD = $(GST_LIBS)
_gstmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gst
nodist__gstmodule_la_SOURCES = gstreamer.c
nodist__gstmodule_la_SOURCES = gst.c
CLEANFILES = gstreamer.c
EXTRA_DIST = gstreamer.defs $(GST_OVERRIDES) arg-types.py
CLEANFILES = gst.c
EXTRA_DIST = gst.defs $(GST_OVERRIDES) arg-types.py
gstreamer.c: $(srcdir)/gstreamer.defs $(srcdir)/arg-types.py $(GST_OVERRIDES)
gst.c: $(srcdir)/gst.defs $(srcdir)/arg-types.py $(GST_OVERRIDES)
$(PYGTK_CODEGEN) \
--load-types $(srcdir)/arg-types.py \
--register $(srcdir)/gst-types.defs \
--override $(srcdir)/gstreamer.override \
--prefix pygst gstreamer.defs > gen-gstreamer.c \
--override $(srcdir)/gst.override \
--prefix pygst gst.defs > gen-gst.c \
&& rm -fr gtreamer.c \
&& echo '/* GENERATED FILE - DO NOT EDIT */' >> gstreamer.c \
&& cat gen-gstreamer.c >> gstreamer.c \
&& rm -f gen-gstreamer.c
&& echo '/* GENERATED FILE - DO NOT EDIT */' >> gst.c \
&& cat gen-gst.c >> gst.c \
&& rm -f gen-gst.c
......@@ -36,8 +36,7 @@ sys.setdlopenflags(dl.RTLD_LAZY | dl.RTLD_GLOBAL)
del devloc, sys, os
from _gst import *
#from gtk import threads_init, threads_enter, threads_leave
del _gst
def threads_init():
import gtk
......
This diff is collapsed.
This diff is collapsed.
/* -*- 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>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>
#include <gst/gst.h>
void pygst_register_classes (PyObject *d);
void pygst_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pygst_functions[];
DL_EXPORT(void)
init_gst (void)
{
PyObject *m, *d;
PyObject *av;
int argc, i;
char **argv;
init_pygobject ();
/* pull in arguments */
av = PySys_GetObject ("argv");
if (av != NULL) {
argc = PyList_Size (av);
argv = g_new (char *, argc);
for (i = 0; i < argc; i++)
argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
} else {
argc = 0;
argv = NULL;
}
if (!gst_init_check (&argc, &argv)) {
if (argv != NULL) {
for (i = 0; i < argc; i++)
g_free (argv[i]);
g_free (argv);
}
PyErr_SetString (PyExc_RuntimeError, "can't initialize module gst");
}
if (argv != NULL) {
PySys_SetArgv (argc, argv);
for (i = 0; i < argc; i++)
g_free (argv[i]);
g_free (argv);
}
m = Py_InitModule ("gst._gst", pygst_functions);
d = PyModule_GetDict (m);
pygst_register_classes (d);
pygst_add_constants (m, "GST_");
if (PyErr_Occurred ()) {
Py_FatalError ("can't initialize module gst");
}
}
......@@ -7,8 +7,5 @@ Makefile.in
*.py[co]
.libs
.deps
gstreamer.c
gstreamer-base.defs
gstreamer.defs
gstreamer.override
h2def.defs
gst.c
gst.defs
......@@ -13,31 +13,26 @@ pygstreamer_PYTHON = gstreamer.py
pygstexecdir = $(pkgpyexecdir)
GST_OVERRIDES = \
gstreamer.override \
gstpad-handlers.override
GST_OVERRIDES = gst.override gstpad-handlers.override
pygstexec_LTLIBRARIES = _gstmodule.la
_gstmodule_la_SOURCES = \
gstreamermodule.c \
gst-types.c \
$(VERSOURCES)
_gstmodule_la_SOURCES = gstmodule.c gst-types.c
_gstmodule_la_CFLAGS = $(GST_CFLAGS) -fno-strict-aliasing
_gstmodule_la_LIBADD = $(GST_LIBS)
_gstmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_gst
nodist__gstmodule_la_SOURCES = gstreamer.c
nodist__gstmodule_la_SOURCES = gst.c
CLEANFILES = gstreamer.c
EXTRA_DIST = gstreamer.defs $(GST_OVERRIDES) arg-types.py
CLEANFILES = gst.c
EXTRA_DIST = gst.defs $(GST_OVERRIDES) arg-types.py
gstreamer.c: $(srcdir)/gstreamer.defs $(srcdir)/arg-types.py $(GST_OVERRIDES)
gst.c: $(srcdir)/gst.defs $(srcdir)/arg-types.py $(GST_OVERRIDES)
$(PYGTK_CODEGEN) \
--load-types $(srcdir)/arg-types.py \
--register $(srcdir)/gst-types.defs \
--override $(srcdir)/gstreamer.override \
--prefix pygst gstreamer.defs > gen-gstreamer.c \
--override $(srcdir)/gst.override \
--prefix pygst gst.defs > gen-gst.c \
&& rm -fr gtreamer.c \
&& echo '/* GENERATED FILE - DO NOT EDIT */' >> gstreamer.c \
&& cat gen-gstreamer.c >> gstreamer.c \
&& rm -f gen-gstreamer.c
&& echo '/* GENERATED FILE - DO NOT EDIT */' >> gst.c \
&& cat gen-gst.c >> gst.c \
&& rm -f gen-gst.c
......@@ -36,8 +36,7 @@ sys.setdlopenflags(dl.RTLD_LAZY | dl.RTLD_GLOBAL)
del devloc, sys, os
from _gst import *
#from gtk import threads_init, threads_enter, threads_leave
del _gst
def threads_init():
import gtk
......
This diff is collapsed.
This diff is collapsed.
/* -*- 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>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>
#include <gst/gst.h>
void pygst_register_classes (PyObject *d);
void pygst_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pygst_functions[];
DL_EXPORT(void)
init_gst (void)
{
PyObject *m, *d;
PyObject *av;
int argc, i;
char **argv;
init_pygobject ();
/* pull in arguments */
av = PySys_GetObject ("argv");
if (av != NULL) {
argc = PyList_Size (av);
argv = g_new (char *, argc);
for (i = 0; i < argc; i++)
argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i)));
} else {
argc = 0;
argv = NULL;
}
if (!gst_init_check (&argc, &argv)) {
if (argv != NULL) {
for (i = 0; i < argc; i++)
g_free (argv[i]);
g_free (argv);
}
PyErr_SetString (PyExc_RuntimeError, "can't initialize module gst");
}
if (argv != NULL) {
PySys_SetArgv (argc, argv);
for (i = 0; i < argc; i++)
g_free (argv[i]);
g_free (argv);
}
m = Py_InitModule ("gst._gst", pygst_functions);
d = PyModule_GetDict (m);
pygst_register_classes (d);
pygst_add_constants (m, "GST_");
if (PyErr_Occurred ()) {
Py_FatalError ("can't initialize module gst");
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment