gst: Bump required core/base to 0.10.20

And clean up code accordingly
This commit is contained in:
Edward Hervey 2010-10-18 10:14:19 +02:00
parent 642fed71da
commit eb8869dce1
7 changed files with 29 additions and 65 deletions

View file

@ -49,8 +49,8 @@ AC_SUBST(PYGTK_REQ, 2.6.3)
AC_SUBST(PYGOBJECT_REQ, 2.11.2)
AC_SUBST(GLIB_REQ, 2.8.0)
AC_SUBST(GTK_REQ, 2.6.0)
AC_SUBST(GST_REQ, 0.10.18)
AC_SUBST(GSTPB_REQ, 0.10.18)
AC_SUBST(GST_REQ, 0.10.20)
AC_SUBST(GSTPB_REQ, 0.10.20)
AC_DISABLE_STATIC
@ -111,13 +111,6 @@ dnl _ new core/base is released (add lines + gst-0.10.MINOR.ignore)
if test "x$GST_CVS_VERSION" = "x"
then
if test $GST_MINOR_VERSION -lt "20"
then
IGNORE_GST_0_10_20="gst-0.10.20.ignore"
else
IGNORE_GST_0_10_20=""
fi
if test $GST_MINOR_VERSION -lt "21"
then
IGNORE_GST_0_10_21="gst-0.10.21.ignore"
@ -233,7 +226,6 @@ then
fi
else
IGNORE_GST_0_10_18=""
IGNORE_GST_0_10_20=""
IGNORE_GST_0_10_21=""
IGNORE_GST_0_10_22=""
IGNORE_GST_0_10_23=""
@ -254,7 +246,6 @@ else
AC_DEFINE_UNQUOTED(HAVE_GST_TAG, 1, [We can use the gst-tag library])
fi
AC_DEFINE_UNQUOTED(HAVE_STREAM_VOLUME_INTERFACE, 1, [We can use the streamvolume interface])
AC_SUBST(IGNORE_GST_0_10_20)
AC_SUBST(IGNORE_GST_0_10_21)
AC_SUBST(IGNORE_GST_0_10_22)
AC_SUBST(IGNORE_GST_0_10_23)

View file

@ -25,7 +25,6 @@ defsdir = $(pkgdatadir)/$(GST_MAJORMINOR)/defs
noinst_HEADERS = common.h pygstvalue.h pygstminiobject.h pygstexception.h
versioned_overrides = \
gst-0.10.20.ignore \
gst-0.10.21.ignore \
gst-0.10.22.ignore \
gst-0.10.23.ignore \

View file

@ -1,34 +0,0 @@
%%
ignore
gst_event_has_name
gst_message_set_buffering_stats
gst_message_parse_buffering_stats
gst_value_dup_mini_object
gst_parse_context_new
gst_parse_context_get_missing_elements
gst_parse_context_free
gst_parse_launch_full
gst_parse_launchv_full
gst_preset_get_preset_names
gst_preset_get_property_names
gst_preset_load_preset
gst_preset_save_preset
gst_preset_rename_preset
gst_preset_delete_preset
gst_preset_set_meta
gst_preset_get_meta
gst_query_new_buffering
gst_query_set_buffering_percent
gst_query_parse_buffering_percent
gst_query_set_buffering_stats
gst_query_parse_buffering_stats
gst_query_set_buffering_range
gst_query_parse_buffering_range
gst_type_find_suggest_simple
gst_bin_find_unlinked_pad
%%
ignore-type
GstParseFlags
GstBufferingMode
GstPreset
%%

View file

@ -38,9 +38,7 @@ headers
#include <gst/gsttagsetter.h>
#include <gst/controller/gstcontroller.h>
#if ((GST_VERSION_MICRO >= 15) || (GST_VERSION_MICRO == 14 && GST_VERSION_NANO > 0))
#include <gst/controller/gstlfocontrolsource.h>
#endif
#include <gst/dataprotocol/dataprotocol.h>
#include <gst/base/gstadapter.h>
#include <gst/base/gstbasesrc.h>
@ -49,9 +47,7 @@ headers
#include <gst/base/gstbasetransform.h>
#include <gst/base/gstcollectpads.h>
#include <gst/base/gsttypefindhelper.h>
#if ((GST_VERSION_MICRO >= 11) || (GST_VERSION_MICRO == 10 && GST_VERSION_NANO > 0 ))
#include <gst/base/gstdataqueue.h>
#endif
#include <gst/net/gstnet.h>

View file

@ -279,23 +279,16 @@ init_gst (void)
PyModule_AddStringConstant (m, "TAG_ALBUM_GAIN", GST_TAG_ALBUM_GAIN);
PyModule_AddStringConstant (m, "TAG_ALBUM_PEAK", GST_TAG_ALBUM_PEAK);
PyModule_AddStringConstant (m, "TAG_LANGUAGE_CODE", GST_TAG_LANGUAGE_CODE);
#if (GST_VERSION_MAJOR == 0 && GST_VERSION_MINOR == 10 && \
((GST_VERSION_MICRO >= 6) || (GST_VERSION_MICRO == 5 && GST_VERSION_NANO > 0)))
PyModule_AddStringConstant (m, "TAG_IMAGE", GST_TAG_IMAGE);
#if ((GST_VERSION_MICRO >= 7) || (GST_VERSION_MICRO == 6 && GST_VERSION_NANO > 0 ))
PyModule_AddStringConstant (m, "TAG_PREVIEW_IMAGE", GST_TAG_PREVIEW_IMAGE);
#if ((GST_VERSION_MICRO >= 10) || (GST_VERSION_MICRO == 9 && GST_VERSION_NANO > 0 ))
PyModule_AddStringConstant (m, "TAG_EXTENDED_COMMENT",
GST_TAG_EXTENDED_COMMENT);
#if ((GST_VERSION_MICRO >= 12) || (GST_VERSION_MICRO == 11 && GST_VERSION_NANO > 0))
PyModule_AddStringConstant (m, "TAG_REFERENCE_LEVEL",
GST_TAG_REFERENCE_LEVEL);
PyModule_AddStringConstant (m, "TAG_BEATS_PER_MINUTE",
GST_TAG_BEATS_PER_MINUTE);
#if ((GST_VERSION_MICRO >= 14) || (GST_VERSION_MICRO == 13 && GST_VERSION_NANO > 0))
PyModule_AddStringConstant (m, "TAG_LICENSE_URI", GST_TAG_LICENSE_URI);
PyModule_AddStringConstant (m, "TAG_COPYRIGHT_URI", GST_TAG_COPYRIGHT_URI);
#if ((GST_VERSION_MICRO >= 15) || (GST_VERSION_MICRO == 14 && GST_VERSION_NANO > 0))
PyModule_AddStringConstant (m, "TAG_COMPOSER", GST_TAG_COMPOSER);
PyModule_AddStringConstant (m, "TAG_ARTIST_SORTNAME",
GST_TAG_ARTIST_SORTNAME);
@ -360,12 +353,6 @@ init_gst (void)
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#endif
PyModule_AddStringConstant (m, "LIBRARY_ERROR",

View file

@ -1,6 +1,5 @@
%%
include
@IGNORE_GST_0_10_20@
@IGNORE_GST_0_10_21@
@IGNORE_GST_0_10_22@
@IGNORE_GST_0_10_23@

View file

@ -38,10 +38,36 @@ DL_EXPORT(void)
initpbutils (void)
{
PyObject *m, *d;
PyObject *gst;
init_pygobject ();
gst_pb_utils_init ();
/* Make sure gst module is loaded and ready */
gst = PyImport_ImportModule("gst");
if (!gst) {
if (PyErr_Occurred())
{
PyObject *type, *value, *traceback;
PyObject *py_orig_exc;
PyErr_Fetch(&type, &value, &traceback);
py_orig_exc = PyObject_Repr(value);
Py_XDECREF(type);
Py_XDECREF(value);
Py_XDECREF(traceback);
PyErr_Format(PyExc_ImportError,
"could not import gst (error was: %s)",
PyString_AsString(py_orig_exc));
Py_DECREF(py_orig_exc);
} else {
PyErr_SetString(PyExc_ImportError,
"could not import gst (no error given)");
}
return;
}
gst_pb_utils_init ();
m = Py_InitModule ("pbutils", pypbutils_functions);
d = PyModule_GetDict (m);