commit telepathy-farsight for openSUSE:Factory
Hello community, here is the log from the commit of package telepathy-farsight for openSUSE:Factory checked in at Wed Mar 25 19:01:16 CET 2009. -------- --- GNOME/telepathy-farsight/telepathy-farsight.changes 2009-02-10 18:08:50.000000000 +0100 +++ telepathy-farsight/telepathy-farsight.changes 2009-03-19 04:40:46.000000000 +0100 @@ -1,0 +2,17 @@ +Thu Mar 19 04:39:47 CET 2009 - vuntz@novell.com + +- Update to version 0.0.6: + + Add support of the RelayInfo property + +------------------------------------------------------------------- +Tue Mar 17 20:30:24 CET 2009 - vuntz@novell.com + +- Update to version 0.0.5: + + Recognize ice-udp + + Improve error handling + + Support the new CodecsUpdated method + + Support for the RelayInfo and STUNServers properties +- Use py_sitedir instead of redefining it with python_sitelib. +- Use makeinstall + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- telepathy-farsight-0.0.4.tar.bz2 New: ---- telepathy-farsight-0.0.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ telepathy-farsight.spec ++++++ --- /var/tmp/diff_new_pack.Sn6900/_old 2009-03-25 19:00:36.000000000 +0100 +++ /var/tmp/diff_new_pack.Sn6900/_new 2009-03-25 19:00:36.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package telepathy-farsight (Version 0.0.4) +# spec file for package telepathy-farsight (Version 0.0.6) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -28,14 +28,13 @@ BuildRequires: python-devel BuildRequires: python-gstreamer-0_10 BuildRequires: python-gtk-devel -Version: 0.0.4 -Release: 3 +Version: 0.0.6 +Release: 1 License: LGPL v2.1 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/Libraries Summary: Telepathy media streaming framework Source: %{name}-%{version}.tar.bz2 -%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define debug_package_requires libtelepathy-farsight0 = %{version}-%{release} %description @@ -102,7 +101,7 @@ %prep -%setup -q -n %{name}-%{version} +%setup -q %build # autoreconf -f -i @@ -110,9 +109,8 @@ make %{?jobs:-j%jobs} %install -make install DESTDIR=$RPM_BUILD_ROOT -rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.*a -rm -rf $RPM_BUILD_ROOT/%{python_sitelib}/*.*a +%makeinstall +find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} + %post -n libtelepathy-farsight0 -p /sbin/ldconfig @@ -137,9 +135,20 @@ %files -n python-telepathy-farsight %defattr(-,root,root) -%{python_sitelib}/*.so +%{py_sitedir}/*.so %changelog +* Thu Mar 19 2009 vuntz@novell.com +- Update to version 0.0.6: + + Add support of the RelayInfo property +* Tue Mar 17 2009 vuntz@novell.com +- Update to version 0.0.5: + + Recognize ice-udp + + Improve error handling + + Support the new CodecsUpdated method + + Support for the RelayInfo and STUNServers properties +- Use py_sitedir instead of redefining it with python_sitelib. +- Use makeinstall * Thu Feb 05 2009 vuntz@novell.com - Add missing Requires on gstreamer-0_10-plugins-base-devel to the devel package. ++++++ telepathy-farsight-0.0.4.tar.bz2 -> telepathy-farsight-0.0.6.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/ChangeLog new/telepathy-farsight-0.0.6/ChangeLog --- old/telepathy-farsight-0.0.4/ChangeLog 2009-01-14 18:59:14.000000000 +0100 +++ new/telepathy-farsight-0.0.6/ChangeLog 2009-03-17 23:26:09.000000000 +0100 @@ -1,3 +1,232 @@ +commit 0edd78d9c388896cff1663fe9fa77669208fdf39 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Tue Mar 17 18:23:05 2009 -0400 + + Version 0.0.6 + + NEWS | 4 ++++ + configure.ac | 4 ++-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +commit e42bdda59972b2f3793eee30f4d5f18be0a9a9b8 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Tue Mar 17 17:57:56 2009 -0400 + + Fix little typo + + telepathy-farsight/stream.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 7d393cb9b948def684ce95e886629f69f6207e65 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Tue Mar 17 17:24:18 2009 -0400 + + Use the right type when getting RelayInfo + + telepathy-farsight/stream.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 9e2fba6699509199830817836eaa482d27292337 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Sun Mar 15 17:12:56 2009 -0400 + + Version 0.0.5.1 + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 34495545f9ad56e0b5a4293f8cf723332cb48014 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Sun Mar 15 17:12:45 2009 -0400 + + Version 0.0.5 + + NEWS | 6 ++++++ + configure.ac | 4 ++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +commit 2fb56493eec0f86b9022c09734c96070514e727e +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 20:30:19 2009 -0500 + + Add debug + + telepathy-farsight/stream.c | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +commit 0535219156c41473d7bcac6a17cb1924cef55b0f +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 19:50:54 2009 -0500 + + Convert relay-info from dbus to farsight + + telepathy-farsight/stream.c | 62 +++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 62 insertions(+), 0 deletions(-) + +commit 5442c2b3db0aec8c0456822dad7d2657305ffaa0 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 19:19:49 2009 -0500 + + Get the STUN servers from the new property + + telepathy-farsight/stream.c | 41 +++++++++++++++++++++++++++++++++++++---- + 1 files changed, 37 insertions(+), 4 deletions(-) + +commit 94b1377f60d9a2e1ee48dd71f829fe5cc9fa9ffc +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 19:02:32 2009 -0500 + + Get NAT Traversal from the new interface, fallback to old + + telepathy-farsight/stream.c | 29 +++++++++++++++++++++++++---- + 1 files changed, 25 insertions(+), 4 deletions(-) + +commit 71c6355949b53bae5ce8482fe0c71e4724a77224 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 18:52:04 2009 -0500 + + GetAll properties before creating FsSession/Stream + + telepathy-farsight/channel.c | 25 ++-- + telepathy-farsight/stream-priv.h | 4 +- + telepathy-farsight/stream.c | 357 +++++++++++++++++++++----------------- + 3 files changed, 215 insertions(+), 171 deletions(-) + +commit c1c891485741e2a56a496b5a15a3c8e143cf02cb +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 18:35:51 2009 -0500 + + Make it possible ot call tf_stream_shutdown before a FsStream has been created + + telepathy-farsight/stream.c | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +commit 296f42618e35de52447406482f44c693875fc703 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Mar 2 18:31:30 2009 -0500 + + Ignore Gst Messages in streams if no stream/session has been created + + telepathy-farsight/stream.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +commit 78f5d7e881b9a29d08025728eab02caef53b262c +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Tue Feb 24 17:24:51 2009 -0500 + + Print stream pointer in messages + + telepathy-farsight/stream.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +commit 27997f62747da49be8c90c14d7b2c2230dbdbcda +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Feb 4 12:48:04 2009 -0500 + + Don't leak tp candidates + + telepathy-farsight/stream.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +commit 2fe664668db896b9e4915eeeab24c04e0547f216 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Jan 21 15:52:11 2009 +1100 + + Send CodecsUpdated when unrequested codecs changes happen + + telepathy-farsight/stream.c | 38 ++++++++++++++++++++++++++++++++------ + 1 files changed, 32 insertions(+), 6 deletions(-) + +commit ce26d6ddfe327656563452f49eac559214184412 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Jan 21 16:18:43 2009 +1100 + + Require newer tp-glib for CodecsUpdated + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 9740c8d1c31403133825b560ae772795b25f6c65 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Jan 21 15:44:34 2009 +1100 + + Remove gathering machinery + + telepathy-farsight/stream.c | 38 +++----------------------------------- + 1 files changed, 3 insertions(+), 35 deletions(-) + +commit e4ae809764c46893c0d5610a8c51008381adc385 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Feb 25 17:43:31 2009 -0500 + + Stop stream when its proxy is invalidated + + telepathy-farsight/stream.c | 26 +++++++++++++++++++------- + 1 files changed, 19 insertions(+), 7 deletions(-) + +commit 3714dfa4ab4965be1be6d9168211f480b9e8ad16 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Tue Feb 10 14:50:45 2009 +0000 + + Make the printed methods match the called ones + + telepathy-farsight/stream.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +commit dbf982c38cf79ce8b9302d857bf1edfe74283b88 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Feb 9 17:04:17 2009 +0000 + + Report to the CM if a stream can't be handled + + telepathy-farsight/channel.c | 13 ++++++++++--- + 1 files changed, 10 insertions(+), 3 deletions(-) + +commit 84c8f7110df00cd0bcf9ae7523d5a2ad2349e45d +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Mon Feb 9 16:58:12 2009 +0000 + + Report to the CM if a session can't be handled + + telepathy-farsight/channel.c | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +commit d97541d113c334dfd607955aafbf1f2511066a03 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Feb 4 14:35:00 2009 -0500 + + Add telepathy-glib, gstreamer deps to the pc file + + telepathy-farsight/telepathy-farsight.pc.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit a89018755899d0ce62495506a4f59b1d456afa07 +Author: Senko Rasic <senko@tachyon.lan> +Date: Thu Feb 5 08:49:49 2009 +0100 + + tf-stream-constructor: recognise "ice-udp" nat traversal mechanism + + telepathy-farsight/stream.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +commit ee3367ef9263ad9eb2082ae118f7adaa67e1ffc8 +Author: Antoine Tremblay <hexa00@gmail.com> +Date: Sun Jan 25 13:36:32 2009 -0500 + + Added missing farsight2 CFLAGS in python Makefile.am + + python/Makefile.am | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit 63e4639d3f659ecc71b94d62a2aea55e109b8b55 +Author: Olivier Crête <olivier.crete@collabora.co.uk> +Date: Wed Jan 14 13:00:39 2009 -0500 + + version 0.0.4.1 + + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + commit 49492fe73fa055ef1dde449f33cfa36a246a752b Author: Olivier Crête <olivier.crete@collabora.co.uk> Date: Wed Jan 14 12:57:03 2009 -0500 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/configure new/telepathy-farsight-0.0.6/configure --- old/telepathy-farsight-0.0.4/configure 2009-01-14 18:59:05.000000000 +0100 +++ new/telepathy-farsight-0.0.6/configure 2009-03-17 23:23:46.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for Telepathy-Farsight 0.0.4. +# Generated by GNU Autoconf 2.63 for Telepathy-Farsight 0.0.6. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=stream-engine>. # @@ -750,8 +750,8 @@ # Identity of this package. PACKAGE_NAME='Telepathy-Farsight' PACKAGE_TARNAME='telepathy-farsight' -PACKAGE_VERSION='0.0.4' -PACKAGE_STRING='Telepathy-Farsight 0.0.4' +PACKAGE_VERSION='0.0.6' +PACKAGE_STRING='Telepathy-Farsight 0.0.6' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=stream-engine' # Factoring default headers for most tests. @@ -1524,7 +1524,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Telepathy-Farsight 0.0.4 to adapt to many kinds of systems. +\`configure' configures Telepathy-Farsight 0.0.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1595,7 +1595,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Telepathy-Farsight 0.0.4:";; + short | recursive ) echo "Configuration of Telepathy-Farsight 0.0.6:";; esac cat <<\_ACEOF @@ -1723,7 +1723,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Telepathy-Farsight configure 0.0.4 +Telepathy-Farsight configure 0.0.6 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1737,7 +1737,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Telepathy-Farsight $as_me 0.0.4, which was +It was created by Telepathy-Farsight $as_me 0.0.6, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2436,7 +2436,7 @@ # Define the identity of the package. PACKAGE='telepathy-farsight' - VERSION='0.0.4' + VERSION='0.0.6' cat >>confdefs.h <<_ACEOF @@ -21177,12 +21177,12 @@ pkg_cv_TELEPATHY_CFLAGS="$TELEPATHY_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.7.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.7.8") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.7.23\"") >&5 + ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.7.23") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_TELEPATHY_CFLAGS=`$PKG_CONFIG --cflags "telepathy-glib >= 0.7.8" 2>/dev/null` + pkg_cv_TELEPATHY_CFLAGS=`$PKG_CONFIG --cflags "telepathy-glib >= 0.7.23" 2>/dev/null` else pkg_failed=yes fi @@ -21193,12 +21193,12 @@ pkg_cv_TELEPATHY_LIBS="$TELEPATHY_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.7.8\"") >&5 - ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.7.8") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"telepathy-glib >= 0.7.23\"") >&5 + ($PKG_CONFIG --exists --print-errors "telepathy-glib >= 0.7.23") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_TELEPATHY_LIBS=`$PKG_CONFIG --libs "telepathy-glib >= 0.7.8" 2>/dev/null` + pkg_cv_TELEPATHY_LIBS=`$PKG_CONFIG --libs "telepathy-glib >= 0.7.23" 2>/dev/null` else pkg_failed=yes fi @@ -21216,14 +21216,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "telepathy-glib >= 0.7.8" 2>&1` + TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "telepathy-glib >= 0.7.23" 2>&1` else - TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --print-errors "telepathy-glib >= 0.7.8" 2>&1` + TELEPATHY_PKG_ERRORS=`$PKG_CONFIG --print-errors "telepathy-glib >= 0.7.23" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$TELEPATHY_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (telepathy-glib >= 0.7.8) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (telepathy-glib >= 0.7.23) were not met: $TELEPATHY_PKG_ERRORS @@ -21234,7 +21234,7 @@ and TELEPATHY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (telepathy-glib >= 0.7.8) were not met: +$as_echo "$as_me: error: Package requirements (telepathy-glib >= 0.7.23) were not met: $TELEPATHY_PKG_ERRORS @@ -22321,7 +22321,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Telepathy-Farsight $as_me 0.0.4, which was +This file was extended by Telepathy-Farsight $as_me 0.0.6, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22384,7 +22384,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -Telepathy-Farsight config.status 0.0.4 +Telepathy-Farsight config.status 0.0.6 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/configure.ac new/telepathy-farsight-0.0.6/configure.ac --- old/telepathy-farsight-0.0.4/configure.ac 2009-01-14 18:55:58.000000000 +0100 +++ new/telepathy-farsight-0.0.6/configure.ac 2009-03-17 23:22:15.000000000 +0100 @@ -9,7 +9,7 @@ m4_define([tp_farsight_major_version], [0]) m4_define([tp_farsight_minor_version], [0]) -m4_define([tp_farsight_micro_version], [4]) +m4_define([tp_farsight_micro_version], [6]) m4_define([tp_farsight_nano_version], [0]) m4_define([tp_farsight_lt_current], [0]) @@ -88,7 +88,7 @@ AC_SUBST(DBUS_LIBS) dnl Check for Telepathy libraries -PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib >= 0.7.8]) +PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib >= 0.7.23]) AC_SUBST(TELEPATHY_CFLAGS) AC_SUBST(TELEPATHY_LIBS) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/doc/lib/html/ch01.html new/telepathy-farsight-0.0.6/doc/lib/html/ch01.html --- old/telepathy-farsight-0.0.4/doc/lib/html/ch01.html 2009-01-14 18:59:12.000000000 +0100 +++ new/telepathy-farsight-0.0.6/doc/lib/html/ch01.html 2009-03-17 23:26:03.000000000 +0100 @@ -22,7 +22,7 @@ </tr></table> <div class="chapter" lang="en"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id2958690"></a>Telepathy Farsight Wrapper Classes</h2></div></div></div> +<a name="id2903940"></a>Telepathy Farsight Wrapper Classes</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="TfChannel.html">TfChannel</a></span><span class="refpurpose"> — Handle the MediaSignalling interface on a Channel</span> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/NEWS new/telepathy-farsight-0.0.6/NEWS --- old/telepathy-farsight-0.0.4/NEWS 2009-01-14 18:55:41.000000000 +0100 +++ new/telepathy-farsight-0.0.6/NEWS 2009-03-17 23:22:55.000000000 +0100 @@ -1,3 +1,13 @@ +telepathy-farsight 0.0.6 (17 March 2009) +======================================== +- Add support of the RelayInfo property + +telepathy-farsight 0.0.5 (16 March 2009) +======================================== +- Recognize ice-udp +- Improve error handling +- Support the new CodecsUpdated method + telepathy-farsight 0.0.4 (14 January 2009) ========================================== - Add python bindings for tpfarsight diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/python/Makefile.am new/telepathy-farsight-0.0.6/python/Makefile.am --- old/telepathy-farsight-0.0.4/python/Makefile.am 2008-12-07 00:03:29.000000000 +0100 +++ new/telepathy-farsight-0.0.6/python/Makefile.am 2009-02-11 19:01:58.000000000 +0100 @@ -11,7 +11,8 @@ -DDATADIR=\""$(datadir)"\" \ $(TELEPATHY_CFLAGS) \ $(PYTHON_INCLUDES) \ - $(PYTPFARSIGHT_CFLAGS) + $(PYTPFARSIGHT_CFLAGS) \ + $(FARSIGHT2_CFLAGS) BUILT_SOURCES = \ pytpfarsight.c diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/python/Makefile.in new/telepathy-farsight-0.0.6/python/Makefile.in --- old/telepathy-farsight-0.0.4/python/Makefile.in 2009-01-14 18:59:03.000000000 +0100 +++ new/telepathy-farsight-0.0.6/python/Makefile.in 2009-03-17 23:23:45.000000000 +0100 @@ -237,7 +237,8 @@ -DDATADIR=\""$(datadir)"\" \ $(TELEPATHY_CFLAGS) \ $(PYTHON_INCLUDES) \ - $(PYTPFARSIGHT_CFLAGS) + $(PYTPFARSIGHT_CFLAGS) \ + $(FARSIGHT2_CFLAGS) BUILT_SOURCES = \ pytpfarsight.c diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/telepathy-farsight/channel.c new/telepathy-farsight-0.0.6/telepathy-farsight/channel.c --- old/telepathy-farsight-0.0.4/telepathy-farsight/channel.c 2008-12-07 00:23:06.000000000 +0100 +++ new/telepathy-farsight-0.0.6/telepathy-farsight/channel.c 2009-03-16 17:22:39.000000000 +0100 @@ -637,6 +637,16 @@ } static void +stream_created_cb (TfStream *stream, gpointer user_data) +{ + TfChannel *self = user_data; + + g_signal_emit (self, signals[STREAM_CREATED], 0, stream); + + _tf_stream_try_sending_codecs (stream); +} + +static void new_stream_cb (TfSession *session, gchar *object_path, guint stream_id, @@ -650,7 +660,6 @@ FsParticipant *fs_participant; TpProxy *channel_as_proxy = (TpProxy *) self->priv->channel_proxy; TpMediaStreamHandler *proxy; - GError *error = NULL; GList *local_codec_config = NULL; proxy = tp_media_stream_handler_new (channel_as_proxy->dbus_daemon, @@ -658,8 +667,11 @@ if (proxy == NULL) { - g_warning ("failed to construct TpMediaStreamHandler: bad object path " - "'%s'?", object_path); + gchar *str = g_strdup_printf ("failed to construct TpMediaStreamHandler:" + " bad object path '%s'?", object_path); + g_warning (str); + tf_channel_error (self, 0, str); + g_free (str); return; } @@ -676,14 +688,14 @@ stream = _tf_stream_new ((gpointer) self, fs_conference, fs_participant, proxy, stream_id, media_type, direction, - &self->priv->nat_props, local_codec_config, &error); + &self->priv->nat_props, local_codec_config, + stream_created_cb); fs_codec_list_destroy (local_codec_config); if (!stream) { - g_warning ("Error creating stream: %s", error->message); - g_clear_error (&error); + tf_channel_error (self, 0, "Error creating stream"); return; } @@ -710,10 +722,6 @@ g_ptr_array_index (self->priv->streams, stream_id) = stream; g_signal_connect (stream, "closed", G_CALLBACK (stream_closed_cb), self); - - g_signal_emit (self, signals[STREAM_CREATED], 0, stream); - - _tf_stream_try_sending_codecs (stream); } static void @@ -755,9 +763,13 @@ if (proxy == NULL) { - g_warning ("failed to construct TpMediaSessionHandler: %s", + gchar *str = g_strdup_printf ("failed to construct TpMediaSessionHandler:" + " %s", error->message); g_error_free (error); + g_warning (str); + tf_channel_error (self, 0, str); + g_free (str); return; } @@ -765,8 +777,12 @@ if (session == NULL) { - g_warning ("failed to create session: %s", error->message); + gchar *str = g_strdup_printf("failed to create session: %s", + error->message); g_error_free (error); + g_warning (str); + tf_channel_error (self, 0, str); + g_free (str); return; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/telepathy-farsight/stream.c new/telepathy-farsight-0.0.6/telepathy-farsight/stream.c --- old/telepathy-farsight-0.0.4/telepathy-farsight/stream.c 2009-01-14 15:05:42.000000000 +0100 +++ new/telepathy-farsight-0.0.6/telepathy-farsight/stream.c 2009-03-17 22:57:43.000000000 +0100 @@ -50,17 +50,17 @@ G_DEFINE_TYPE (TfStream, tf_stream, G_TYPE_OBJECT); #define DEBUG(stream, format, ...) \ - g_debug ("stream %d (%s) %s: " format, \ - stream->stream_id, \ - (stream->priv->media_type == FS_MEDIA_TYPE_AUDIO) ? "audio" \ + g_debug ("stream %d %p (%s) %s: " format, \ + stream->stream_id, stream, \ + (stream->priv->media_type == FS_MEDIA_TYPE_AUDIO) ? "audio" \ : "video", \ G_STRFUNC, \ ##__VA_ARGS__) #define WARNING(stream, format, ...) \ - g_warning ("stream %d (%s) %s: " format, \ - stream->stream_id, \ - (stream->priv->media_type == FS_MEDIA_TYPE_AUDIO) ? "audio" \ + g_warning ("stream %d %p (%s) %s: " format, \ + stream->stream_id, stream, \ + (stream->priv->media_type == FS_MEDIA_TYPE_AUDIO) ? "audio" \ : "video", \ G_STRFUNC, \ ##__VA_ARGS__) @@ -79,8 +79,6 @@ const TfNatProperties *nat_props; GList *local_preferences; - GError *construction_error; - TpMediaStreamHandler *stream_handler_proxy; FsStreamDirection desired_direction; @@ -89,10 +87,12 @@ GList *local_candidates; + GList *last_sent_codecs; + gboolean send_local_codecs; gboolean send_supported_codecs; - gboolean gathering; + NewStreamCreatedCb *new_stream_created_cb; }; enum @@ -122,7 +122,11 @@ PROP_LOCAL_PREFERENCES }; - +static void get_all_properties_cb (TpProxy *proxy, + GHashTable *out_Properties, + const GError *error, + gpointer user_data, + GObject *weak_object); static gboolean tf_stream_request_resource ( TfStream *self, TpMediaStreamDirection dir); @@ -175,6 +179,8 @@ const GError *error, gpointer user_data, GObject *weak_object); +static void tf_stream_shutdown (TfStream *self); + static void cb_fs_stream_src_pad_added (FsStream *fsstream G_GNUC_UNUSED, GstPad *pad, @@ -295,153 +301,19 @@ { GObject *obj; TfStream *stream; - TfStreamPrivate *priv; - TfStreamClass *klass = NULL; - gchar *transmitter; - guint n_args = 0; - GList *preferred_local_candidates = NULL; - GParameter params[MAX_STREAM_TRANS_PARAMS]; - - obj = G_OBJECT_CLASS (tf_stream_parent_class)-> - constructor (type, n_props, props); - stream = (TfStream *) obj; - priv = stream->priv; - klass = TF_STREAM_GET_CLASS(obj); - - g_signal_connect (priv->stream_handler_proxy, "invalidated", - G_CALLBACK (invalidated_cb), obj); - - tp_cli_media_stream_handler_connect_to_add_remote_candidate - (priv->stream_handler_proxy, add_remote_candidate, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_remove_remote_candidate - (priv->stream_handler_proxy, remove_remote_candidate, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_set_active_candidate_pair - (priv->stream_handler_proxy, set_active_candidate_pair, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_set_remote_candidate_list - (priv->stream_handler_proxy, set_remote_candidate_list, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_set_remote_codecs - (priv->stream_handler_proxy, set_remote_codecs, NULL, NULL, obj, NULL); - tp_cli_media_stream_handler_connect_to_set_stream_playing - (priv->stream_handler_proxy, set_stream_playing, NULL, NULL, obj, NULL); - tp_cli_media_stream_handler_connect_to_set_stream_sending - (priv->stream_handler_proxy, set_stream_sending, NULL, NULL, obj, NULL); - tp_cli_media_stream_handler_connect_to_set_stream_held - (priv->stream_handler_proxy, set_stream_held, NULL, NULL, obj, NULL); - tp_cli_media_stream_handler_connect_to_start_telephony_event - (priv->stream_handler_proxy, start_telephony_event, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_stop_telephony_event - (priv->stream_handler_proxy, stop_telephony_event, NULL, NULL, obj, - NULL); - tp_cli_media_stream_handler_connect_to_close - (priv->stream_handler_proxy, close, NULL, NULL, obj, NULL); - - memset (params, 0, sizeof(GParameter) * MAX_STREAM_TRANS_PARAMS); - - if (stream->priv->nat_props == NULL || - stream->priv->nat_props->nat_traversal == NULL || - !strcmp (stream->priv->nat_props->nat_traversal, "gtalk-p2p")) - { - transmitter = "nice"; - - params[n_args].name = "compatibility-mode"; - g_value_init (¶ms[n_args].value, G_TYPE_UINT); - g_value_set_uint (¶ms[n_args].value, 1); - n_args++; - } - else - { - transmitter = "rawudp"; - - if (stream->priv->media_type == TP_MEDIA_STREAM_TYPE_AUDIO) - preferred_local_candidates = g_list_prepend (NULL, - fs_candidate_new (NULL, FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, - FS_NETWORK_PROTOCOL_UDP, NULL, 7078)); - else if (stream->priv->media_type == TP_MEDIA_STREAM_TYPE_VIDEO) - preferred_local_candidates = g_list_prepend (NULL, - fs_candidate_new (NULL, FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, - FS_NETWORK_PROTOCOL_UDP, NULL, 9078)); - } - - if (stream->priv->nat_props && - stream->priv->nat_props->stun_server && - stream->priv->nat_props->stun_port) - { - gchar *conn_timeout_str = NULL; - - params[n_args].name = "stun-ip"; - g_value_init (¶ms[n_args].value, G_TYPE_STRING); - g_value_set_string (¶ms[n_args].value, - stream->priv->nat_props->stun_server); - n_args++; - - params[n_args].name = "stun-port"; - g_value_init (¶ms[n_args].value, G_TYPE_UINT); - g_value_set_uint (¶ms[n_args].value, - stream->priv->nat_props->stun_port); - n_args++; - - conn_timeout_str = getenv ("FS_CONN_TIMEOUT"); - - if (conn_timeout_str) - { - gint conn_timeout = strtol (conn_timeout_str, NULL, 10); - - params[n_args].name = "stun-timeout"; - g_value_init (¶ms[n_args].value, G_TYPE_UINT); - g_value_set_uint (¶ms[n_args].value, conn_timeout); - n_args++; - } - } - - if (preferred_local_candidates) - { - params[n_args].name = "preferred-local-candidates"; - g_value_init (¶ms[n_args].value, FS_TYPE_CANDIDATE_LIST); - g_value_take_boxed (¶ms[n_args].value, - preferred_local_candidates); - n_args++; - } - - stream->priv->fs_session = fs_conference_new_session ( - stream->priv->fs_conference, - tp_media_type_to_fs (stream->priv->media_type), - &stream->priv->construction_error); - - if (!stream->priv->fs_session) - return obj; - - stream->priv->fs_stream = fs_session_new_stream (stream->priv->fs_session, - stream->priv->fs_participant, - FS_DIRECTION_NONE, - transmitter, - n_args, - params, - &stream->priv->construction_error); - if (!stream->priv->fs_stream) - return obj; - - if (stream->priv->local_preferences) - if (!fs_session_set_codec_preferences (stream->priv->fs_session, - stream->priv->local_preferences, - &stream->priv->construction_error)) - return obj; + obj = G_OBJECT_CLASS (tf_stream_parent_class)-> + constructor (type, n_props, props); - if (g_object_class_find_property ( - G_OBJECT_GET_CLASS (stream->priv->fs_session), - "no-rtcp-timeout")) - g_object_set (stream->priv->fs_session, "no-rtcp-timeout", 0, NULL); + stream = TF_STREAM (obj); - g_signal_connect (stream->priv->fs_stream, "src-pad-added", - G_CALLBACK (cb_fs_stream_src_pad_added), stream); + g_signal_connect (stream->priv->stream_handler_proxy, "invalidated", + G_CALLBACK (invalidated_cb), obj); - stream->priv->send_local_codecs = TRUE; + tp_cli_dbus_properties_call_get_all (stream->priv->stream_handler_proxy, + -1, "org.freedesktop.Telepathy.Media.StreamHandler", + get_all_properties_cb, NULL, NULL, obj); return obj; } @@ -488,6 +360,12 @@ priv->local_preferences = NULL; } + if (priv->last_sent_codecs) + { + fs_codec_list_destroy (priv->last_sent_codecs); + priv->last_sent_codecs = NULL; + } + fs_candidate_list_destroy (priv->local_candidates); priv->local_candidates = NULL; @@ -697,6 +575,315 @@ G_TYPE_NONE, 2, GST_TYPE_PAD, FS_TYPE_CODEC); } +static void +get_all_properties_cb (TpProxy *proxy, + GHashTable *out_Properties, + const GError *error, + gpointer user_data, + GObject *weak_object) +{ + TfStream *stream = TF_STREAM (weak_object); + GError *myerror = NULL; + gchar *transmitter; + guint n_args = 0; + GList *preferred_local_candidates = NULL; + GParameter params[MAX_STREAM_TRANS_PARAMS]; + const gchar *nat_traversal = NULL; + GPtrArray *stun_servers; + gboolean got_stun = FALSE; + GPtrArray *dbus_relay_info; + + if (error) + { + tf_stream_error (stream, 0, error->message); + return; + } + + tp_cli_media_stream_handler_connect_to_add_remote_candidate + (stream->priv->stream_handler_proxy, add_remote_candidate, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_remove_remote_candidate + (stream->priv->stream_handler_proxy, remove_remote_candidate, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_active_candidate_pair + (stream->priv->stream_handler_proxy, set_active_candidate_pair, NULL, + NULL, (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_remote_candidate_list + (stream->priv->stream_handler_proxy, set_remote_candidate_list, NULL, + NULL, (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_remote_codecs + (stream->priv->stream_handler_proxy, set_remote_codecs, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_stream_playing + (stream->priv->stream_handler_proxy, set_stream_playing, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_stream_sending + (stream->priv->stream_handler_proxy, set_stream_sending, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_set_stream_held + (stream->priv->stream_handler_proxy, set_stream_held, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_start_telephony_event + (stream->priv->stream_handler_proxy, start_telephony_event, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_stop_telephony_event + (stream->priv->stream_handler_proxy, stop_telephony_event, NULL, NULL, + (GObject*) stream, NULL); + tp_cli_media_stream_handler_connect_to_close + (stream->priv->stream_handler_proxy, close, NULL, NULL, + (GObject*) stream, NULL); + + memset (params, 0, sizeof(GParameter) * MAX_STREAM_TRANS_PARAMS); + + nat_traversal = tp_asv_get_string (out_Properties, "NATTraversal"); + if (!nat_traversal && stream->priv->nat_props) + nat_traversal = stream->priv->nat_props->nat_traversal; + + if (!nat_traversal || !strcmp (nat_traversal, "gtalk-p2p")) + { + transmitter = "nice"; + + params[n_args].name = "compatibility-mode"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_set_uint (¶ms[n_args].value, 1); + n_args++; + } + else if (!strcmp (nat_traversal, "ice-udp")) + { + transmitter = "nice"; + } + else if (!strcmp (nat_traversal, "wlm-8.5")) + { + transmitter = "nice"; + + params[n_args].name = "compatibility-mode"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_set_uint (¶ms[n_args].value, 2); + n_args++; + } + else if (!strcmp (nat_traversal, "wlm-2009")) + { + transmitter = "nice"; + + params[n_args].name = "compatibility-mode"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_set_uint (¶ms[n_args].value, 3); + n_args++; + } + else + { + transmitter = "rawudp"; + + if (stream->priv->media_type == TP_MEDIA_STREAM_TYPE_AUDIO) + preferred_local_candidates = g_list_prepend (NULL, + fs_candidate_new (NULL, FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, + FS_NETWORK_PROTOCOL_UDP, NULL, 7078)); + else if (stream->priv->media_type == TP_MEDIA_STREAM_TYPE_VIDEO) + preferred_local_candidates = g_list_prepend (NULL, + fs_candidate_new (NULL, FS_COMPONENT_RTP, FS_CANDIDATE_TYPE_HOST, + FS_NETWORK_PROTOCOL_UDP, NULL, 9078)); + } + + /* FIXME: use correct macro when available */ + stun_servers = tp_asv_get_boxed (out_Properties, "STUNServers", + tp_type_dbus_array_su ()); + + if (stun_servers && stun_servers->len) + { + GValueArray *stun_server = g_ptr_array_index (stun_servers, 0); + + if (stun_server && stun_server->n_values == 2) + { + GValue *stun_ip = g_value_array_get_nth (stun_server, 0); + GValue *stun_port = g_value_array_get_nth (stun_server, 1); + + DEBUG (stream, "Adding STUN server %s:%u", + g_value_get_string (stun_ip), + g_value_get_uint (stun_port)); + + params[n_args].name = "stun-ip"; + g_value_init (¶ms[n_args].value, G_TYPE_STRING); + g_value_copy (stun_ip, ¶ms[n_args].value); + n_args++; + + params[n_args].name = "stun-port"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_copy (stun_port, ¶ms[n_args].value); + n_args++; + + got_stun = TRUE; + } + } + + if (!got_stun && stream->priv->nat_props && + stream->priv->nat_props->stun_server && + stream->priv->nat_props->stun_port) + { + DEBUG (stream, "Adding STUN server (old API) %s:%u", + stream->priv->nat_props->stun_server, + stream->priv->nat_props->stun_port); + params[n_args].name = "stun-ip"; + g_value_init (¶ms[n_args].value, G_TYPE_STRING); + g_value_set_string (¶ms[n_args].value, + stream->priv->nat_props->stun_server); + n_args++; + + params[n_args].name = "stun-port"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_set_uint (¶ms[n_args].value, + stream->priv->nat_props->stun_port); + n_args++; + + got_stun = TRUE; + } + + if (got_stun) + { + gchar *conn_timeout_str = NULL; + + conn_timeout_str = getenv ("FS_CONN_TIMEOUT"); + if (conn_timeout_str) + { + gint conn_timeout = strtol (conn_timeout_str, NULL, 10); + + params[n_args].name = "stun-timeout"; + g_value_init (¶ms[n_args].value, G_TYPE_UINT); + g_value_set_uint (¶ms[n_args].value, conn_timeout); + n_args++; + } + } + + dbus_relay_info = tp_asv_get_boxed (out_Properties, "RelayInfo", + TP_ARRAY_TYPE_STRING_VARIANT_MAP_LIST); + + if (dbus_relay_info && dbus_relay_info->len) + { + GValueArray *fs_relay_info = g_value_array_new (0); + guint i; + GValue val = {0}; + g_value_init (&val, GST_TYPE_STRUCTURE); + + for (i = 0; i < dbus_relay_info->len; i++) + { + GHashTable *one_relay = g_ptr_array_index(dbus_relay_info, i); + const gchar *type; + const gchar *ip; + guint32 port; + const gchar *username; + const gchar *password; + guint component; + GstStructure *s; + + ip = tp_asv_get_string (one_relay, "ip"); + port = tp_asv_get_uint32 (one_relay, "port", NULL); + type = tp_asv_get_string (one_relay, "type"); + username = tp_asv_get_string (one_relay, "username"); + password = tp_asv_get_string (one_relay, "password"); + component = tp_asv_get_uint32 (one_relay, "component", NULL); + + if (!ip || !port || !username || !password) + continue; + + s = gst_structure_new ("relay-info", + "ip", G_TYPE_STRING, ip, + "port", G_TYPE_UINT, port, + "username", G_TYPE_STRING, username, + "password", G_TYPE_STRING, password, + NULL); + + if (type) + gst_structure_set (s, "relay-type", G_TYPE_STRING, type, NULL); + + if (component) + gst_structure_set (s, "component", G_TYPE_UINT, component, NULL); + + if (!type) + type = "udp"; + + DEBUG (stream, "Adding relay (%s) %s:%u %s:%s %u", + type, ip, port, username, password, component); + + g_value_take_boxed (&val, s); + + g_value_array_append (fs_relay_info, &val); + g_value_reset (&val); + } + + if (fs_relay_info->n_values) + { + params[n_args].name = "relay-info"; + g_value_init (¶ms[n_args].value, G_TYPE_VALUE_ARRAY); + g_value_set_boxed (¶ms[n_args].value, fs_relay_info); + n_args++; + } + + g_value_array_free (fs_relay_info); + } + + if (preferred_local_candidates) + { + params[n_args].name = "preferred-local-candidates"; + g_value_init (¶ms[n_args].value, FS_TYPE_CANDIDATE_LIST); + g_value_take_boxed (¶ms[n_args].value, + preferred_local_candidates); + n_args++; + } + + stream->priv->fs_session = fs_conference_new_session ( + stream->priv->fs_conference, + tp_media_type_to_fs (stream->priv->media_type), + &myerror); + + if (!stream->priv->fs_session) + { + tf_stream_error (stream, 0, error->message); + WARNING (stream, "Error creating session: %s", myerror->message); + g_clear_error (&myerror); + return; + } + + stream->priv->fs_stream = fs_session_new_stream (stream->priv->fs_session, + stream->priv->fs_participant, + FS_DIRECTION_NONE, + transmitter, + n_args, + params, + &myerror); + + if (!stream->priv->fs_stream) + { + tf_stream_error (stream, 0, error->message); + WARNING (stream, "Error creating stream: %s", myerror->message); + g_clear_error (&myerror); + return; + } + + if (stream->priv->local_preferences) + if (!fs_session_set_codec_preferences (stream->priv->fs_session, + stream->priv->local_preferences, + &myerror)) + { + tf_stream_error (stream, 0, error->message); + WARNING (stream, "Error sestting codec preferences: %s", + myerror->message); + g_clear_error (&myerror); + return; + } + + + if (g_object_class_find_property ( + G_OBJECT_GET_CLASS (stream->priv->fs_session), + "no-rtcp-timeout")) + g_object_set (stream->priv->fs_session, "no-rtcp-timeout", 0, NULL); + + g_signal_connect (stream->priv->fs_stream, "src-pad-added", + G_CALLBACK (cb_fs_stream_src_pad_added), stream); + + stream->priv->send_local_codecs = TRUE; + + stream->priv->new_stream_created_cb (stream, stream->priv->channel); +} + /* dummy callback handler for async calling calls with no return values */ static void async_method_callback (TpMediaStreamHandler *proxy G_GNUC_UNUSED, @@ -818,9 +1005,11 @@ tp_cli_media_stream_handler_call_new_native_candidate ( self->priv->stream_handler_proxy, -1, foundation, transports, async_method_callback, - "Media.StreamHandler::NativeCandidatesPrepared", + "Media.StreamHandler::NewNativeCandidate", NULL, (GObject *) self); + g_boxed_free (TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_TRANSPORT_LIST, + transports); g_free (foundation); } @@ -1275,10 +1464,6 @@ else { if (!self->priv->held) { - if (!self->priv->gathering) - tf_stream_free_resource (self, - TP_MEDIA_STREAM_DIRECTION_RECEIVE); - g_object_set (self->priv->fs_stream, "direction", current_direction & ~(FS_DIRECTION_SEND), NULL); @@ -1371,7 +1556,7 @@ { tp_cli_media_stream_handler_call_hold_state ( self->priv->stream_handler_proxy, -1, TRUE, - async_method_callback, "Media.StreamHandler::HoldState", + async_method_callback, "Media.StreamHandler::HoldState TRUE", NULL, (GObject *) self); } self->priv->held = TRUE; @@ -1380,9 +1565,6 @@ { FsStreamDirection desired_direction = self->priv->desired_direction; - if (self->priv->gathering) - desired_direction |= TP_MEDIA_STREAM_DIRECTION_SEND; - if (tf_stream_request_resource (self, desired_direction)) { g_object_set (self->priv->fs_stream, @@ -1390,7 +1572,7 @@ NULL); tp_cli_media_stream_handler_call_hold_state ( self->priv->stream_handler_proxy, -1, FALSE, - async_method_callback, "Media.StreamHandler::HoldState", + async_method_callback, "Media.StreamHandler::HoldState FALSE", NULL, (GObject *) self); self->priv->held = FALSE; @@ -1437,6 +1619,21 @@ WARNING (self, "stopping event failed"); } + +static void +tf_stream_shutdown (TfStream *self) +{ + if (self->priv->fs_stream) + g_object_set (self->priv->fs_stream, + "direction", FS_DIRECTION_NONE, + NULL); + tf_stream_free_resource (self, + TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL); + + g_signal_emit (self, signals[CLOSED], 0); +} + + static void close (TpMediaStreamHandler *proxy G_GNUC_UNUSED, gpointer user_data G_GNUC_UNUSED, @@ -1446,13 +1643,7 @@ DEBUG (self, "close requested by connection manager"); - g_object_set (self->priv->fs_stream, - "direction", FS_DIRECTION_NONE, - NULL); - tf_stream_free_resource (self, - TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL); - - g_signal_emit (self, signals[CLOSED], 0); + tf_stream_shutdown (self); } static void @@ -1495,7 +1686,7 @@ tp_cli_media_stream_handler_call_stream_state ( self->priv->stream_handler_proxy, -1, TP_MEDIA_STREAM_STATE_CONNECTED, - async_method_callback, "Media.StreamHandler::SetStreamState", + async_method_callback, "Media.StreamHandler::StreamState", NULL, (GObject *) self); } @@ -1508,6 +1699,8 @@ { TfStream *stream = TF_STREAM (user_data); + DEBUG (stream, "proxy invalidated"); + if (stream->priv->stream_handler_proxy) { TpMediaStreamHandler *tmp = stream->priv->stream_handler_proxy; @@ -1515,6 +1708,8 @@ stream->priv->stream_handler_proxy = NULL; g_object_unref (tmp); } + + tf_stream_shutdown (stream); } /** @@ -1563,6 +1758,9 @@ if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return FALSE; + if (!stream->priv->fs_stream || !stream->priv->fs_session) + return FALSE; + if (gst_structure_has_name (s, "farsight-error")) { GObject *object; @@ -1738,8 +1936,7 @@ TpMediaStreamDirection direction, TfNatProperties *nat_props, GList *local_preferences, - GError **error) - + NewStreamCreatedCb new_stream_created_cb) { TfStream *self = NULL; @@ -1755,13 +1952,7 @@ "codec-preferences", local_preferences, NULL); - if (self->priv->construction_error) - { - tf_stream_error (self, 0, self->priv->construction_error->message); - g_propagate_error (error, self->priv->construction_error); - g_object_unref (self); - return NULL; - } + self->priv->new_stream_created_cb = new_stream_created_cb; return self; } @@ -1772,47 +1963,24 @@ gboolean ready = FALSE; GList *fscodecs = NULL; GList *item = NULL; + GPtrArray *tpcodecs = NULL; + + gboolean sent_codecs = FALSE; DEBUG (stream, "called (send_local:%d send_supported:%d)", stream->priv->send_local_codecs, stream->priv->send_supported_codecs); - if (!stream->priv->send_supported_codecs && !stream->priv->send_local_codecs) - return; - g_object_get (stream->priv->fs_session, "codecs-ready", &ready, NULL); - if (!ready) + if (!ready && stream->priv->has_resource & TP_MEDIA_STREAM_DIRECTION_SEND) { - if (!stream->priv->gathering) - { - DEBUG (stream, "Enabling resources to gather codecs"); - stream->priv->gathering = TRUE; - - if (stream->priv->held) - return; - - if (!tf_stream_request_resource (stream, - TP_MEDIA_STREAM_DIRECTION_SEND)) - { - DEBUG (stream, "Could not get resource, sending may not work"); - stream->priv->gathering = FALSE; - goto ignore_ready; - } - } + DEBUG (stream, "Ignoring new codecs because we're sending," + " but we're not ready"); return; } - ignore_ready: - g_object_get (stream->priv->fs_session, "codecs", &fscodecs, NULL); - if (stream->priv->gathering) - { - if (!(stream->priv->desired_direction & TP_MEDIA_STREAM_DIRECTION_SEND)) - tf_stream_free_resource (stream, TP_MEDIA_STREAM_DIRECTION_SEND); - stream->priv->gathering = FALSE; - } - for(item = fscodecs; item; item = g_list_next (item)) { gchar *tmp = fs_codec_to_string (item->data); @@ -1822,7 +1990,7 @@ if (stream->priv->send_local_codecs) { - GPtrArray *tpcodecs = fs_codecs_to_tp (stream, fscodecs); + tpcodecs = fs_codecs_to_tp (stream, fscodecs); DEBUG (stream, "calling MediaStreamHandler::Ready"); tp_cli_media_stream_handler_call_ready ( @@ -1830,11 +1998,12 @@ -1, tpcodecs, async_method_callback, "Media.StreamHandler::Ready", NULL, (GObject *) stream); stream->priv->send_local_codecs = FALSE; + sent_codecs = TRUE; } if (stream->priv->send_supported_codecs) { - GPtrArray *tpcodecs = fs_codecs_to_tp (stream, fscodecs); + tpcodecs = fs_codecs_to_tp (stream, fscodecs); DEBUG (stream, "calling MediaStreamHandler::SupportedCodecs"); tp_cli_media_stream_handler_call_supported_codecs ( @@ -1842,9 +2011,26 @@ -1, tpcodecs, async_method_callback, "Media.StreamHandler::SupportedCodecs", NULL, (GObject *) stream); stream->priv->send_supported_codecs = FALSE; + sent_codecs = TRUE; + } + + + if (!sent_codecs && + !fs_codec_list_are_equal (fscodecs, stream->priv->last_sent_codecs)) + { + tpcodecs = fs_codecs_to_tp (stream, fscodecs); + + DEBUG (stream, "calling MediaStreamHandler::CodecsUpdated"); + tp_cli_media_stream_handler_call_codecs_updated ( + stream->priv->stream_handler_proxy, + -1, tpcodecs, async_method_callback, + "Media.StreamHandler::CodecsUpdated", NULL, (GObject *) stream); } - fs_codec_list_destroy (fscodecs); + if (tpcodecs) + g_boxed_free (TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_CODEC_LIST, tpcodecs); + fs_codec_list_destroy (stream->priv->last_sent_codecs); + stream->priv->last_sent_codecs = fscodecs; } /** diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/telepathy-farsight/stream-priv.h new/telepathy-farsight-0.0.6/telepathy-farsight/stream-priv.h --- old/telepathy-farsight-0.0.4/telepathy-farsight/stream-priv.h 2008-12-29 21:11:45.000000000 +0100 +++ new/telepathy-farsight-0.0.6/telepathy-farsight/stream-priv.h 2009-03-16 17:22:39.000000000 +0100 @@ -49,6 +49,8 @@ gchar *relay_token; } TfNatProperties; +typedef void (NewStreamCreatedCb) (TfStream *stream, gpointer channel); + TfStream * _tf_stream_new (gpointer channel, FsConference *conference, @@ -59,7 +61,7 @@ TpMediaStreamDirection direction, TfNatProperties *nat_props, GList *local_codecs_config, - GError **error); + NewStreamCreatedCb new_stream_created_cb); gboolean _tf_stream_bus_message (TfStream *stream, GstMessage *message); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/telepathy-farsight-0.0.4/telepathy-farsight/telepathy-farsight.pc.in new/telepathy-farsight-0.0.6/telepathy-farsight/telepathy-farsight.pc.in --- old/telepathy-farsight-0.0.4/telepathy-farsight/telepathy-farsight.pc.in 2008-11-21 18:50:31.000000000 +0100 +++ new/telepathy-farsight-0.0.6/telepathy-farsight/telepathy-farsight.pc.in 2009-02-11 19:01:58.000000000 +0100 @@ -6,6 +6,6 @@ Name: Telepathy-Farsight Description: Library implementing the Telepathy Media Signalling API using Farsight2 Version: @VERSION@ -Requires.private: dbus-glib-1 >= 0.73, glib-2.0 >= 2.10, gobject-2.0 >= 2.10, farsight2-0.10 > 0.0.3 +Requires.private: dbus-glib-1 >= 0.73, glib-2.0 >= 2.10, gobject-2.0 >= 2.10, farsight2-0.10 > 0.0.3, telepathy-glib >= 0.7.23, gstreamer-0.10 Libs: -L${libdir} -ltelepathy-farsight Cflags: -I${includedir}/telepathy-1.0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de