diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-01-29 23:16:26 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-09-11 12:41:23 -0400 |
commit | 6c6f13385ed0f14df88fa477c9964425755c5cf6 (patch) | |
tree | a53f24999b05dd8276e08253a304f55c2aa7b13c | |
parent | 0c96f96c732a0f2489afd6df1b0dbeb9a2c2beed (diff) |
Port to GStreamer 0.11, remove static python bindings
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | examples/Makefile.am | 2 | ||||
-rw-r--r-- | examples/call-handler.c | 10 | ||||
-rw-r--r-- | examples/python/Makefile.am (renamed from python/examples/Makefile.am) | 0 | ||||
-rw-r--r-- | examples/python/README (renamed from python/examples/README) | 0 | ||||
-rw-r--r-- | examples/python/callchannel.py (renamed from python/examples/callchannel.py) | 0 | ||||
-rw-r--r-- | examples/python/callhandler.py (renamed from python/examples/callhandler.py) | 0 | ||||
-rw-r--r-- | examples/python/callui.py (renamed from python/examples/callui.py) | 0 | ||||
-rw-r--r-- | examples/python/constants.py (renamed from python/examples/constants.py) | 0 | ||||
-rw-r--r-- | examples/python/element-properties (renamed from python/examples/element-properties) | 0 | ||||
-rw-r--r-- | examples/python/util.py (renamed from python/examples/util.py) | 0 | ||||
-rw-r--r-- | telepathy-farstream/call-content.c | 34 |
13 files changed, 45 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am index 34daccf..26f5d48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,15 +1,11 @@ ACLOCAL_AMFLAGS = -I m4 -if WANT_PYTHON - PYTHON_SUBDIR = python -endif - -SUBDIRS = m4 \ + +SUBDIRS= m4 \ tools \ telepathy-farstream \ doc \ - $(PYTHON_SUBDIR) \ examples DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc diff --git a/configure.ac b/configure.ac index 64900a1..8e0a9c0 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,7 @@ AC_PROG_LIBTOOL dnl decide error flags AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="") -AS_COMPILER_FLAG(-Werror, werror=yes, werror=no) +AS_COMPILER_FLAG(-Werror -Wno-error=deprecated-declarations, werror=yes, werror=no) AC_ARG_ENABLE(Werror, AC_HELP_STRING([--disable-Werror],[compile without -Werror (normally enabled in development builds)]), @@ -67,7 +67,7 @@ AS_COMPILER_FLAG(-Wno-unused-parameter, ifelse(tp_farstream_nano_version, 0, [], [ if test x$werror = xyes; then - ERROR_CFLAGS="$ERROR_CFLAGS -Werror" + ERROR_CFLAGS="$ERROR_CFLAGS -Werror -Wno-error=deprecated-declarations" fi if test x$wextra = xyes -a \ x$wno_missing_field_initializers = xyes -a \ @@ -83,6 +83,8 @@ if test "x$enable_coverage" = "xyes"; then CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage" fi +CFLAGS="$CFLAGS -DGST_USE_UNSTABLE_API" + dnl Check for Glib PKG_CHECK_MODULES(GLIB, gobject-2.0 >= 2.30 glib-2.0 >= 2.30 gio-2.0) AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_30, [Ignore post 2.30 deprecations]) @@ -112,22 +114,6 @@ AC_SUBST(FARSTREAM_LIBS) dnl Always required to generate extensions AM_PATH_PYTHON([2.5]) -AC_ARG_ENABLE([python], - AC_HELP_STRING([--disable-python], [Disable Python bindings]), - [case "${enableval}" in - yes) WANT_PYTHON=yes ;; - no) WANT_PYTHON=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;; - esac], - WANT_PYTHON=yes) - -if test "x$WANT_PYTHON" = "xyes"; then - AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) - PKG_CHECK_MODULES(PYTPFARSTREAM, [ pygobject-2.0 >= 2.12.0 - gst-python-0.10 >= 0.10.10 ]) -fi -AM_CONDITIONAL(WANT_PYTHON, test "x$WANT_PYTHON" = "xyes") - GTK_DOC_CHECK([1.17], [--flavour no-tmpl]) LT_CURRENT=tp_farstream_lt_current @@ -143,11 +129,9 @@ AC_OUTPUT( Makefile \ doc/lib/Makefile \ m4/Makefile \ examples/Makefile \ + examples/python/Makefile \ telepathy-farstream/Makefile \ telepathy-farstream/telepathy-farstream.pc \ telepathy-farstream/telepathy-farstream-uninstalled.pc - tools/Makefile \ - python/Makefile \ - python/codegen/Makefile \ - python/examples/Makefile \ + tools/Makefile ) diff --git a/examples/Makefile.am b/examples/Makefile.am index ca22edf..27f3cd5 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS=python + noinst_PROGRAMS = call-handler LDADD = \ diff --git a/examples/call-handler.c b/examples/call-handler.c index 9fe83db..beeb8af 100644 --- a/examples/call-handler.c +++ b/examples/call-handler.c @@ -139,7 +139,7 @@ src_pad_added_cb (TfContent *content, } gst_bin_add (GST_BIN (context->pipeline), element); - sinkpad = gst_element_get_pad (element, "sink"); + sinkpad = gst_element_get_static_pad (element, "sink"); ret = gst_element_set_state (element, GST_STATE_PLAYING); if (ret == GST_STATE_CHANGE_FAILURE) { @@ -252,7 +252,7 @@ setup_audio_source (ChannelContext *context, TfContent *content) gint input_volume = 0; result = gst_parse_bin_from_description ( - "pulsesrc ! audio/x-raw-int,rate=8000 ! queue" + "pulsesrc ! audio/x-raw, rate=8000 ! queue" " ! audioconvert ! audioresample" " ! volume name=input_volume ! audioconvert ", TRUE, NULL); @@ -286,7 +286,7 @@ setup_video_source (ChannelContext *context, TfContent *content) guint framerate = 0, width = 0, height = 0; result = gst_parse_bin_from_description_full ( - "autovideosrc ! videomaxrate ! videoscale ! colorspace ! capsfilter name=c", + "autovideosrc ! videorate drop-only=1 average-period=20000000000 ! videoscale ! videoconvert ! capsfilter name=c", TRUE, NULL, GST_PARSE_FLAG_FATAL_ERRORS, NULL); g_assert (result); @@ -311,7 +311,7 @@ setup_video_source (ChannelContext *context, TfContent *content) context->width = width; context->height = height; - caps = gst_caps_new_simple ("video/x-raw-yuv", + caps = gst_caps_new_simple ("video/x-raw", "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, "framerate", GST_TYPE_FRACTION, framerate, 1, @@ -373,7 +373,7 @@ start_sending_cb (TfContent *content, gpointer user_data) gst_bin_add (GST_BIN (context->pipeline), element); - srcpad = gst_element_get_pad (element, "src"); + srcpad = gst_element_get_static_pad (element, "src"); if (GST_PAD_LINK_FAILED (gst_pad_link (srcpad, sinkpad))) { diff --git a/python/examples/Makefile.am b/examples/python/Makefile.am index 7b89027..7b89027 100644 --- a/python/examples/Makefile.am +++ b/examples/python/Makefile.am diff --git a/python/examples/README b/examples/python/README index 8007df6..8007df6 100644 --- a/python/examples/README +++ b/examples/python/README diff --git a/python/examples/callchannel.py b/examples/python/callchannel.py index f37c724..f37c724 100644 --- a/python/examples/callchannel.py +++ b/examples/python/callchannel.py diff --git a/python/examples/callhandler.py b/examples/python/callhandler.py index 71af24c..71af24c 100644 --- a/python/examples/callhandler.py +++ b/examples/python/callhandler.py diff --git a/python/examples/callui.py b/examples/python/callui.py index 9e7558f..9e7558f 100644 --- a/python/examples/callui.py +++ b/examples/python/callui.py diff --git a/python/examples/constants.py b/examples/python/constants.py index 43af8ba..43af8ba 100644 --- a/python/examples/constants.py +++ b/examples/python/constants.py diff --git a/python/examples/element-properties b/examples/python/element-properties index 40f706d..40f706d 100644 --- a/python/examples/element-properties +++ b/examples/python/element-properties diff --git a/python/examples/util.py b/examples/python/util.py index bbad9c8..bbad9c8 100644 --- a/python/examples/util.py +++ b/examples/python/util.py diff --git a/telepathy-farstream/call-content.c b/telepathy-farstream/call-content.c index c1fe974..6a29e93 100644 --- a/telepathy-farstream/call-content.c +++ b/telepathy-farstream/call-content.c @@ -2402,10 +2402,31 @@ struct StreamSrcPadIterator { TfCallContent *self; }; + +static void +streams_src_pads_iter_copy (const GstIterator *orig, GstIterator *copy) +{ + const struct StreamSrcPadIterator *iter_orig = + (const struct StreamSrcPadIterator *) orig; + struct StreamSrcPadIterator *iter = (struct StreamSrcPadIterator *) copy; + + iter->handles = g_array_sized_new (TRUE, FALSE, sizeof(guint), + iter_orig->handles->len ); + iter->handles_backup = g_array_sized_new (TRUE, FALSE, sizeof(guint), + iter_orig->handles_backup->len ); + g_array_append_vals (iter->handles, iter_orig->handles->data, + iter_orig->handles->len); + g_array_append_vals (iter->handles_backup, iter_orig->handles_backup->data, + iter_orig->handles_backup->len); + iter->self = g_object_ref (iter_orig->self); +} + + static GstIteratorResult -streams_src_pads_iter_next (GstIterator *it, gpointer *result) +streams_src_pads_iter_next (GstIterator *it, GValue *result) { struct StreamSrcPadIterator *iter = (struct StreamSrcPadIterator *) it; + guint i; if (iter->handles->len == 0) @@ -2418,7 +2439,9 @@ streams_src_pads_iter_next (GstIterator *it, gpointer *result) if (cfs->contact_handle == g_array_index (iter->handles, guint, 0)) { g_array_remove_index_fast (iter->handles, 0); - *result = cfs; + g_value_unset (result); + g_value_init (result, G_TYPE_POINTER); + g_value_set_pointer (result, cfs); return GST_ITERATOR_OK; } } @@ -2428,9 +2451,11 @@ streams_src_pads_iter_next (GstIterator *it, gpointer *result) } static GstIteratorItem -streams_src_pads_iter_item (GstIterator *it, gpointer item) +streams_src_pads_iter_item (GstIterator *it, const GValue *item) { - struct CallFsStream *cfs = item; + struct CallFsStream *cfs = g_value_get_pointer (item); + + g_value_unset ((GValue*) item); gst_iterator_push (it, fs_stream_iterate_src_pads (cfs->fsstream)); @@ -2467,6 +2492,7 @@ tf_call_content_iterate_src_pads (TfContent *content, guint *handles, iter = (struct StreamSrcPadIterator *) gst_iterator_new ( sizeof (struct StreamSrcPadIterator), GST_TYPE_PAD, self->mutex, &self->fsstreams_cookie, + streams_src_pads_iter_copy, streams_src_pads_iter_next, streams_src_pads_iter_item, streams_src_pads_iter_resync, |